HandlerMethod

public interface HandlerMethod<T, C extends MessageClass<?>, E extends MessageEnvelope<? extends Object, ? extends Object, ? extends Object>, R extends MessageClass<?>>

Describes a method that accepts a message and optionally its context.

Parameters

<T>

the type of the target object

<C>

the type of the incoming message class

<E>

the type of the MessageEnvelope wrapping the method arguments

<R>

the type of the produced message classes

Inheritors

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 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 abstract Success toSuccessfulOutcome(Object rawResult, T target, E handledSignal)
Converts the raw method result to a successful propagation outcome.