Class RemoteConnection

  • All Implemented Interfaces:
    Serializable
    Direct Known Subclasses:
    RMIConnection

    public abstract class RemoteConnection
    extends Object
    implements Serializable
    Defines set of abstract methods which one must overwrite for any kind to implement a communication mechanism.
    See Also:
    Serialized Form
    • Field Detail

      • serviceName

        protected String serviceName
        This attribute is used to provide a globally unique identifier for this connection. It should be the same value as the JNDI context or the RMIRegistry context.
    • Constructor Detail

      • RemoteConnection

        public RemoteConnection()
    • Method Detail

      • processCommand

        public abstract void processCommand​(RemoteCommand remoteCommand)
        ADVANCED: This method will send the command to the remote session for processing
        Parameters:
        remoteCommand - Contains a command that will be executed on the remote session
        See Also:
        RemoteCommand
      • initialize

        public void initialize​(DistributedSession session)
        Allow the connection to initialize an setting in the session.
      • isConnected

        public boolean isConnected()
      • beginTransaction

        public abstract void beginTransaction()
        Begin a transaction on the database.
      • beginEarlyTransaction

        public abstract void beginEarlyTransaction()
        Begin an early unit of work transaction.
      • commitTransaction

        public abstract void commitTransaction()
        Commit a transaction on the database.
      • createRemoteSession

        public abstract Session createRemoteSession()
        Returns remote client session.
      • cursoredStreamClose

        public abstract void cursoredStreamClose​(ObjID id)
        Used for closing cursored streams across RMI.
      • cursoredStreamSize

        public abstract int cursoredStreamSize​(ObjID remoteCursoredStreamID)
        Return the cursored stream size
      • getDefaultReadOnlyClasses

        public abstract Vector getDefaultReadOnlyClasses()
        INTERNAL: Get the read-only classes
      • getDescriptor

        public abstract ClassDescriptor getDescriptor​(Class domainClass)
        Get descriptor
      • getDescriptorForAlias

        public abstract ClassDescriptor getDescriptorForAlias​(String alias)
        Get descriptor
      • getLogin

        public abstract Login getLogin()
        Return the login informaiton from the server.
      • getSequenceNumberNamed

        public abstract Object getSequenceNumberNamed​(Object remoteFunctionCall)
        INTERNAL: Perform remote function call
      • getServiceName

        public String getServiceName()
        ADVANCED: This method is used to get the globally unique identifier for this connection. This identifier should be the same as the JNDI context the service was stored under.
        Returns:
        java.lang.String the name
      • initializeIdentityMapsOnServerSession

        public abstract void initializeIdentityMapsOnServerSession()
      • instantiateRemoteValueHolderOnServer

        public abstract Transporter instantiateRemoteValueHolderOnServer​(RemoteValueHolder remoteValueHolder)
        Instantiated remote value holder.
      • remoteExecuteNamedQuery

        public abstract Transporter remoteExecuteNamedQuery​(String name,
                                                            Class javaClass,
                                                            Vector arguments)
        Execute query remotely.
      • rollbackTransaction

        public abstract void rollbackTransaction()
        Rollback a transaction on the database.
      • scrollableCursorAbsolute

        public abstract boolean scrollableCursorAbsolute​(ObjID remoteScrollableCursorOid,
                                                         int rows)
        Moves the cursor to the given row number in the result set
      • scrollableCursorAfterLast

        public abstract void scrollableCursorAfterLast​(ObjID remoteScrollableCursorOid)
        Moves the cursor to the end of the result set, just after the last row.
      • scrollableCursorBeforeFirst

        public abstract void scrollableCursorBeforeFirst​(ObjID remoteScrollableCursorOid)
        Moves the cursor to the front of the result set, just before the first row
      • scrollableCursorClose

        public abstract void scrollableCursorClose​(ObjID remoteScrollableCursorOid)
        Used for closing scrolable cursor across RMI.
      • scrollableCursorCurrentIndex

        public abstract int scrollableCursorCurrentIndex​(ObjID remoteScrollableCursorOid)
        Retrieves the current row index number
      • scrollableCursorFirst

        public abstract boolean scrollableCursorFirst​(ObjID remoteScrollableCursorOid)
        Moves the cursor to the first row in the result set
      • scrollableCursorIsAfterLast

        public abstract boolean scrollableCursorIsAfterLast​(ObjID remoteScrollableCursorOid)
        Indicates whether the cursor is after the last row in the result set.
      • scrollableCursorIsBeforeFirst

        public abstract boolean scrollableCursorIsBeforeFirst​(ObjID remoteScrollableCursorOid)
        Indicates whether the cursor is before the first row in the result set.
      • scrollableCursorIsFirst

        public abstract boolean scrollableCursorIsFirst​(ObjID remoteScrollableCursorOid)
        Indicates whether the cursor is on the first row of the result set.
      • scrollableCursorIsLast

        public abstract boolean scrollableCursorIsLast​(ObjID remoteScrollableCursorOid)
        Indicates whether the cursor is on the last row of the result set.
      • scrollableCursorLast

        public abstract boolean scrollableCursorLast​(ObjID remoteScrollableCursorOid)
        Moves the cursor to the last row in the result set
      • scrollableCursorNextObject

        public abstract Object scrollableCursorNextObject​(ObjID remoteScrollableCursorOid,
                                                          ReadQuery query,
                                                          DistributedSession session)
        Retrieve next object from the remote scrollable cursor
      • scrollableCursorPreviousObject

        public abstract Object scrollableCursorPreviousObject​(ObjID remoteScrollableCursorOid,
                                                              ReadQuery query,
                                                              DistributedSession session)
        Retrieve previous object from the remote scrollable cursor
      • scrollableCursorRelative

        public abstract boolean scrollableCursorRelative​(ObjID remoteScrollableCursorOid,
                                                         int rows)
        Moves the cursor a relative number of rows, either positive or negative. Attempting to move beyond the first/last row in the result set positions the cursor before/after the the first/last row
      • scrollableCursorSize

        public abstract int scrollableCursorSize​(ObjID cursorId)
        Return the scrollable cursor size
      • setServiceName

        public void setServiceName​(String newServiceName)
        ADVANCED: This method is used to set the globally unique identifier for this connection. This identifier should be the same as the JNDI context the service was stored under.
        Parameters:
        newServiceName - java.lang.String
      • release

        public void release()
        PUBLIC: Release the connection resource.
      • fixObjectReferences

        public void fixObjectReferences​(Transporter remoteCursoredStream,
                                        ObjectLevelReadQuery query,
                                        DistributedSession session)
        INTERNAL: An object has been serialized from the server to the remote client. Replace the transient attributes of the remote value holders with client-side objects. Being used for the cursored stream only