simpledb.remote
Class RemoteConnectionImpl

java.lang.Object
  extended by java.rmi.server.RemoteObject
      extended by java.rmi.server.RemoteServer
          extended by java.rmi.server.UnicastRemoteObject
              extended by simpledb.remote.RemoteConnectionImpl
All Implemented Interfaces:
java.io.Serializable, java.rmi.Remote, RemoteConnection

 class RemoteConnectionImpl
extends java.rmi.server.UnicastRemoteObject
implements RemoteConnection

The RMI server-side implementation of RemoteConnection.

Author:
Edward Sciore

Field Summary
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
RemoteConnectionImpl()
          Creates a remote connection and begins a new transaction for it.
 
Method Summary
 void close()
          Closes the connection.
(package private)  void commit()
          Commits the current transaction, and begins a new one.
 RemoteStatement createStatement()
          Creates a new RemoteStatement for this connection.
(package private)  Transaction getTransaction()
          Returns the transaction currently associated with this connection.
(package private)  void rollback()
          Rolls back the current transaction, and begins a new one.
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RemoteConnectionImpl

RemoteConnectionImpl()
               throws java.rmi.RemoteException
Creates a remote connection and begins a new transaction for it.

Throws:
java.rmi.RemoteException
Method Detail

createStatement

public RemoteStatement createStatement()
                                throws java.rmi.RemoteException
Creates a new RemoteStatement for this connection.

Specified by:
createStatement in interface RemoteConnection
Throws:
java.rmi.RemoteException
See Also:
RemoteConnection.createStatement()

close

public void close()
           throws java.rmi.RemoteException
Closes the connection. The current transaction is committed.

Specified by:
close in interface RemoteConnection
Throws:
java.rmi.RemoteException
See Also:
RemoteConnection.close()

getTransaction

Transaction getTransaction()
Returns the transaction currently associated with this connection.

Returns:
the transaction associated with this connection

commit

void commit()
Commits the current transaction, and begins a new one.


rollback

void rollback()
Rolls back the current transaction, and begins a new one.