CommanderClass

public final class CommanderClass<C extends Commander> extends AbstractCommandHandlingClass<C, R, H> implements EventReceiverClass, CommandingClass

Provides information on message handling for a class of Commanders.

Parameters

<C>

the type of commanders

Functions

Link copied to clipboard
public static CommanderClass<C> asCommanderClass<C extends AbstractCommander>(Class<C> cls)
Link copied to clipboard
Obtains the method which reacts on the passed event class.
Link copied to clipboard
public static CommanderClass<C> delegateFor<C extends Commander>(Class<C> cls)
Link copied to clipboard
public ImmutableSet<EventClass> domesticEvents()
Obtains a set of domestic events which this class receives.
Link copied to clipboard
public ImmutableSet<EventClass> events()
Obtains a set of event classes which this class receives.
Link copied to clipboard
public ImmutableSet<EventClass> externalEvents()
Obtains a set of external events which this class receives.
Link copied to clipboard
public ImmutableSet<CommandClass> outgoingCommands()
Obtains the classes of commands produced by this commanding class.
Link copied to clipboard
public boolean producesCommandsOn(EventClass eventClass)
Tells if instances of this commander class produce commands in response to the passed event class.
Link copied to clipboard
public boolean substitutesCommand(CommandClass commandClass)
Tells if instances of this commander class substitute the commands of the passed class.

Inherited functions

Link copied to clipboard
public ImmutableSet<R> commandOutput()
Obtains classes of all messages produced as a result of command handling.
Link copied to clipboard
public ImmutableSet<CommandClass> commands()
Obtains classes of commands handled by the class.
Link copied to clipboard
protected static ModelClass<T> get<T, M extends ModelClass<T>>(Class<T> rawClass, Class<M> requestedModelClass, Supplier<ModelClass<T>> supplier)
Obtains the model class for the passed raw class.
Link copied to clipboard
public H handlerOf(CommandClass commandClass)
Obtains the handler method for the passed command class.
Link copied to clipboard
public ImmutableSet<EventClass> rejections()
Obtains classes of rejections that command handling methods of this class throw, or empty set if no rejections are thrown.