Oracle Application Server TopLink API Reference
10g Release 2 (10.1.2)

B15903-01


oracle.toplink.remote.rmi.wls
Class RMIConnection

java.lang.Object
  extended byoracle.toplink.internal.remote.RemoteConnection
      extended byoracle.toplink.remote.rmi.wls.RMIConnection

All Implemented Interfaces:
java.io.Serializable

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

This class exists 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:
#createRemoteSession();

Method Detail

processCommand

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

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
Throws:
java.lang.Exception

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.

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.

containsObjectInIdentityMap

public boolean containsObjectInIdentityMap(java.lang.Object domainObject)
ADVANCED: Return if their is an object for the primary key.

containsObjectInIdentityMap

public boolean containsObjectInIdentityMap(java.util.Vector primaryKey,
                                           java.lang.Class theClass)
ADVANCED: Return if their is an object for the primary key.

createProxySession

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

createRemoteSession

public Session createRemoteSession()
PUBLIC: Returns a remote session.

cursoredStreamClose

public void cursoredStreamClose(java.rmi.server.ObjID remoteCursoredStreamOid)
Used for closing cursored streams across RMI.

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

cursoredStreamSize

public int cursoredStreamSize(java.rmi.server.ObjID remoteCursoredStreamID)
Return the cursored stream size

getExceptionHandler

public ExceptionHandler getExceptionHandler()
PUBLIC: Return the ExceptionHandler.Exception handler can catch errors that occur on queries or during database access.

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.

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.

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.
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.

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.
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.

log

public void log(SessionLogEntry entry)
Log the log entry.

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.

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.

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.

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.

scrollableCursorAbsolute

public boolean scrollableCursorAbsolute(java.rmi.server.ObjID remoteScrollableCursorOid,
                                        int rows)
Moves the cursor to the given row number in the result set

scrollableCursorAfterLast

public void scrollableCursorAfterLast(java.rmi.server.ObjID remoteScrollableCursorOid)
Moves the cursor to the end of the result set, just after the last row.

scrollableCursorBeforeFirst

public void scrollableCursorBeforeFirst(java.rmi.server.ObjID remoteScrollableCursorOid)
Moves the cursor to the front of the result set, just before the first row

scrollableCursorClose

public void scrollableCursorClose(java.rmi.server.ObjID remoteScrollableCursorOid)
Used for closing scrollable cursor across RMI.

scrollableCursorCurrentIndex

public int scrollableCursorCurrentIndex(java.rmi.server.ObjID remoteScrollableCursorOid)
Retrieves the current row index number

scrollableCursorFirst

public boolean scrollableCursorFirst(java.rmi.server.ObjID remoteScrollableCursorOid)
Moves the cursor to the first row in the result set

scrollableCursorIsAfterLast

public boolean scrollableCursorIsAfterLast(java.rmi.server.ObjID remoteScrollableCursorOid)
Indicates whether the cursor is after the last row in the result set.

scrollableCursorIsBeforeFirst

public boolean scrollableCursorIsBeforeFirst(java.rmi.server.ObjID remoteScrollableCursorOid)
Indicates whether the cursor is before the first row in the result set.

scrollableCursorIsFirst

public boolean scrollableCursorIsFirst(java.rmi.server.ObjID remoteScrollableCursorOid)
Indicates whether the cursor is on the first row of the result set.

scrollableCursorIsLast

public boolean scrollableCursorIsLast(java.rmi.server.ObjID remoteScrollableCursorOid)
Indicates whether the cursor is on the last row of the result set.

scrollableCursorLast

public boolean scrollableCursorLast(java.rmi.server.ObjID remoteScrollableCursorOid)
Moves the cursor to the last row in the result set

scrollableCursorNextObject

public java.lang.Object scrollableCursorNextObject(java.rmi.server.ObjID remoteScrollableCursorOid,
                                                   ReadQuery query,
                                                   RemoteSession session)
Retrieve next object from the remote scrollable cursor

scrollableCursorPreviousObject

public java.lang.Object scrollableCursorPreviousObject(java.rmi.server.ObjID remoteScrollableCursorOid,
                                                       ReadQuery query,
                                                       RemoteSession session)
Retrieve previous object from the remote scrollable cursor

scrollableCursorRelative

public boolean scrollableCursorRelative(java.rmi.server.ObjID remoteScrollableCursorOid,
                                        int rows)
Moves the cursor to the given row number in the result set

scrollableCursorSize

public int scrollableCursorSize(java.rmi.server.ObjID cursorId)
Return the scrollable cursor size

setExceptionHandler

public void setExceptionHandler(ExceptionHandler exceptionHandler)
PUBLIC: Set the exceptionHandler. Exception handler can catch errors that occur on queries or during database access.

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.
See Also:
#logMessages()

setProfiler

public void setProfiler(SessionProfiler profiler)
PUBLIC: Set the profiler for the session. This allows for performance operations to be profiled.

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.
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.
See Also:
setLog(Writer)

shouldLogMessages

public boolean shouldLogMessages()
Return if all messages such as executed SQL commands should be logged.

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.

Copyright © 1998, 2005 Oracle Corporation. All Rights Reserved.