Class RMIRemoteSessionControllerDispatcher
- java.lang.Object
-
- java.rmi.server.RemoteObject
-
- java.rmi.server.RemoteServer
-
- java.rmi.server.UnicastRemoteObject
-
- org.eclipse.persistence.sessions.remote.rmi.RMIRemoteSessionControllerDispatcher
-
- All Implemented Interfaces:
Serializable
,Remote
,RMIRemoteSessionController
public class RMIRemoteSessionControllerDispatcher extends UnicastRemoteObject 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.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected RemoteSessionController
controller
Store the real controller.-
Fields inherited from class java.rmi.server.RemoteObject
ref
-
-
Constructor Summary
Constructors Constructor Description RMIRemoteSessionControllerDispatcher(AbstractSession session)
RMIRemoteSessionControllerDispatcher(Session session)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Transporter
beginEarlyTransaction()
Begin an early unit of work transaction.Transporter
beginTransaction()
Begin a transaction on the database.Transporter
commitRootUnitOfWork(Transporter remoteUnitOfWork)
Remote unit of work after serialization is committed locally.Transporter
commitTransaction()
Commit a transaction on the database.Transporter
cursoredStreamClose(Transporter remoteCursoredStreamID)
Used for closing cursored streams across RMI.Transporter
cursoredStreamNextPage(Transporter remoteCursoredStream, int pageSize)
Retrieve next page size of objects from the remote cursored streamTransporter
cursoredStreamSize(Transporter remoteCursoredStreamOid)
Return the cursored stream sizeTransporter
cursorSelectObjects(Transporter remoteTransporter)
Returns a remote cursor stub in a transporterTransporter
executeNamedQuery(Transporter nameTransporter, Transporter classTransporter, Transporter argumentsTransporter)
A remote query after serialization is executed locally.Transporter
executeQuery(Transporter query)
A remote query after serialization is executed locally.protected RemoteSessionController
getController()
Return the controller.Transporter
getDefaultReadOnlyClasses()
Get the default read-only classesTransporter
getDescriptor(Transporter theClass)
Extract descriptor from the sessionTransporter
getDescriptorForAlias(Transporter alias)
Extract descriptor from the sessionTransporter
getLogin()
Get the associated session login.Transporter
getSequenceNumberNamed(Transporter remoteFunctionCall)
INTERNAL: Get the value returned by remote function callTransporter
initializeIdentityMapsOnServerSession()
Transporter
instantiateRemoteValueHolderOnServer(Transporter remoteValueHolder)
The corresponding original value holder is instantiated.Transporter
processCommand(Transporter remoteTransporter)
INTERNAL: This method is intended to be used by by sessions that wish to execute a command on a remote sessionTransporter
rollbackTransaction()
Rollback a transaction on the database.Transporter
scrollableCursorAbsolute(Transporter remoteScrollableCursorOid, int rows)
Moves the cursor to the given row number in the result setTransporter
scrollableCursorAfterLast(Transporter remoteScrollableCursorOid)
Moves the cursor to the end of the result set, just after the last row.Transporter
scrollableCursorBeforeFirst(Transporter remoteScrollableCursor)
Moves the cursor to the front of the result set, just before the first rowTransporter
scrollableCursorClose(Transporter remoteScrollableCursorOid)
Used for closing scrollable cursor across RMI.Transporter
scrollableCursorCurrentIndex(Transporter remoteScrollableCursor)
Retrieves the current row index numberTransporter
scrollableCursorFirst(Transporter remoteScrollableCursor)
Moves the cursor to the first row in the result setTransporter
scrollableCursorIsAfterLast(Transporter remoteScrollableCursor)
Indicates whether the cursor is after the last row in the result set.Transporter
scrollableCursorIsBeforeFirst(Transporter remoteScrollableCursor)
Indicates whether the cursor is before the first row in the result set.Transporter
scrollableCursorIsFirst(Transporter remoteScrollableCursor)
Indicates whether the cursor is on the first row of the result set.Transporter
scrollableCursorIsLast(Transporter remoteScrollableCursor)
Indicates whether the cursor is on the last row of the result set.Transporter
scrollableCursorLast(Transporter remoteScrollableCursor)
Moves the cursor to the last row in the result setTransporter
scrollableCursorNextObject(Transporter scrollableCursorOid)
Retrieve next object from the scrollable cursorTransporter
scrollableCursorPreviousObject(Transporter scrollableCursorOid)
Retrieve previous object from the scrollable cursorTransporter
scrollableCursorRelative(Transporter remoteScrollableCursor, int rows)
Moves the cursor to the given row number in the result setTransporter
scrollableCursorSize(Transporter remoteCursorOid)
Return the cursor sizeprotected void
setController(RemoteSessionController controller)
Set the controller.-
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
-
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
-
-
-
-
Field Detail
-
controller
protected RemoteSessionController controller
Store the real controller.
-
-
Constructor Detail
-
RMIRemoteSessionControllerDispatcher
public RMIRemoteSessionControllerDispatcher(AbstractSession session) throws RemoteException
- Throws:
RemoteException
-
RMIRemoteSessionControllerDispatcher
public RMIRemoteSessionControllerDispatcher(Session session) throws RemoteException
- Throws:
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:
processCommand
in interfaceRMIRemoteSessionController
- Parameters:
remoteTransporter
- The Transporter carrying the command to be executed on the remote session
-
beginTransaction
public Transporter beginTransaction()
Begin a transaction on the database.- Specified by:
beginTransaction
in interfaceRMIRemoteSessionController
-
beginEarlyTransaction
public Transporter beginEarlyTransaction()
Begin an early unit of work transaction.- Specified by:
beginEarlyTransaction
in interfaceRMIRemoteSessionController
-
commitRootUnitOfWork
public Transporter commitRootUnitOfWork(Transporter remoteUnitOfWork)
Remote unit of work after serialization is committed locally.- Specified by:
commitRootUnitOfWork
in interfaceRMIRemoteSessionController
-
commitTransaction
public Transporter commitTransaction()
Commit a transaction on the database.- Specified by:
commitTransaction
in interfaceRMIRemoteSessionController
-
cursoredStreamClose
public Transporter cursoredStreamClose(Transporter remoteCursoredStreamID)
Used for closing cursored streams across RMI.- Specified by:
cursoredStreamClose
in interfaceRMIRemoteSessionController
-
cursoredStreamNextPage
public Transporter cursoredStreamNextPage(Transporter remoteCursoredStream, int pageSize)
Retrieve next page size of objects from the remote cursored stream- Specified by:
cursoredStreamNextPage
in interfaceRMIRemoteSessionController
-
cursoredStreamSize
public Transporter cursoredStreamSize(Transporter remoteCursoredStreamOid)
Return the cursored stream size- Specified by:
cursoredStreamSize
in interfaceRMIRemoteSessionController
-
cursorSelectObjects
public Transporter cursorSelectObjects(Transporter remoteTransporter)
Returns a remote cursor stub in a transporter- Specified by:
cursorSelectObjects
in interfaceRMIRemoteSessionController
-
executeNamedQuery
public Transporter executeNamedQuery(Transporter nameTransporter, Transporter classTransporter, Transporter argumentsTransporter)
A remote query after serialization is executed locally.- Specified by:
executeNamedQuery
in interfaceRMIRemoteSessionController
-
executeQuery
public Transporter executeQuery(Transporter query)
A remote query after serialization is executed locally.- Specified by:
executeQuery
in interfaceRMIRemoteSessionController
-
getController
protected RemoteSessionController getController()
Return the controller. All work is dispatched to the controller. This is required to be protocol independent.
-
getDefaultReadOnlyClasses
public Transporter getDefaultReadOnlyClasses()
Get the default read-only classes- Specified by:
getDefaultReadOnlyClasses
in interfaceRMIRemoteSessionController
-
getDescriptor
public Transporter getDescriptor(Transporter theClass)
Extract descriptor from the session- Specified by:
getDescriptor
in interfaceRMIRemoteSessionController
-
getDescriptorForAlias
public Transporter getDescriptorForAlias(Transporter alias)
Extract descriptor from the session- Specified by:
getDescriptorForAlias
in interfaceRMIRemoteSessionController
-
getLogin
public Transporter getLogin()
Get the associated session login.- Specified by:
getLogin
in interfaceRMIRemoteSessionController
-
getSequenceNumberNamed
public Transporter getSequenceNumberNamed(Transporter remoteFunctionCall)
INTERNAL: Get the value returned by remote function call- Specified by:
getSequenceNumberNamed
in interfaceRMIRemoteSessionController
-
initializeIdentityMapsOnServerSession
public Transporter initializeIdentityMapsOnServerSession()
- Specified by:
initializeIdentityMapsOnServerSession
in interfaceRMIRemoteSessionController
-
instantiateRemoteValueHolderOnServer
public Transporter instantiateRemoteValueHolderOnServer(Transporter remoteValueHolder)
The corresponding original value holder is instantiated.- Specified by:
instantiateRemoteValueHolderOnServer
in interfaceRMIRemoteSessionController
-
rollbackTransaction
public Transporter rollbackTransaction()
Rollback a transaction on the database.- Specified by:
rollbackTransaction
in interfaceRMIRemoteSessionController
-
scrollableCursorAbsolute
public Transporter scrollableCursorAbsolute(Transporter remoteScrollableCursorOid, int rows)
Moves the cursor to the given row number in the result set- Specified by:
scrollableCursorAbsolute
in interfaceRMIRemoteSessionController
-
scrollableCursorAfterLast
public Transporter scrollableCursorAfterLast(Transporter remoteScrollableCursorOid)
Moves the cursor to the end of the result set, just after the last row.- Specified by:
scrollableCursorAfterLast
in interfaceRMIRemoteSessionController
-
scrollableCursorBeforeFirst
public Transporter scrollableCursorBeforeFirst(Transporter remoteScrollableCursor)
Moves the cursor to the front of the result set, just before the first row- Specified by:
scrollableCursorBeforeFirst
in interfaceRMIRemoteSessionController
-
scrollableCursorClose
public Transporter scrollableCursorClose(Transporter remoteScrollableCursorOid)
Used for closing scrollable cursor across RMI.- Specified by:
scrollableCursorClose
in interfaceRMIRemoteSessionController
-
scrollableCursorCurrentIndex
public Transporter scrollableCursorCurrentIndex(Transporter remoteScrollableCursor)
Retrieves the current row index number- Specified by:
scrollableCursorCurrentIndex
in interfaceRMIRemoteSessionController
-
scrollableCursorFirst
public Transporter scrollableCursorFirst(Transporter remoteScrollableCursor)
Moves the cursor to the first row in the result set- Specified by:
scrollableCursorFirst
in interfaceRMIRemoteSessionController
-
scrollableCursorIsAfterLast
public Transporter scrollableCursorIsAfterLast(Transporter remoteScrollableCursor)
Indicates whether the cursor is after the last row in the result set.- Specified by:
scrollableCursorIsAfterLast
in interfaceRMIRemoteSessionController
-
scrollableCursorIsBeforeFirst
public Transporter scrollableCursorIsBeforeFirst(Transporter remoteScrollableCursor)
Indicates whether the cursor is before the first row in the result set.- Specified by:
scrollableCursorIsBeforeFirst
in interfaceRMIRemoteSessionController
-
scrollableCursorIsFirst
public Transporter scrollableCursorIsFirst(Transporter remoteScrollableCursor)
Indicates whether the cursor is on the first row of the result set.- Specified by:
scrollableCursorIsFirst
in interfaceRMIRemoteSessionController
-
scrollableCursorIsLast
public Transporter scrollableCursorIsLast(Transporter remoteScrollableCursor)
Indicates whether the cursor is on the last row of the result set.- Specified by:
scrollableCursorIsLast
in interfaceRMIRemoteSessionController
-
scrollableCursorLast
public Transporter scrollableCursorLast(Transporter remoteScrollableCursor)
Moves the cursor to the last row in the result set- Specified by:
scrollableCursorLast
in interfaceRMIRemoteSessionController
-
scrollableCursorNextObject
public Transporter scrollableCursorNextObject(Transporter scrollableCursorOid)
Retrieve next object from the scrollable cursor- Specified by:
scrollableCursorNextObject
in interfaceRMIRemoteSessionController
-
scrollableCursorPreviousObject
public Transporter scrollableCursorPreviousObject(Transporter scrollableCursorOid)
Retrieve previous object from the scrollable cursor- Specified by:
scrollableCursorPreviousObject
in interfaceRMIRemoteSessionController
-
scrollableCursorRelative
public Transporter scrollableCursorRelative(Transporter remoteScrollableCursor, int rows)
Moves the cursor to the given row number in the result set- Specified by:
scrollableCursorRelative
in interfaceRMIRemoteSessionController
-
scrollableCursorSize
public Transporter scrollableCursorSize(Transporter remoteCursorOid)
Return the cursor size- Specified by:
scrollableCursorSize
in interfaceRMIRemoteSessionController
-
setController
protected void setController(RemoteSessionController controller)
Set the controller. All work is dispatched to the controller. This is required to be protocol independent.
-
-