EventReceivingClassDelegate

public class EventReceivingClassDelegate<T extends EventReceiver, P extends MessageClass<?>, M extends HandlerMethod<? extends Object, EventClass, ? extends Object, P>> extends ModelClass<T>

Helper object for storing information about methods and handlers of an event receiving class.

Parameters

<T>

the type of target objects that handle messages

<P>

the type of message classes produced by handler methods

<M>

the type of handler method objects

Inheritors

Constructors

Link copied to clipboard
public void EventReceivingClassDelegate(Class<T> delegatingClass, MethodSignature<M, ? extends Object> signature)
Creates new instance for the passed raw class with methods obtained through the passed factory.

Functions

Link copied to clipboard
public boolean contains(EventClass eventClass)
Link copied to clipboard
public ImmutableSet<EventClass> domesticEvents()
Obtains domestic event classes handled by the delegating class.
Link copied to clipboard
public ImmutableSet<StateClass> domesticStates()
Obtains domestic entity states to which the delegating class is subscribed.
Link copied to clipboard
public ImmutableSet<EventClass> events()
Obtains all event classes handled by the delegating class.
Link copied to clipboard
public ImmutableSet<EventClass> externalEvents()
Obtains external event classes handled by the delegating class.
Link copied to clipboard
public ImmutableSet<StateClass> externalStates()
Obtains external entity states to which the delegating class is subscribed.
Link copied to clipboard
public M handlerOf(EventClass eventClass, MessageClass<?> originClass)
Obtains the method which handles the passed event class.
Link copied to clipboard
public ImmutableSet<M> handlersOf(EventClass eventClass, MessageClass<?> originClass)
Obtains the method which handles the passed event class.
Link copied to clipboard
public ImmutableSet<P> producedTypes()
Obtains the classes of messages produced by handler methods of this class.

Inherited functions

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.