Package net.engio.mbassy.listener
Class MessageHandler
- java.lang.Object
-
- net.engio.mbassy.listener.MessageHandler
-
public class MessageHandler extends java.lang.Object
Any method in any class annotated with the @Handler annotation represents a message handler. The class that contains the handler is called a message listener and more generally, any class containing a message handler in its class hierarchy defines such a message listener.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MessageHandler.Properties
-
Field Summary
Fields Modifier and Type Field Description private boolean
acceptsSubtypes
private java.lang.String
condition
private IMessageFilter[]
filter
private java.lang.Class[]
handledMessages
private java.lang.reflect.Method
handler
private java.lang.Class<? extends HandlerInvocation>
invocation
private Invoke
invocationMode
private boolean
isEnvelope
private boolean
isSynchronized
private MessageListener
listenerConfig
private int
priority
-
Constructor Summary
Constructors Constructor Description MessageHandler(java.util.Map<java.lang.String,java.lang.Object> properties)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
acceptsSubtypes()
<A extends java.lang.annotation.Annotation>
AgetAnnotation(java.lang.Class<A> annotationType)
java.lang.String
getCondition()
IMessageFilter[]
getFilter()
java.lang.Class[]
getHandledMessages()
java.lang.Class<? extends HandlerInvocation>
getHandlerInvocation()
java.lang.reflect.Method
getMethod()
int
getPriority()
boolean
handlesMessage(java.lang.Class<?> messageType)
boolean
isAsynchronous()
boolean
isEnveloped()
boolean
isFiltered()
boolean
isFromListener(java.lang.Class listener)
boolean
isSynchronized()
boolean
useStrongReferences()
private void
validate(java.util.Map<java.lang.String,java.lang.Object> properties)
-
-
-
Field Detail
-
handler
private final java.lang.reflect.Method handler
-
filter
private final IMessageFilter[] filter
-
condition
private final java.lang.String condition
-
priority
private final int priority
-
invocation
private final java.lang.Class<? extends HandlerInvocation> invocation
-
invocationMode
private final Invoke invocationMode
-
isEnvelope
private final boolean isEnvelope
-
handledMessages
private final java.lang.Class[] handledMessages
-
acceptsSubtypes
private final boolean acceptsSubtypes
-
listenerConfig
private final MessageListener listenerConfig
-
isSynchronized
private final boolean isSynchronized
-
-
Method Detail
-
validate
private void validate(java.util.Map<java.lang.String,java.lang.Object> properties)
-
getAnnotation
public <A extends java.lang.annotation.Annotation> A getAnnotation(java.lang.Class<A> annotationType)
-
isSynchronized
public boolean isSynchronized()
-
useStrongReferences
public boolean useStrongReferences()
-
isFromListener
public boolean isFromListener(java.lang.Class listener)
-
isAsynchronous
public boolean isAsynchronous()
-
isFiltered
public boolean isFiltered()
-
getPriority
public int getPriority()
-
getMethod
public java.lang.reflect.Method getMethod()
-
getFilter
public IMessageFilter[] getFilter()
-
getCondition
public java.lang.String getCondition()
-
getHandledMessages
public java.lang.Class[] getHandledMessages()
-
isEnveloped
public boolean isEnveloped()
-
getHandlerInvocation
public java.lang.Class<? extends HandlerInvocation> getHandlerInvocation()
-
handlesMessage
public boolean handlesMessage(java.lang.Class<?> messageType)
-
acceptsSubtypes
public boolean acceptsSubtypes()
-
-