Interface CommandDispatcherFactory<M extends GroupMember>

Type Parameters:
M - the member type

public interface CommandDispatcherFactory<M extends GroupMember>
Factory for creating a command dispatcher.
Author:
Paul Ferraro
  • Method Summary

    Modifier and Type
    Method
    Description
    default <C> CommandDispatcher<M,C>
    Creates a new command dispatcher using the specified identifier and context.
    createCommandDispatcher(Object id, C context, ClassLoader loader)
    Creates a new command dispatcher using the specified identifier and context whose marshaller will be configured from the specified class loader.
    Returns the group upon which the this command dispatcher operates.
  • Method Details

    • getGroup

      Group<M> getGroup()
      Returns the group upon which the this command dispatcher operates.
      Returns:
      the group associated with this command dispatcher factory.
    • createCommandDispatcher

      default <C> CommandDispatcher<M,C> createCommandDispatcher(Object id, C context)
      Creates a new command dispatcher using the specified identifier and context. The resulting CommandDispatcher will communicate with those dispatchers within the group sharing the same identifier.
      Type Parameters:
      C - the command context type
      Parameters:
      id - a unique identifier for this dispatcher
      context - the context used for executing commands
      Returns:
      a new command dispatcher
    • createCommandDispatcher

      <C> CommandDispatcher<M,C> createCommandDispatcher(Object id, C context, ClassLoader loader)
      Creates a new command dispatcher using the specified identifier and context whose marshaller will be configured from the specified class loader. The resulting CommandDispatcher will communicate with those dispatchers within the group sharing the same identifier.
      Type Parameters:
      C - the command context type
      Parameters:
      id - a unique identifier for this dispatcher
      context - the context used for executing commands
      loader - the class loader used to load commands to be dispatched.
      Returns:
      a new command dispatcher