Atavism Version 2018.1AGIS API

atavism.msgsys
Interface IFilter

All Known Subinterfaces:
IMessageTypeFilter, INamespaceFilter
All Known Implementing Classes:
EnginePlugin.TransferFilter, Filter, MessageTypeFilter, MessageTypeSessionIdFilter, NamespaceFilter, ObjectTracker.TrackerFilter, PerceptionFilter, PopulationFilter, PropertyFilter, SearchMessageFilter, SubjectFilter, SubObjectFilter, TargetFilter, WorldManagerPlugin.HostInstanceFilter, WorldManagerPlugin.LocationNamespaceFilter, WorldManagerPlugin.WorldManagerFilter, WorldManagerPlugin.WorldManagerTransferFilter

public interface IFilter

Subscription message filter base class. Filters have a list of matching 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.


Method Summary
 boolean applyFilterUpdate(FilterUpdate update, AgentHandle sender, SubscriptionHandle sub)
          Update the filter according to the instructions in udpate.
 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.
 boolean matchMessageType(java.util.Collection<MessageType> messageTypes)
          True if the given messageTypes intersects the filter's message types.
 boolean matchRemaining(Message message)
          True if the message matches the filter criteria.
 

Method Detail

matchMessageType

boolean matchMessageType(java.util.Collection<MessageType> messageTypes)
True if the given messageTypes intersects the filter's message types.


matchRemaining

boolean matchRemaining(Message message)
True if the message matches the filter criteria. The message type will already have been matched, so there's no need to check it again.


getMessageTypes

java.util.Collection<MessageType> getMessageTypes()
Returns the filter's message types.


applyFilterUpdate

boolean applyFilterUpdate(FilterUpdate update,
                          AgentHandle sender,
                          SubscriptionHandle sub)
Update the filter according to the instructions in udpate.


getSendFilterTable

FilterTable getSendFilterTable()
Returns filter table used to collect this kind of filter.

Returns:
null to force use of DefaultFilterTable.

getReceiveFilterTable

FilterTable getReceiveFilterTable()
Returns filter table used to collect this kind of filter.

Returns:
null to force use of DefaultFilterTable.

getResponderSendFilterTable

FilterTable getResponderSendFilterTable()
Returns filter table used to collect this kind of filter.

Returns:
null to force use of DefaultFilterTable.

getResponderReceiveFilterTable

FilterTable getResponderReceiveFilterTable()
Returns filter table used to collect this kind of filter.

Returns:
null to force use of DefaultFilterTable.


Copyright © 2018 Dragonsan Studios Sp. z o.o.