EventProducingMethod

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

A HandlerMethod which produces events in response to a signal.

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

Inheritors

Functions

Link copied to clipboard
public Success toSuccessfulOutcome(Object rawResult, T target, E handledSignal)
Produces an outcome in case the event producing method call finished successfully.

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 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.