|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The Interceptor API provides callbacks for sending and receiving
specialized data along with remote calls made by this RMI
implementation. This is a powerful feature that must be carefully
used. The send(byte, ObjectOutput)
and receive(byte, ObjectInput)
implementations must be symmetric
between client and server interceptor implementations so as not to
corrupt the protocol used by this RMI implementation.
Additionally for performance reasons implementors of this interface should be careful to not send/receive too many bytes from since these callbacks are invoked for each remote method call made by this RMI implementation.
This interface is used on both the server and client
communication endpoints although client interceptors must implement
the ClientInterceptor
specialization in order to be Serializable
.
Server.Server(ClientInterceptor, Interceptor)
Field Summary |
Fields inherited from interface org.objectweb.carol.irmi.Constants |
DGC_PING, METHOD_CALL, METHOD_ERROR, METHOD_RESULT, SYSTEM_ERROR |
Method Summary | |
void |
receive(byte code,
ObjectInput in)
This method is invoked when a message is received from the server or client during a remote call. |
void |
send(byte code,
ObjectOutput out)
This method is invoked when a message is sent to the server or client during a remote call. |
Method Detail |
public void receive(byte code, ObjectInput in) throws IOException, ClassNotFoundException
Constants
interface. An ObjectInput instance is
provided for reading additional information included by a
corresponding send(byte, ObjectOutput)
implementation on the sending end of the message.
code
- indicates the type of message being receivedin
- available for reading interceptor specific protocol
data
IOException
- when there is an underlying communication
error with the ObjectInput
instance
ClassNotFoundException
- when there is an error
deserializing objects from the ObjectInput
instancespublic void send(byte code, ObjectOutput out) throws IOException
Constants
interface. An ObjectOutput
instance is
provided for sending additional information to the receive(byte, ObjectInput)
implementation on the
receiving end of the message.
code
- indicates the type of message being sentout
- available for sending output to the receiving
interceptor implementation
IOException
- when there is an underlyinc communication
error with the ObjectOutput
instance
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |