handlerOf

public H handlerOf(M messageClass, MessageClass<?> originClass)

Obtains a single handler method for messages of the given class and with the given origin.

If there is no handler matching both the message and origin class, a handler will be searched by the message class only.

Return

a handler method

Parameters

messageClass

the message class of the handled message

Throws

if no handler methods were found

if multiple handler methods were found


public H handlerOf(M messageClass)

Obtains a single handler method for messages of the given class.

If there is no such method or several such methods, an IllegalStateException is thrown.

Return

a handler method

Parameters

messageClass

the message class of the handled message

Throws

if no handler methods were found

if multiple handler methods were found