|
||||||||||
| 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.ClientConnection
Connection objects represent the context of a remote method invocation. Stub and skeleton objects use connections to marshal and unmarshal method arguments and results.
StreamClientConnection| Field Summary | |
protected CallHandler |
handler
The call handler responsible for this connection. |
ClientConnection |
next
Implements list functionality. |
private java.lang.Throwable |
receivingProblem
|
protected byte |
returnCode
|
private MarshalOutput |
snd
The underlying marshal stream used to set migration options before starting a call. |
| 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 |
|
| Constructor Summary | |
ClientConnection(MarshalOutput snd,
MarshalInput rcv)
|
|
| Method Summary | |
abstract void |
closeExceptionally()
If an unmashaling problem occurs, this method is called form the sub to mark this connection as unusable. |
abstract void |
closeReceiveDgcResult()
|
abstract void |
closeReceiveResult()
Called after the result of the method invocation was unmarshaled and just before a received exception is thrown. |
abstract void |
closeSendCall()
Submits the invocation to the remote server implementation. |
abstract void |
closeSendDgcCall()
|
boolean |
dispatchInterrupt()
If a thread that waits for this blocking operation to complete is interrupted, this method is called to anounce the interrupt. |
void |
doBlocking()
|
void |
finishMigration()
|
java.lang.Throwable |
getBlockingProblem()
|
(package private) ClientConnection |
getOutOfOrderContext(byte cid,
int mid,
int oid,
long tid)
Creates a context for an out-of-order invocation along this connection. |
abstract UTID |
getRemoteUTID()
Returns an identifier for the technology, this connection is connected to. |
abstract boolean |
openReceiveResult()
Called by the generated stub method just before the return value is unmarshaled. |
abstract void |
openSendAsynchronousCall()
|
abstract void |
openSendCall()
Initializes the remote method invocation. |
void |
setContext(byte cid,
int oid,
int mid,
long tid)
|
void |
startMigration(java.lang.Object obj)
Start the remote object migration process for object obj. |
| Methods inherited from class uka.karmi.rmi.Connection |
closeAsynchronousCall, toString, toStringMembers |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public ClientConnection next
protected final CallHandler handler
CallHandler.dispatch(CallHandler.CallbackOperation)private MarshalOutput snd
protected byte returnCode
doBlocking()private java.lang.Throwable receivingProblem
getBlockingProblem()| Constructor Detail |
public ClientConnection(MarshalOutput snd,
MarshalInput rcv)
| Method Detail |
public abstract UTID getRemoteUTID()
getRemoteUTID() identifies
only the first hop of the connection.
ClientConnection getOutOfOrderContext(byte cid,
int mid,
int oid,
long tid)
throws RemoteException
RemoteException
public void setContext(byte cid,
int oid,
int mid,
long tid)
Technology.getContext(byte, int, int, long, UTID)public void startMigration(java.lang.Object obj)
obj. Object migration is implemented in KaRMI
directly. A remote object is migrated to another machine by
announcing the server implementation object (obj)
to the underlying marshal stream to prevent replacing this
object by a corresponding stub object during the next
call. After startMigration() has been called, the
given server implementation object can be passed as parameter
to a migration service call. This causes that the remote server
implementation is marshaled to the remote node, where it can be
re-exported as remote object. The service call can transmit a
remote reference to the migrated object as result. This remote
reference can be used to redirect future remote calls to the
remote server object to its new location.
obj - the object that should be migrated.public void finishMigration()
startMigration(Object)
public abstract void openSendCall()
throws java.io.IOException
Initializes the remote method invocation. This method is called by the stub just before marshaling the method arguments.
This method belongs to the client-side stub interface of the connection.
java.io.IOExceptionRemoteStub
public abstract void openSendAsynchronousCall()
throws java.io.IOException
java.io.IOException
public abstract void closeSendCall()
throws java.io.IOException
This method belongs to the client-side stub interface of the connection.
java.io.IOExceptionRemoteStub
public abstract void closeSendDgcCall()
throws java.io.IOException
java.io.IOExceptioncloseSendCall()
public abstract boolean openReceiveResult()
throws java.io.IOException,
java.lang.ClassNotFoundException
Called by the generated stub method just before the return value is unmarshaled. The result indicates whether the remote method invocation completed by returning a result or by throwing an exception. If an exception was thrown, it must be unmarshaled and rethrown from the stub method.
This method belongs to the client-side stub interface of the connection.
true if there was a normal return,
false if an exception was thrown.
java.io.IOException
java.lang.ClassNotFoundExceptionRemoteStub
public abstract void closeReceiveResult()
throws RemoteException
Called after the result of the method invocation was unmarshaled and just before a received exception is thrown. The call to this method informs the technology that the communication link can be reused by another call.
This method belongs to the client-side stub interface of the connection.
RemoteExceptionRemoteStubpublic abstract void closeExceptionally()
If an unmashaling problem occurs, this method is called form
the sub to mark this connection as unusable. During a remote
call either closeReceiveResult() or
closeExceptionally() is called.
This method declares no exceptions, because when it is called another exception is on the way. All other exceptions are less important and must be ignored.
This method belongs to the client-side stub interface of the connection.
public abstract void closeReceiveDgcResult()
throws RemoteException
RemoteExceptioncloseReceiveResult()public void doBlocking()
doBlocking in interface CallHandler.BlockingOperationCallHandler.BlockingOperationpublic java.lang.Throwable getBlockingProblem()
getBlockingProblem in interface CallHandler.BlockingOperationCallHandler.BlockingOperation
public boolean dispatchInterrupt()
throws RemoteException
CallHandler.BlockingOperationfalse, the interrupt will be signaled to the
waiting thread when it resumes operation.
dispatchInterrupt in interface CallHandler.BlockingOperationRemoteExceptionCallHandler.BlockingOperation
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||