EventReactorMethod

public final class EventReactorMethod extends EventHandlerMethod<T, R> implements EventProducingMethod<T, C, E>

A wrapper for a method which reacts on events.

See also

Functions

Link copied to clipboard
Obtains the type of the incoming message class.

Inherited functions

Link copied to clipboard
public final Set<Attribute<? extends Object>> attributes()
Obtains the set of method attributes configured for this method.
Link copied to clipboard
Obtains a set of functions for getting method attributes by a raw method value.
Link copied to clipboard
protected void checkAttributesMatch(EventEnvelope event)
Ensures that the passed event matches the external attribute of the method annotation.
protected void checkAttributesMatch(E envelope)
Allows to make sure that the passed envelope matches the annotation attributes of a method.
Link copied to clipboard
public final void discoverAttributes()
Initializes attributes by obtaining values via functions provided by attributeSuppliers.
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 boolean equals(Object obj)
Link copied to clipboard
protected static Class<M> firstParamType<M extends Message>(Method handler)
Returns the class of the first parameter of the passed handler method object.
Link copied to clipboard
Returns a full name of the handler method.
Link copied to clipboard
protected Optional<Success> handleRejection(ThrowableMessage throwableMessage, T target, E origin)
Link copied to clipboard
public boolean handlesRejection()
Tells whether the handler method is for a rejection.
Link copied to clipboard
public int hashCode()
Link copied to clipboard
public DispatchOutcome invoke(T target, E envelope)
Feeds the given envelope to the given target and returns the outcome.
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
protected final boolean isPrivate()
Returns true if the method is declared private, false otherwise.
Link copied to clipboard
protected final boolean isPublic()
Returns true if the method is declared public, false otherwise.
Link copied to clipboard
public DispatchKey key()
Creates a handler method dispatch key out of the message class.
Link copied to clipboard
public EventAcceptingMethodParams parameterSpec()
Obtains the specification of parameters for this method.
Link copied to clipboard
Obtains parameters of the method.
Link copied to clipboard
public final Set<R> producedMessages()
Retrieves the message classes produced by this handler method.
Link copied to clipboard
protected Class<? extends M> rawMessageClass()
Link copied to clipboard
public final Method rawMethod()
Obtains the handling method.
Link copied to clipboard
public String toString()
Obtains the full name of the handler method.
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.