Package org.jgroups.blocks
Class RpcDispatcher.MarshallerAdapter
java.lang.Object
org.jgroups.blocks.RpcDispatcher.MarshallerAdapter
- All Implemented Interfaces:
RpcDispatcher.Marshaller
,RpcDispatcher.Marshaller2
- Enclosing class:
RpcDispatcher
public static class RpcDispatcher.MarshallerAdapter
extends Object
implements RpcDispatcher.Marshaller2
Used to provide a Marshaller2 interface to a Marshaller. This class is for internal use only, and will be
removed in 3.0 when Marshaller and Marshaller2 get merged. Do not use, but provide an implementation of
Marshaller directly, e.g. in setRequestMarshaller().
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionobjectFromByteBuffer
(byte[] buf) objectFromByteBuffer
(byte[] buf, int offset, int length) objectToBuffer
(Object obj) Marshals the object into a byte[] buffer and returns a Buffer with a ref to the underlying byte[] buffer, offset and length.
Note that the underlying byte[] buffer must not be changed as this would change the buffer of a message which potentially can get retransmitted, and such a retransmission would then carry a ref to a changed byte[] buffer !byte[]
objectToByteBuffer
(Object obj)
-
Constructor Details
-
MarshallerAdapter
-
-
Method Details
-
objectToByteBuffer
- Specified by:
objectToByteBuffer
in interfaceRpcDispatcher.Marshaller
- Throws:
Exception
-
objectFromByteBuffer
- Specified by:
objectFromByteBuffer
in interfaceRpcDispatcher.Marshaller
- Throws:
Exception
-
objectToBuffer
Description copied from interface:RpcDispatcher.Marshaller2
Marshals the object into a byte[] buffer and returns a Buffer with a ref to the underlying byte[] buffer, offset and length.
Note that the underlying byte[] buffer must not be changed as this would change the buffer of a message which potentially can get retransmitted, and such a retransmission would then carry a ref to a changed byte[] buffer !- Specified by:
objectToBuffer
in interfaceRpcDispatcher.Marshaller2
- Parameters:
obj
-- Returns:
- Throws:
Exception
-
objectFromByteBuffer
- Specified by:
objectFromByteBuffer
in interfaceRpcDispatcher.Marshaller2
- Throws:
Exception
-