Class CommandDispatcherMarshaller<CC,MC>
java.lang.Object
org.wildfly.clustering.server.jgroups.dispatcher.CommandDispatcherMarshaller<CC,MC>
- Type Parameters:
CC- the command execution contextMC- the marshalling context
- All Implemented Interfaces:
CommandMarshaller<CC>
Marshaller for commands.
- Author:
- Paul Ferraro
-
Constructor Summary
ConstructorsConstructorDescriptionCommandDispatcherMarshaller(ByteBufferMarshaller marshaller, Object id, MarshalledValueFactory<MC> factory) Creates a marshaller of dispatched commands. -
Method Summary
Modifier and TypeMethodDescription<R, E extends Exception>
ByteBufferMarshals the specified command to a byte[].
-
Constructor Details
-
CommandDispatcherMarshaller
public CommandDispatcherMarshaller(ByteBufferMarshaller marshaller, Object id, MarshalledValueFactory<MC> factory) Creates a marshaller of dispatched commands.- Parameters:
marshaller- a byte buffer marshallerid- the dispatcher identifierfactory- a marshalled value factory
-
-
Method Details
-
marshal
public <R, E extends Exception> ByteBuffer marshal(Command<R, ? super CC, E> command) throws IOException Description copied from interface:CommandMarshallerMarshals the specified command to a byte[].- Specified by:
marshalin interfaceCommandMarshaller<CC>- Type Parameters:
R- the command return typeE- the command execution exception type- Parameters:
command- a command- Returns:
- a serialized command.
- Throws:
IOException- if marshalling fails.
-