T
- The message type this handler can processpublic interface MessageHandler<T extends Message<?>>
Modifier and Type | Method and Description |
---|---|
default boolean |
canHandle(T message)
Indicates whether this handler can handle the given message
|
default Class<?> |
getTargetType()
Returns the instance type that this handler delegates to.
|
Object |
handle(T message)
Handles the given
message . |
Object handle(T message) throws Exception
message
.message
- The message to be processed.Exception
- any exception that occurs during message handlingdefault boolean canHandle(T message)
message
- The message to verifytrue
if this handler can handle the message, otherwise false
default Class<?> getTargetType()
Copyright © 2010–2019. All rights reserved.