Class NucleusConnectionImpl

  extended by
All Implemented Interfaces:

public class NucleusConnectionImpl
extends java.lang.Object
implements NucleusConnection

Representation of a datastore connection. Provides access to the native connection for the datastore.

Field Summary
protected static Localiser LOCALISER
          Localisation utility for output messages
Constructor Summary
NucleusConnectionImpl(java.lang.Object conn, java.lang.Runnable onClose)
          Constructor for a datastore connection holder.
Method Summary
 void close()
          Method to close the connection.
 java.lang.Object getNativeConnection()
          Accessor for the native connection for this datastore.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail


protected static final Localiser LOCALISER
Localisation utility for output messages

Constructor Detail


public NucleusConnectionImpl(java.lang.Object conn,
                             java.lang.Runnable onClose)
Constructor for a datastore connection holder.

conn - The native connection
onClose - What to perform on closure
Method Detail


public void close()
Method to close the connection. Performs whatever action was specified at creation.

Specified by:
close in interface NucleusConnection
NucleusUserException - Thrown if the connection is no longer available.


public java.lang.Object getNativeConnection()
Accessor for the native connection for this datastore. For RDBMS this would be a java.sql.Connection, or for db4o an ObjectContainer etc.

Specified by:
getNativeConnection in interface NucleusConnection
The native connection

Copyright © 2009. All Rights Reserved.