|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuka.transport.JdkMarshalContext
uka.karmi.rmi.Connection
uka.karmi.rmi.ServerConnection
Connection objects represent the context of a remote method invocation. Stub and skeleton objects use connections to marshal and unmarshal method arguments and results.
StreamServerConnection| Field Summary | |
(package private) java.lang.Throwable |
dispatchProblem
Temporarily stores an exception that is thrown in doCallback(boolean). |
protected ExportPoint |
ep
The export point this connection belongs to. |
protected static CallHandler |
handlers
|
private java.lang.Throwable |
receivingProblem
|
protected Technology |
technology
The technology this connection belongs to. |
protected boolean |
useTID
The status of this invocation. |
| Fields inherited from class uka.karmi.rmi.Connection |
cid, mid, oid, RETURN_EXCEPTION, RETURN_INTERNAL, RETURN_INTERRUPT, RETURN_OK, tid |
| Fields inherited from class uka.transport.JdkMarshalContext |
|
| Fields inherited from interface uka.karmi.rmi.server.Constants |
APP_CALL, COLLECTIVE_OPERATION, DGC_ACK, DGC_CALL, DGC_CALL_ASYNC, MID_BARRIER, MID_COLLECTIVE_EXCHANGE, MID_COLLECTIVE_UPDATE, MID_EXCLUSIVE_LOCK, MID_EXCLUSIVE_UPDATE, MID_REQUEST_TICKET, MID_REQUEST_WAIT, MID_RMA, MID_SERVICE_CREATE_REPLICA, MID_SERVICE_GET_STUB, MID_SERVICE_INTERRUPT, MID_SERVICE_MIGRATE, MID_SERVICE_UPDATE_REFERENCES, MID_WAKEUP, SERVICE_CALL, SKELETON_EXTENSION, STUB_EXTENSION |
| Constructor Summary | |
ServerConnection(MarshalOutput snd,
MarshalInput rcv,
ExportPoint ep,
Technology technology)
|
|
| Method Summary | |
abstract void |
closeReceiveCall()
Indicates that the call was received successfully. |
abstract void |
closeReceiveDgcCall()
|
void |
closeSendDgcResult()
|
void |
closeSendResult()
Connection cleanup. |
void |
dispatch(boolean useTID)
The dispatch() method is the main entry point
for incoming calls. |
boolean |
dispatchInterrupt()
If a thread that waits for this blocking operation to complete is interrupted, this method is called to anounce the interrupt. |
protected void |
doAsyncDGCCall(int methodId,
java.lang.Object argument)
|
void |
doBlocking()
Receives the monitor release code from this connection. |
void |
doCallback(boolean isCallback)
Represents the callback. |
protected java.lang.Object |
doDGCCall(int methodId,
java.lang.Object argument)
|
void |
doSynchronized()
Callback executed while a remote server thread has acquired a monitor on a remote object in a remote monitor acquisition operation. |
java.lang.Throwable |
getBlockingProblem()
|
java.lang.Throwable |
getCallbackProblem()
Returns an exception thrown during the execution of doCallback(boolean), or null is no excetion
was thrown. |
static CallHandler |
getHandler()
|
RemoteServerRef |
getRemoteServerRef()
|
long |
getThreadID()
|
abstract void |
openReceiveCall()
Receive connection parameters Connection.cid, Connection.oid,
Connection.mid, and Connection.tid. |
void |
openSendResult(boolean normalReturn)
Called from the skeleton to indicate the type of a remote method return. |
protected abstract void |
openSendResult(byte code)
|
static void |
releaseHandler(CallHandler handler)
|
java.lang.String |
toStringMembers()
|
| Methods inherited from class uka.karmi.rmi.Connection |
closeAsynchronousCall, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected ExportPoint ep
protected Technology technology
protected boolean useTID
dispatch(boolean) method to true, if this
server connection is dispatched in an application thread that is
currently waiting for a former method to return. If this is the
case, setting and resetting the thread ID can be avoided,
because the thread executing the dispatch already has set the
correct thread ID.
dispatch(boolean)private java.lang.Throwable receivingProblem
getBlockingProblem()protected static CallHandler handlers
getHandler()java.lang.Throwable dispatchProblem
doCallback(boolean).
getCallbackProblem(),
doCallback(boolean),
CallHandler| Constructor Detail |
public ServerConnection(MarshalOutput snd,
MarshalInput rcv,
ExportPoint ep,
Technology technology)
| Method Detail |
public RemoteServerRef getRemoteServerRef()
throws NoSuchObjectException
NoSuchObjectException
public abstract void openReceiveCall()
throws java.io.IOException
Connection.cid, Connection.oid,
Connection.mid, and Connection.tid.
java.io.IOException
public abstract void closeReceiveCall()
throws java.io.IOException
Indicates that the call was received successfully. This method is called by the skeleton just before invoking the server method.
At the time, this method is called the following has
happened: The skeleton has already unmarshaled the arguments
form this connection in its doApplicationCall()
method.
This method belongs to the server-side skeleton interface of the connection.
java.io.IOExceptionRemoteSkeleton.doApplicationCall(ServerConnection)
public abstract void closeReceiveDgcCall()
throws java.io.IOException
java.io.IOExceptioncloseReceiveCall()
protected abstract void openSendResult(byte code)
throws java.io.IOException
code - Legal values are: RETURN_OK, RETURN_EXCEPTION,
RETURN_OK | RETURN_INTERRUPT, RETURN_EXCEPTION |
RETURN_INTERRUPT, RETURN_INTERNAL
java.io.IOExceptionConnection.RETURN_OK,
Connection.RETURN_EXCEPTION,
Connection.RETURN_INTERRUPT,
Connection.RETURN_INTERNAL
public final void openSendResult(boolean normalReturn)
throws java.io.IOException
Called from the skeleton to indicate the type of a remote method return. Either the result value , or the exception that is thrown from the server is marshaled back to the caller.
This method is called after the server implementation method returns.
This method belongs to the server-side skeleton interface of the connection.
normalReturn - true, if the server method returned
normally, false, if the server implementation method threw an
exception.
java.io.IOException
public void closeSendResult()
throws java.io.IOException
Connection cleanup. After this method completes, the next remote call can be unmarshaled from this connection object. This method is invoked after a remote method invocation has been completed and the result is marshaled back to the caller.
This method belongs to the server-side skeleton interface of the connection.
java.io.IOExceptiondispatch(boolean)
public void closeSendDgcResult()
throws java.io.IOException
java.io.IOExceptioncloseSendResult()
public void doSynchronized()
throws java.lang.Throwable
doBlocking()
method that is specified in the CallHandler.BlockingOperation interface.
doSynchronized in interface RMACallbackjava.lang.ThrowableRMACallback,
doBlocking()public void doBlocking()
doBlocking in interface CallHandler.BlockingOperationCallHandler.BlockingOperationpublic java.lang.Throwable getBlockingProblem()
getBlockingProblem in interface CallHandler.BlockingOperationCallHandler.BlockingOperationpublic boolean dispatchInterrupt()
CallHandler.BlockingOperationfalse, the interrupt will be signaled to the
waiting thread when it resumes operation.
dispatchInterrupt in interface CallHandler.BlockingOperationCallHandler.BlockingOperationpublic static final CallHandler getHandler()
public static final void releaseHandler(CallHandler handler)
public long getThreadID()
getThreadID in interface CallHandler.CallbackOperationCallHandler.CallbackOperationpublic void doCallback(boolean isCallback)
CallHandler.CallbackOperationCallHandler.BlockingOperation or wheter it is dispatched directly.
doCallback in interface CallHandler.CallbackOperationisCallback - is true if this is executed
as callback to a CallHandler.BlockingOperation.- See Also:
CallHandler.CallbackOperationpublic java.lang.Throwable getCallbackProblem()
CallHandler.CallbackOperationCallHandler.CallbackOperation.doCallback(boolean), or null is no excetion
was thrown. Since CallHandler.CallbackOperation.doCallback(boolean) does not
declare any exceptions to be thrown, it is expected to
always return silently and store any exception for later
processing.
getCallbackProblem in interface CallHandler.CallbackOperationCallHandler.CallbackOperation
public void dispatch(boolean useTID)
throws java.lang.Throwable
The dispatch() method is the main entry point
for incoming calls. This method is called after unmarshaling
the call header from the connection. It dispatches application
calls to the corresponding server reference object. After
looking up the server reference according to the object ID, the
connection is forwarded to the doApplicationCall()
method of the reference. After doApplicationCall()
returns, the connection is cleaned up through
closeSendResult().
java.lang.ThrowableRemoteServerRef.doApplicationCall(ServerConnection),
closeSendResult()
protected java.lang.Object doDGCCall(int methodId,
java.lang.Object argument)
throws java.lang.Throwable
java.lang.Throwable
protected void doAsyncDGCCall(int methodId,
java.lang.Object argument)
throws java.lang.Throwable
java.lang.Throwablepublic java.lang.String toStringMembers()
toStringMembers in class Connection
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||