Class RMIRemoteSessionControllerDispatcher
- java.lang.Object
-
- javax.rmi.PortableRemoteObject
-
- org.eclipse.persistence.sessions.remote.rmi.iiop.RMIRemoteSessionControllerDispatcher
-
- All Implemented Interfaces:
java.rmi.Remote,RMIRemoteSessionController
public class RMIRemoteSessionControllerDispatcher extends javax.rmi.PortableRemoteObject implements RMIRemoteSessionController
RemoteSessionController sits between the remote session and the session. Any interaction between these two classes takes place through this object. As the object extends unicast remote object it listens to only single remote session during runtime.
-
-
Field Summary
Fields Modifier and Type Field Description protected RemoteSessionControllercontrollerStore the real controller.
-
Constructor Summary
Constructors Constructor Description RMIRemoteSessionControllerDispatcher(AbstractSession session)RMIRemoteSessionControllerDispatcher(Session session)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TransporterbeginEarlyTransaction()Begin an early unit of work transaction, all further queries must be isolated.TransporterbeginTransaction()Begin a transaction on the database.TransportercommitRootUnitOfWork(Transporter remoteUnitOfWork)Remote unit of work after serialization is commited locally.TransportercommitTransaction()Commit a transaction on the database.TransportercursoredStreamClose(Transporter remoteCursoredStreamID)Used for closing cursored streams across RMI.TransportercursoredStreamNextPage(Transporter remoteCursoredStream, int pageSize)Retrieve next page size of objects from the remote cursored streamTransportercursoredStreamSize(Transporter remoteCursoredStreamOid)Return the cursored stream sizeTransportercursorSelectObjects(Transporter remoteTransporter)Returns a remote cursor stub in a transporterTransporterexecuteNamedQuery(Transporter nameTransporter, Transporter classTransporter, Transporter argumentsTransporter)A remote query after serialization is executed locally.TransporterexecuteQuery(Transporter query)A remote query after serialization is executed locally.protected RemoteSessionControllergetController()Return the controller.TransportergetDefaultReadOnlyClasses()Get the default read-only classesTransportergetDescriptor(Transporter theClass)Extract descriptor from the sessionTransportergetDescriptorForAlias(Transporter alias)Extract descriptor from the sessionTransportergetLogin()Get the associated session login.TransportergetSequenceNumberNamed(Transporter remoteFunctionCall)INTERNAL: Get the value returned by remote function callTransporterinitializeIdentityMapsOnServerSession()TransporterinstantiateRemoteValueHolderOnServer(Transporter remoteValueHolder)The corresponding original value holder is instantiated.TransporterprocessCommand(Transporter remoteTransporter)INTERNAL: This method is intended to be used by by sessions that wish to execute a command on a remote sessionTransporterrollbackTransaction()Rollback a transaction on the database.TransporterscrollableCursorAbsolute(Transporter remoteScrollableCursorOid, int rows)Moves the cursor to the given row number in the result setTransporterscrollableCursorAfterLast(Transporter remoteScrollableCursorOid)Moves the cursor to the end of the result set, just after the last row.TransporterscrollableCursorBeforeFirst(Transporter remoteScrollableCursor)Moves the cursor to the front of the result set, just before the first rowTransporterscrollableCursorClose(Transporter remoteScrollableCursorOid)Used for closing scrollable cursor across RMI.TransporterscrollableCursorCurrentIndex(Transporter remoteScrollableCursor)Retrieves the current row index numberTransporterscrollableCursorFirst(Transporter remoteScrollableCursor)Moves the cursor to the first row in the result setTransporterscrollableCursorIsAfterLast(Transporter remoteScrollableCursor)Indicates whether the cursor is after the last row in the result set.TransporterscrollableCursorIsBeforeFirst(Transporter remoteScrollableCursor)Indicates whether the cursor is before the first row in the result set.TransporterscrollableCursorIsFirst(Transporter remoteScrollableCursor)Indicates whether the cursor is on the first row of the result set.TransporterscrollableCursorIsLast(Transporter remoteScrollableCursor)Indicates whether the cursor is on the last row of the result set.TransporterscrollableCursorLast(Transporter remoteScrollableCursor)Moves the cursor to the last row in the result setTransporterscrollableCursorNextObject(Transporter scrollableCursorOid)Retrieve next object from the scrollable cursorTransporterscrollableCursorPreviousObject(Transporter scrollableCursorOid)Retrieve previous object from the scrollable cursorTransporterscrollableCursorRelative(Transporter remoteScrollableCursor, int rows)Moves the cursor to the given row number in the result setTransporterscrollableCursorSize(Transporter remoteCursorOid)Return the cursor sizeprotected voidsetController(RemoteSessionController controller)Set the controller.
-
-
-
Field Detail
-
controller
protected RemoteSessionController controller
Store the real controller.
-
-
Constructor Detail
-
RMIRemoteSessionControllerDispatcher
public RMIRemoteSessionControllerDispatcher(AbstractSession session) throws java.rmi.RemoteException
- Throws:
java.rmi.RemoteException
-
RMIRemoteSessionControllerDispatcher
public RMIRemoteSessionControllerDispatcher(Session session) throws java.rmi.RemoteException
- Throws:
java.rmi.RemoteException
-
-
Method Detail
-
processCommand
public Transporter processCommand(Transporter remoteTransporter)
INTERNAL: This method is intended to be used by by sessions that wish to execute a command on a remote session- Specified by:
processCommandin interfaceRMIRemoteSessionController- Parameters:
remoteTransporter- The Transporter carrying the command to be executed on the remote session
-
beginEarlyTransaction
public Transporter beginEarlyTransaction()
Begin an early unit of work transaction, all further queries must be isolated.- Specified by:
beginEarlyTransactionin interfaceRMIRemoteSessionController
-
beginTransaction
public Transporter beginTransaction()
Begin a transaction on the database.- Specified by:
beginTransactionin interfaceRMIRemoteSessionController
-
commitRootUnitOfWork
public Transporter commitRootUnitOfWork(Transporter remoteUnitOfWork)
Remote unit of work after serialization is commited locally.- Specified by:
commitRootUnitOfWorkin interfaceRMIRemoteSessionController
-
commitTransaction
public Transporter commitTransaction()
Commit a transaction on the database.- Specified by:
commitTransactionin interfaceRMIRemoteSessionController
-
cursoredStreamClose
public Transporter cursoredStreamClose(Transporter remoteCursoredStreamID)
Used for closing cursored streams across RMI.- Specified by:
cursoredStreamClosein interfaceRMIRemoteSessionController
-
cursoredStreamNextPage
public Transporter cursoredStreamNextPage(Transporter remoteCursoredStream, int pageSize)
Retrieve next page size of objects from the remote cursored stream- Specified by:
cursoredStreamNextPagein interfaceRMIRemoteSessionController
-
cursoredStreamSize
public Transporter cursoredStreamSize(Transporter remoteCursoredStreamOid)
Return the cursored stream size- Specified by:
cursoredStreamSizein interfaceRMIRemoteSessionController
-
cursorSelectObjects
public Transporter cursorSelectObjects(Transporter remoteTransporter)
Returns a remote cursor stub in a transporter- Specified by:
cursorSelectObjectsin interfaceRMIRemoteSessionController
-
executeNamedQuery
public Transporter executeNamedQuery(Transporter nameTransporter, Transporter classTransporter, Transporter argumentsTransporter)
A remote query after serialization is executed locally.- Specified by:
executeNamedQueryin interfaceRMIRemoteSessionController
-
executeQuery
public Transporter executeQuery(Transporter query)
A remote query after serialization is executed locally.- Specified by:
executeQueryin interfaceRMIRemoteSessionController
-
getController
protected RemoteSessionController getController()
Return the controller. All work is dispatched to the controller. This is required to be protocol independent.
-
getDescriptor
public Transporter getDescriptor(Transporter theClass)
Extract descriptor from the session- Specified by:
getDescriptorin interfaceRMIRemoteSessionController
-
getDescriptorForAlias
public Transporter getDescriptorForAlias(Transporter alias)
Extract descriptor from the session- Specified by:
getDescriptorForAliasin interfaceRMIRemoteSessionController
-
getDefaultReadOnlyClasses
public Transporter getDefaultReadOnlyClasses()
Get the default read-only classes- Specified by:
getDefaultReadOnlyClassesin interfaceRMIRemoteSessionController
-
getLogin
public Transporter getLogin()
Get the associated session login.- Specified by:
getLoginin interfaceRMIRemoteSessionController
-
getSequenceNumberNamed
public Transporter getSequenceNumberNamed(Transporter remoteFunctionCall)
INTERNAL: Get the value returned by remote function call- Specified by:
getSequenceNumberNamedin interfaceRMIRemoteSessionController
-
initializeIdentityMapsOnServerSession
public Transporter initializeIdentityMapsOnServerSession()
- Specified by:
initializeIdentityMapsOnServerSessionin interfaceRMIRemoteSessionController
-
instantiateRemoteValueHolderOnServer
public Transporter instantiateRemoteValueHolderOnServer(Transporter remoteValueHolder)
The corresponding original value holder is instantiated.- Specified by:
instantiateRemoteValueHolderOnServerin interfaceRMIRemoteSessionController
-
rollbackTransaction
public Transporter rollbackTransaction()
Rollback a transaction on the database.- Specified by:
rollbackTransactionin interfaceRMIRemoteSessionController
-
scrollableCursorAbsolute
public Transporter scrollableCursorAbsolute(Transporter remoteScrollableCursorOid, int rows)
Moves the cursor to the given row number in the result set- Specified by:
scrollableCursorAbsolutein interfaceRMIRemoteSessionController
-
scrollableCursorAfterLast
public Transporter scrollableCursorAfterLast(Transporter remoteScrollableCursorOid)
Moves the cursor to the end of the result set, just after the last row.- Specified by:
scrollableCursorAfterLastin interfaceRMIRemoteSessionController
-
scrollableCursorBeforeFirst
public Transporter scrollableCursorBeforeFirst(Transporter remoteScrollableCursor)
Moves the cursor to the front of the result set, just before the first row- Specified by:
scrollableCursorBeforeFirstin interfaceRMIRemoteSessionController
-
scrollableCursorClose
public Transporter scrollableCursorClose(Transporter remoteScrollableCursorOid)
Used for closing scrollable cursor across RMI.- Specified by:
scrollableCursorClosein interfaceRMIRemoteSessionController
-
scrollableCursorCurrentIndex
public Transporter scrollableCursorCurrentIndex(Transporter remoteScrollableCursor)
Retrieves the current row index number- Specified by:
scrollableCursorCurrentIndexin interfaceRMIRemoteSessionController
-
scrollableCursorFirst
public Transporter scrollableCursorFirst(Transporter remoteScrollableCursor)
Moves the cursor to the first row in the result set- Specified by:
scrollableCursorFirstin interfaceRMIRemoteSessionController
-
scrollableCursorIsAfterLast
public Transporter scrollableCursorIsAfterLast(Transporter remoteScrollableCursor)
Indicates whether the cursor is after the last row in the result set.- Specified by:
scrollableCursorIsAfterLastin interfaceRMIRemoteSessionController
-
scrollableCursorIsBeforeFirst
public Transporter scrollableCursorIsBeforeFirst(Transporter remoteScrollableCursor)
Indicates whether the cursor is before the first row in the result set.- Specified by:
scrollableCursorIsBeforeFirstin interfaceRMIRemoteSessionController
-
scrollableCursorIsFirst
public Transporter scrollableCursorIsFirst(Transporter remoteScrollableCursor)
Indicates whether the cursor is on the first row of the result set.- Specified by:
scrollableCursorIsFirstin interfaceRMIRemoteSessionController
-
scrollableCursorIsLast
public Transporter scrollableCursorIsLast(Transporter remoteScrollableCursor)
Indicates whether the cursor is on the last row of the result set.- Specified by:
scrollableCursorIsLastin interfaceRMIRemoteSessionController
-
scrollableCursorLast
public Transporter scrollableCursorLast(Transporter remoteScrollableCursor)
Moves the cursor to the last row in the result set- Specified by:
scrollableCursorLastin interfaceRMIRemoteSessionController
-
scrollableCursorNextObject
public Transporter scrollableCursorNextObject(Transporter scrollableCursorOid)
Retrieve next object from the scrollable cursor- Specified by:
scrollableCursorNextObjectin interfaceRMIRemoteSessionController
-
scrollableCursorPreviousObject
public Transporter scrollableCursorPreviousObject(Transporter scrollableCursorOid)
Retrieve previous object from the scrollable cursor- Specified by:
scrollableCursorPreviousObjectin interfaceRMIRemoteSessionController
-
scrollableCursorRelative
public Transporter scrollableCursorRelative(Transporter remoteScrollableCursor, int rows)
Moves the cursor to the given row number in the result set- Specified by:
scrollableCursorRelativein interfaceRMIRemoteSessionController
-
scrollableCursorSize
public Transporter scrollableCursorSize(Transporter remoteCursorOid)
Return the cursor size- Specified by:
scrollableCursorSizein interfaceRMIRemoteSessionController
-
setController
protected void setController(RemoteSessionController controller)
Set the controller. All work is dispatched to the controller. This is required to be protocol independent.
-
-