public abstract class Filter extends java.lang.Object implements IFilter
MessageTypes
and optionally provide their own
FilterTable
.
Sub-classes must implement matchMessageType
,
getMessageTypes()
, and matchRemaining
.
Sub-classes must also provide a no argument constructor to be
compatible with atavism marshalling.
Constructor and Description |
---|
Filter() |
Modifier and Type | Method and Description |
---|---|
boolean |
applyFilterUpdate(FilterUpdate update)
Update the filter according to the instructions in
udpate . |
boolean |
applyFilterUpdate(FilterUpdate update,
AgentHandle sender,
SubscriptionHandle sub)
Update the filter according to the instructions in
udpate . |
abstract java.util.Collection<MessageType> |
getMessageTypes()
Returns the filter's message types.
|
FilterTable |
getReceiveFilterTable()
Returns filter table used to collect this kind of filter.
|
FilterTable |
getResponderReceiveFilterTable()
Returns filter table used to collect this kind of filter.
|
FilterTable |
getResponderSendFilterTable()
Returns filter table used to collect this kind of filter.
|
FilterTable |
getSendFilterTable()
Returns filter table used to collect this kind of filter.
|
abstract boolean |
matchMessageType(java.util.Collection<MessageType> messageTypes)
True if the given
messageTypes intersects the filter's
message types. |
abstract boolean |
matchRemaining(Message message)
True if the
message matches the filter criteria. |
protected java.lang.String |
toStringInternal() |
public abstract boolean matchMessageType(java.util.Collection<MessageType> messageTypes)
messageTypes
intersects the filter's
message types.matchMessageType
in interface IFilter
public abstract boolean matchRemaining(Message message)
message
matches the filter criteria. The
message type will already have been matched, so there's no need
to check it again.matchRemaining
in interface IFilter
public abstract java.util.Collection<MessageType> getMessageTypes()
getMessageTypes
in interface IFilter
public boolean applyFilterUpdate(FilterUpdate update, AgentHandle sender, SubscriptionHandle sub)
udpate
.applyFilterUpdate
in interface IFilter
public boolean applyFilterUpdate(FilterUpdate update)
udpate
.public FilterTable getSendFilterTable()
getSendFilterTable
in interface IFilter
DefaultFilterTable
.public FilterTable getReceiveFilterTable()
getReceiveFilterTable
in interface IFilter
DefaultFilterTable
.public FilterTable getResponderSendFilterTable()
getResponderSendFilterTable
in interface IFilter
DefaultFilterTable
.public FilterTable getResponderReceiveFilterTable()
getResponderReceiveFilterTable
in interface IFilter
DefaultFilterTable
.protected java.lang.String toStringInternal()