Class CommandDispatcherMarshaller<CC,MC>

java.lang.Object
org.wildfly.clustering.server.jgroups.dispatcher.CommandDispatcherMarshaller<CC,MC>
Type Parameters:
CC - the command execution context
MC - the marshalling context
All Implemented Interfaces:
CommandMarshaller<CC>

public class CommandDispatcherMarshaller<CC,MC> extends Object implements CommandMarshaller<CC>
Marshaller for commands.
Author:
Paul Ferraro
  • Constructor Details

    • CommandDispatcherMarshaller

      public CommandDispatcherMarshaller(ByteBufferMarshaller marshaller, Object id, MarshalledValueFactory<MC> factory)
      Creates a marshaller of dispatched commands.
      Parameters:
      marshaller - a byte buffer marshaller
      id - the dispatcher identifier
      factory - 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: CommandMarshaller
      Marshals the specified command to a byte[].
      Specified by:
      marshal in interface CommandMarshaller<CC>
      Type Parameters:
      R - the command return type
      E - the command execution exception type
      Parameters:
      command - a command
      Returns:
      a serialized command.
      Throws:
      IOException - if marshalling fails.