|
||||||||||
| 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
uka.karmi.stream.StreamClientConnection
Base class for all client-side connections in stream-based
technologies. A StreamClientConnection encapsulates an
input and an output stream for marshaling and unmarshaling method
arguments and results.
A connection is used on the client side by the stub to marshal the method arguments.
RemoteStub| Field Summary | |
(package private) StreamTechnology.CallBack |
cb
|
private DGCMarshalContext |
marshalContext
|
static int |
SIZE_HEADER
|
private DGCUnmarshalContext |
unmarshalContext
|
(package private) long |
unusedSince
Time stamp managed by the connection collector. |
| Fields inherited from class uka.karmi.rmi.ClientConnection |
handler, next, returnCode |
| 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 | |
StreamClientConnection(MarshalOutputStream snd,
MarshalInputStream rcv,
StreamTechnology.CallBack cb)
|
|
| Method Summary | |
void |
close()
|
void |
closeAsynchronousCall()
|
void |
closeExceptionally()
If an unmashaling problem occurs, this method is called form the sub to mark this connection as unusable. |
void |
closeReceiveDgcResult()
|
void |
closeReceiveResult()
Called after the result of the method invocation was unmarshaled and just before a received exception is thrown. |
void |
closeSendCall()
Submits the invocation to the remote server implementation. |
void |
closeSendDgcCall()
|
boolean |
openReceiveDgcResult()
|
boolean |
openReceiveResult()
Called by the generated stub method just before the return value is unmarshaled. |
void |
openSendAsynchronousCall()
|
void |
openSendCall()
Initializes the remote method invocation. |
private void |
reuseConnection()
|
private void |
sendHeader()
|
| Methods inherited from class uka.karmi.rmi.ClientConnection |
dispatchInterrupt, doBlocking, finishMigration, getBlockingProblem, getRemoteUTID, setContext, startMigration |
| Methods inherited from class uka.karmi.rmi.Connection |
toString, toStringMembers |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
private DGCUnmarshalContext unmarshalContext
private DGCMarshalContext marshalContext
long unusedSince
StreamTechnology.collectConnections()public static final int SIZE_HEADER
StreamTechnology.CallBack cb
| Constructor Detail |
public StreamClientConnection(MarshalOutputStream snd,
MarshalInputStream rcv,
StreamTechnology.CallBack cb)
| Method Detail |
public void close()
throws java.io.IOException
close in class JdkMarshalContextjava.io.IOException
public void openSendCall()
throws java.io.IOException
ClientConnectionInitializes 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.
openSendCall in class ClientConnectionjava.io.IOExceptionRemoteStub
public void openSendAsynchronousCall()
throws java.io.IOException
openSendAsynchronousCall in class ClientConnectionjava.io.IOException
private void sendHeader()
throws java.io.IOException
java.io.IOException
public void closeSendCall()
throws java.io.IOException
ClientConnectionThis method belongs to the client-side stub interface of the connection.
closeSendCall in class ClientConnectionjava.io.IOExceptionRemoteStub
public void closeSendDgcCall()
throws java.io.IOException
closeSendDgcCall in class ClientConnectionjava.io.IOExceptionClientConnection.closeSendCall()
public boolean openReceiveResult()
throws java.io.IOException,
java.lang.ClassNotFoundException
ClientConnectionCalled 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.
openReceiveResult in class ClientConnectiontrue if there was a normal return,
false if an exception was thrown.
java.io.IOException
java.lang.ClassNotFoundExceptionRemoteStub
public boolean openReceiveDgcResult()
throws java.io.IOException
java.io.IOException
public void closeReceiveResult()
throws RemoteException
ClientConnectionCalled 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.
closeReceiveResult in class ClientConnectionRemoteExceptionRemoteStub
public void closeAsynchronousCall()
throws RemoteException
closeAsynchronousCall in class ConnectionRemoteException
private void reuseConnection()
throws RemoteException
RemoteExceptionpublic void closeExceptionally()
ClientConnectionIf 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.
closeExceptionally in class ClientConnection
public void closeReceiveDgcResult()
throws RemoteException
closeReceiveDgcResult in class ClientConnectionRemoteExceptionClientConnection.closeReceiveResult()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||