CommandingMethod

public interface CommandingMethod<T, M extends MessageClass<?>, E extends MessageEnvelope<? extends Object, ? extends Object, ? extends Object>> implements CommandProducingMethod<T, C, E>

Base interface for methods that generate one or more command messages in response to an incoming message.

Parameters

<T>

the type of the target object

<M>

the type of the message class

<E>

the type of the message envelope, in which the incoming message is wrapped

Inheritors

Inherited functions

Link copied to clipboard
public abstract Set<Attribute<? extends Object>> attributes()
Obtains the set of method attributes configured for this method.
Link copied to clipboard
public abstract void discoverAttributes()
Link copied to clipboard
public void ensureExternalMatch(boolean expectedValue)
Ensures that the external attribute of the method is the one expected.
Link copied to clipboard
public abstract Success fromEmpty(E handledSignal)
Creates success result from the empty result of the method execution.
Link copied to clipboard
public abstract DispatchOutcome invoke(T target, E envelope)
Invokes the method to handle message with the context.
Link copied to clipboard
public boolean isDomestic()
Tells if the passed method is domestic, that is not marked as external).
Link copied to clipboard
public boolean isExternal()
Tells if the passed method is external.
Link copied to clipboard
public DispatchKey key()
Creates a handler method dispatch key out of the message class.
Link copied to clipboard
public abstract C messageClass()
Obtains the type of the incoming message class.
Link copied to clipboard
public abstract MethodParams params()
Obtains parameters of the method.
Link copied to clipboard
public abstract Set<R> producedMessages()
Retrieves the message classes produced by this handler method.
Link copied to clipboard
public abstract Method rawMethod()
Obtains the handling method.
Link copied to clipboard
public Success toSuccessfulOutcome(Object rawResult, T target, E handledSignal)
Produces an outcome in case the command producing method call finished successfully.