Oracle Application Server TopLink API Reference
10g (9.0.4)

B10491-01

oracle.toplink.remote.rmi.iiop
Class RMIConnection

java.lang.Object
  |
  +--oracle.toplink.internal.remote.RemoteConnection
        |
        +--oracle.toplink.remote.rmi.iiop.RMIConnection
All Implemented Interfaces:
java.io.Serializable

public class RMIConnection
extends oracle.toplink.internal.remote.RemoteConnection

This class exists on on the client side which talks to remote session controller through RMI connection.

See Also:
Serialized Form

Constructor Summary
RMIConnection(RMIRemoteSessionController controller)
          PUBLIC: The connection must be create from the server-side session controllers stub.

 

Method Summary
 void addRemoteControllerForSynchronization(java.lang.Object remoteDispatcher)
          Deprecated. Since 4.0
 boolean compareObjects(java.lang.Object firstObject, java.lang.Object secondObject)
          TESTING: Return if the two object match completely.
 boolean compareObjectsDontMatch(java.lang.Object firstObject, java.lang.Object secondObject)
          TESTING: Return true if the object do not match.
 boolean containsObjectInIdentityMap(java.lang.Object domainObject)
          ADVANCED: Return if their is an object for the primary key.
 boolean containsObjectInIdentityMap(java.util.Vector primaryKey, java.lang.Class theClass)
          ADVANCED: Return if their is an object for the primary key.
 Session createProxySession()
          PUBLIC: Returns a proxy session.
 Session createRemoteSession()
          PUBLIC: Returns a remote session.
 void cursoredStreamClose(java.rmi.server.ObjID remoteCursoredStreamOid)
          Used for closing cursored streams across RMI.
 java.util.Vector cursoredStreamNextPage(oracle.toplink.internal.remote.RemoteCursoredStream remoteCursoredStream, ReadQuery query, RemoteSession session, int pageSize)
          Retrieve next page size of objects from the remote cursored stream
 int cursoredStreamSize(java.rmi.server.ObjID remoteCursoredStreamID)
          Return the cursored stream size
 ExceptionHandler getExceptionHandler()
          PUBLIC: Return the ExceptionHandler.Exception handler can catch errors that occur on queries or during database access.
 java.lang.Object getFromIdentityMap(java.lang.Object domainObject)
          ADVANCED: Return the object from the identity with primary and class of the given object.
 java.lang.Object getFromIdentityMap(java.util.Vector primaryKey, java.lang.Class theClass)
          ADVANCED: Return the object from the identity with the primary and class.
 java.io.Writer getLog()
          PUBLIC: Return the writer to which an accessor writes logged messages and SQL.
 SessionProfiler getProfiler()
          PUBLIC: Return the profiler.
 SessionLog getSessionLog()
          PUBLIC: Return the session log to which an accessor logs messages and SQL.
 void initializeIdentityMap(java.lang.Class theClass)
          PUBLIC: Reset the identity map for only the instances of the class.
 void log(SessionLogEntry entry)
          Log the log entry.
 void printIdentityMap(java.lang.Class theClass)
          PUBLIC: Used to print all the objects in the identity map of the passed in class.
 void printIdentityMaps()
          PUBLIC: Used to print all the objects in every identity map in this session.
 void processCommand(oracle.toplink.internal.remote.RemoteCommand command)
          ADVANCED: This method will send the command to the remote session for processing
 void removeFromIdentityMap(java.lang.Object domainObject)
          ADVANCED: Remove the object from the object cache.
 void removeFromIdentityMap(java.util.Vector key, java.lang.Class theClass)
          ADVANCED: Remove the object from the object cache.
 boolean scrollableCursorAbsolute(java.rmi.server.ObjID remoteScrollableCursorOid, int rows)
          Moves the cursor to the given row number in the result set
 void scrollableCursorAfterLast(java.rmi.server.ObjID remoteScrollableCursorOid)
          Moves the cursor to the end of the result set, just after the last row.
 void scrollableCursorBeforeFirst(java.rmi.server.ObjID remoteScrollableCursorOid)
          Moves the cursor to the front of the result set, just before the first row
 void scrollableCursorClose(java.rmi.server.ObjID remoteScrollableCursorOid)
          Used for closing scrollable cursor across RMI.
 int scrollableCursorCurrentIndex(java.rmi.server.ObjID remoteScrollableCursorOid)
          Retrieves the current row index number
 boolean scrollableCursorFirst(java.rmi.server.ObjID remoteScrollableCursorOid)
          Moves the cursor to the first row in the result set
 boolean scrollableCursorIsAfterLast(java.rmi.server.ObjID remoteScrollableCursorOid)
          Indicates whether the cursor is after the last row in the result set.
 boolean scrollableCursorIsBeforeFirst(java.rmi.server.ObjID remoteScrollableCursorOid)
          Indicates whether the cursor is before the first row in the result set.
 boolean scrollableCursorIsFirst(java.rmi.server.ObjID remoteScrollableCursorOid)
          Indicates whether the cursor is on the first row of the result set.
 boolean scrollableCursorIsLast(java.rmi.server.ObjID remoteScrollableCursorOid)
          Indicates whether the cursor is on the last row of the result set.
 boolean scrollableCursorLast(java.rmi.server.ObjID remoteScrollableCursorOid)
          Moves the cursor to the last row in the result set
 java.lang.Object scrollableCursorNextObject(java.rmi.server.ObjID remoteScrollableCursorOid, ReadQuery query, RemoteSession session)
          Retrieve next object from the remote scrollable cursor
 java.lang.Object scrollableCursorPreviousObject(java.rmi.server.ObjID remoteScrollableCursorOid, ReadQuery query, RemoteSession session)
          Retrieve previous object from the remote scrollable cursor
 boolean scrollableCursorRelative(java.rmi.server.ObjID remoteScrollableCursorOid, int rows)
          Moves the cursor to the given row number in the result set
 int scrollableCursorSize(java.rmi.server.ObjID cursorId)
          Return the scrollable cursor size
 void setExceptionHandler(ExceptionHandler exceptionHandler)
          PUBLIC: Set the exceptionHandler.
 void setLog(java.io.Writer log)
          PUBLIC: Set the writer to which an accessor writes logged messages and SQL.
 void setProfiler(SessionProfiler profiler)
          PUBLIC: Set the profiler for the session.
 void setSessionLog(SessionLog sessionLog)
          PUBLIC: Set the session log to which an accessor logs messages and SQL.
 void setShouldLogMessages(boolean shouldLogMessages)
          PUBLIC: Set messages logging.
 boolean shouldLogMessages()
          Return if all messages such as executed SQL commands should be logged.
 void validateCache()
          ADVANCED: This can be used to help debugging an object identity problem.

 

Methods inherited from class oracle.toplink.internal.remote.RemoteConnection
getServiceName, release, setServiceName

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

RMIConnection

public RMIConnection(RMIRemoteSessionController controller)
PUBLIC: The connection must be create from the server-side session controllers stub. The session in then created from the connection through createRemoteSession().
See Also:
Method Detail

addRemoteControllerForSynchronization

public void addRemoteControllerForSynchronization(java.lang.Object remoteDispatcher)
                                           throws java.lang.Exception
Deprecated. Since 4.0
ADVANCED: This method is intended to be used by newly connecting nodes to notify the other nodes in a distributed system to send changes to this calling server
Specified by:
addRemoteControllerForSynchronization in class oracle.toplink.internal.remote.RemoteConnection
java.lang.Exception

processCommand

public void processCommand(oracle.toplink.internal.remote.RemoteCommand command)
ADVANCED: This method will send the command to the remote session for processing
Specified by:
processCommand in class oracle.toplink.internal.remote.RemoteConnection
Parameters:
command - RemoteCOmmand Contains a command that will be executed on the remote session
See Also:
oracle.toplink.internal.RemoteCommand

compareObjects

public boolean compareObjects(java.lang.Object firstObject,
                              java.lang.Object secondObject)
TESTING: Return if the two object match completely. This checks the objects attributes and their private parts.
Specified by:
compareObjects in class oracle.toplink.internal.remote.RemoteConnection

compareObjectsDontMatch

public boolean compareObjectsDontMatch(java.lang.Object firstObject,
                                       java.lang.Object secondObject)
TESTING: Return true if the object do not match. This checks the objects attributes and their private parts.
Specified by:
compareObjectsDontMatch in class oracle.toplink.internal.remote.RemoteConnection

containsObjectInIdentityMap

public boolean containsObjectInIdentityMap(java.lang.Object domainObject)
ADVANCED: Return if their is an object for the primary key.
Specified by:
containsObjectInIdentityMap in class oracle.toplink.internal.remote.RemoteConnection

containsObjectInIdentityMap

public boolean containsObjectInIdentityMap(java.util.Vector primaryKey,
                                           java.lang.Class theClass)
ADVANCED: Return if their is an object for the primary key.
Specified by:
containsObjectInIdentityMap in class oracle.toplink.internal.remote.RemoteConnection

createProxySession

public Session createProxySession()
PUBLIC: Returns a proxy session.

createRemoteSession

public Session createRemoteSession()
PUBLIC: Returns a remote session.
Specified by:
createRemoteSession in class oracle.toplink.internal.remote.RemoteConnection

cursoredStreamClose

public void cursoredStreamClose(java.rmi.server.ObjID remoteCursoredStreamOid)
Used for closing cursored streams across RMI.
Specified by:
cursoredStreamClose in class oracle.toplink.internal.remote.RemoteConnection

cursoredStreamNextPage

public java.util.Vector cursoredStreamNextPage(oracle.toplink.internal.remote.RemoteCursoredStream remoteCursoredStream,
ReadQuery query,
RemoteSession session,
                                               int pageSize)
Retrieve next page size of objects from the remote cursored stream
Specified by:
cursoredStreamNextPage in class oracle.toplink.internal.remote.RemoteConnection

cursoredStreamSize

public int cursoredStreamSize(java.rmi.server.ObjID remoteCursoredStreamID)
Return the cursored stream size
Specified by:
cursoredStreamSize in class oracle.toplink.internal.remote.RemoteConnection

getExceptionHandler

public ExceptionHandler getExceptionHandler()
PUBLIC: Return the ExceptionHandler.Exception handler can catch errors that occur on queries or during database access.
Specified by:
getExceptionHandler in class oracle.toplink.internal.remote.RemoteConnection

getFromIdentityMap

public java.lang.Object getFromIdentityMap(java.lang.Object domainObject)
ADVANCED: Return the object from the identity with primary and class of the given object.
Specified by:
getFromIdentityMap in class oracle.toplink.internal.remote.RemoteConnection

getFromIdentityMap

public java.lang.Object getFromIdentityMap(java.util.Vector primaryKey,
                                           java.lang.Class theClass)
ADVANCED: Return the object from the identity with the primary and class.
Specified by:
getFromIdentityMap in class oracle.toplink.internal.remote.RemoteConnection

getLog

public java.io.Writer getLog()
PUBLIC: Return the writer to which an accessor writes logged messages and SQL. If not set, this reference defaults to a writer on System.out. To enable logging, logMessages must be turned on.
Specified by:
getLog in class oracle.toplink.internal.remote.RemoteConnection
See Also:
#logMessages()

getProfiler

public SessionProfiler getProfiler()
PUBLIC: Return the profiler. The profiler is a tool that can be used to determine performance bottlenecks. The profiler can be queries to print summaries and configure for logging purposes.
Specified by:
getProfiler in class oracle.toplink.internal.remote.RemoteConnection

getSessionLog

public SessionLog getSessionLog()
PUBLIC: Return the session log to which an accessor logs messages and SQL. If not set, this will default to a session log on a writer on System.out. To enable logging, logMessages must be turned on.
Specified by:
getSessionLog in class oracle.toplink.internal.remote.RemoteConnection
See Also:
#logMessages()

initializeIdentityMap

public void initializeIdentityMap(java.lang.Class theClass)
PUBLIC: Reset the identity map for only the instances of the class. For inheritance the user must make sure that they only use the root class. Caution must be used in doing this to ensure that the objects within the identity map are not referenced from other objects of other classes or from the application.
Specified by:
initializeIdentityMap in class oracle.toplink.internal.remote.RemoteConnection

log

public void log(SessionLogEntry entry)
Log the log entry.
Specified by:
log in class oracle.toplink.internal.remote.RemoteConnection

printIdentityMap

public void printIdentityMap(java.lang.Class theClass)
PUBLIC: Used to print all the objects in the identity map of the passed in class. The output of this method will go the the Session's log.
Specified by:
printIdentityMap in class oracle.toplink.internal.remote.RemoteConnection

printIdentityMaps

public void printIdentityMaps()
PUBLIC: Used to print all the objects in every identity map in this session. The output of this method will go to the Session's log.
Specified by:
printIdentityMaps in class oracle.toplink.internal.remote.RemoteConnection

removeFromIdentityMap

public void removeFromIdentityMap(java.lang.Object domainObject)
ADVANCED: Remove the object from the object cache. Caution should be used when calling to avoid violating object identity. The application should only call this is it knows that no references to the object exist.
Specified by:
removeFromIdentityMap in class oracle.toplink.internal.remote.RemoteConnection

removeFromIdentityMap

public void removeFromIdentityMap(java.util.Vector key,
                                  java.lang.Class theClass)
ADVANCED: Remove the object from the object cache. Caution should be used when calling to avoid violating object identity. The application should only call this is it knows that no references to the object exist.
Specified by:
removeFromIdentityMap in class oracle.toplink.internal.remote.RemoteConnection

scrollableCursorAbsolute

public boolean scrollableCursorAbsolute(java.rmi.server.ObjID remoteScrollableCursorOid,
                                        int rows)
Moves the cursor to the given row number in the result set
Specified by:
scrollableCursorAbsolute in class oracle.toplink.internal.remote.RemoteConnection

scrollableCursorAfterLast

public void scrollableCursorAfterLast(java.rmi.server.ObjID remoteScrollableCursorOid)
Moves the cursor to the end of the result set, just after the last row.
Specified by:
scrollableCursorAfterLast in class oracle.toplink.internal.remote.RemoteConnection

scrollableCursorBeforeFirst

public void scrollableCursorBeforeFirst(java.rmi.server.ObjID remoteScrollableCursorOid)
Moves the cursor to the front of the result set, just before the first row
Specified by:
scrollableCursorBeforeFirst in class oracle.toplink.internal.remote.RemoteConnection

scrollableCursorClose

public void scrollableCursorClose(java.rmi.server.ObjID remoteScrollableCursorOid)
Used for closing scrollable cursor across RMI.
Specified by:
scrollableCursorClose in class oracle.toplink.internal.remote.RemoteConnection

scrollableCursorCurrentIndex

public int scrollableCursorCurrentIndex(java.rmi.server.ObjID remoteScrollableCursorOid)
Retrieves the current row index number
Specified by:
scrollableCursorCurrentIndex in class oracle.toplink.internal.remote.RemoteConnection

scrollableCursorFirst

public boolean scrollableCursorFirst(java.rmi.server.ObjID remoteScrollableCursorOid)
Moves the cursor to the first row in the result set
Specified by:
scrollableCursorFirst in class oracle.toplink.internal.remote.RemoteConnection

scrollableCursorIsAfterLast

public boolean scrollableCursorIsAfterLast(java.rmi.server.ObjID remoteScrollableCursorOid)
Indicates whether the cursor is after the last row in the result set.
Specified by:
scrollableCursorIsAfterLast in class oracle.toplink.internal.remote.RemoteConnection

scrollableCursorIsBeforeFirst

public boolean scrollableCursorIsBeforeFirst(java.rmi.server.ObjID remoteScrollableCursorOid)
Indicates whether the cursor is before the first row in the result set.
Specified by:
scrollableCursorIsBeforeFirst in class oracle.toplink.internal.remote.RemoteConnection

scrollableCursorIsFirst

public boolean scrollableCursorIsFirst(java.rmi.server.ObjID remoteScrollableCursorOid)
Indicates whether the cursor is on the first row of the result set.
Specified by:
scrollableCursorIsFirst in class oracle.toplink.internal.remote.RemoteConnection

scrollableCursorIsLast

public boolean scrollableCursorIsLast(java.rmi.server.ObjID remoteScrollableCursorOid)
Indicates whether the cursor is on the last row of the result set.
Specified by:
scrollableCursorIsLast in class oracle.toplink.internal.remote.RemoteConnection

scrollableCursorLast

public boolean scrollableCursorLast(java.rmi.server.ObjID remoteScrollableCursorOid)
Moves the cursor to the last row in the result set
Specified by:
scrollableCursorLast in class oracle.toplink.internal.remote.RemoteConnection

scrollableCursorNextObject

public java.lang.Object scrollableCursorNextObject(java.rmi.server.ObjID remoteScrollableCursorOid,
ReadQuery query,
RemoteSession session)
Retrieve next object from the remote scrollable cursor
Specified by:
scrollableCursorNextObject in class oracle.toplink.internal.remote.RemoteConnection

scrollableCursorPreviousObject

public java.lang.Object scrollableCursorPreviousObject(java.rmi.server.ObjID remoteScrollableCursorOid,
ReadQuery query,
RemoteSession session)
Retrieve previous object from the remote scrollable cursor
Specified by:
scrollableCursorPreviousObject in class oracle.toplink.internal.remote.RemoteConnection

scrollableCursorRelative

public boolean scrollableCursorRelative(java.rmi.server.ObjID remoteScrollableCursorOid,
                                        int rows)
Moves the cursor to the given row number in the result set
Specified by:
scrollableCursorRelative in class oracle.toplink.internal.remote.RemoteConnection

scrollableCursorSize

public int scrollableCursorSize(java.rmi.server.ObjID cursorId)
Return the scrollable cursor size
Specified by:
scrollableCursorSize in class oracle.toplink.internal.remote.RemoteConnection

setExceptionHandler

public void setExceptionHandler(ExceptionHandler exceptionHandler)
PUBLIC: Set the exceptionHandler. Exception handler can catch errors that occur on queries or during database access.
Specified by:
setExceptionHandler in class oracle.toplink.internal.remote.RemoteConnection

setLog

public void setLog(java.io.Writer log)
PUBLIC: Set the writer to which an accessor writes logged messages and SQL. If not set, this reference defaults to a writer on System.out. To enable logging logMessages() is used.
Specified by:
setLog in class oracle.toplink.internal.remote.RemoteConnection
See Also:
#logMessages()

setProfiler

public void setProfiler(SessionProfiler profiler)
PUBLIC: Set the profiler for the session. This allows for performance operations to be profiled.
Specified by:
setProfiler in class oracle.toplink.internal.remote.RemoteConnection

setSessionLog

public void setSessionLog(SessionLog sessionLog)
PUBLIC: Set the session log to which an accessor logs messages and SQL. If not set, this will default to a session log on a writer on System.out. To enable logging, logMessages must be turned on.
Specified by:
setSessionLog in class oracle.toplink.internal.remote.RemoteConnection
See Also:
#logMessages()

setShouldLogMessages

public void setShouldLogMessages(boolean shouldLogMessages)
PUBLIC: Set messages logging. Message logging will dump all SQL executed through TopLink to the session's log. By default this is System.out, but can be set to any Writer.
Specified by:
setShouldLogMessages in class oracle.toplink.internal.remote.RemoteConnection
See Also:
setLog(Writer)

shouldLogMessages

public boolean shouldLogMessages()
Return if all messages such as executed SQL commands should be logged.
Specified by:
shouldLogMessages in class oracle.toplink.internal.remote.RemoteConnection

validateCache

public void validateCache()
ADVANCED: This can be used to help debugging an object identity problem. An object identity problem is when an object in the cache references an object not in the cache. This method will validate that all cached objects are in a correct state.
Specified by:
validateCache in class oracle.toplink.internal.remote.RemoteConnection

Copyright © 2003 Oracle Corporation. All Rights Reserved.