public abstract class AbstractMessageHandler extends Object implements IMessageHandler
Constructor and Description |
---|
AbstractMessageHandler()
Create a new message handler.
|
AbstractMessageHandler(IFilter filter)
Create a new message handler.
|
AbstractMessageHandler(IFilter filter,
long timeout)
Create a new message handler.
|
AbstractMessageHandler(IFilter filter,
long timeout,
boolean remove)
Create a new message handler.
|
AbstractMessageHandler(long timeout)
Create a new message handler.
|
AbstractMessageHandler(long timeout,
boolean remove)
Create a new message handler.
|
Modifier and Type | Method and Description |
---|---|
IFilter |
getFilter()
Get the filter.
|
long |
getTimeout()
Get the timeout.
|
abstract void |
handleMessage(Map<String,Object> msg,
MessageType type)
Handle the message.
|
boolean |
isRemove()
Test if handler should be removed.
|
void |
setFilter(IFilter filter)
Set the filter.
|
void |
setRemove(boolean remove)
Set the remove.
|
void |
setTimeout(long timeout)
Set the timeout.
|
void |
timeoutOccurred()
Timeout occurred.
|
public AbstractMessageHandler()
public AbstractMessageHandler(long timeout)
public AbstractMessageHandler(long timeout, boolean remove)
public AbstractMessageHandler(IFilter filter)
public AbstractMessageHandler(IFilter filter, long timeout)
public AbstractMessageHandler(IFilter filter, long timeout, boolean remove)
public IFilter getFilter()
getFilter
in interface IMessageHandler
public void setFilter(IFilter filter)
filter
- The filter to set.public boolean isRemove()
isRemove
in interface IMessageHandler
public void setRemove(boolean remove)
remove
- The remove to set.public long getTimeout()
getTimeout
in interface IMessageHandler
public void setTimeout(long timeout)
timeout
- The timeout to set.public void timeoutOccurred()
timeoutOccurred
in interface IMessageHandler
public abstract void handleMessage(Map<String,Object> msg, MessageType type)
handleMessage
in interface IMessageHandler
msg
- The message.type
- The message type.Copyright © 2012. All Rights Reserved.