planet.behaviour
Interface Filter
- All Known Implementing Classes:
- IdleFilter
public interface Filter
This interface provides a method filter RouteMessages
before BehaviourPool attempt to match patterns. Filter can be viewed as
precondition handler which RouteMessage's has to satisfy.
- Author:
- Marc Sanchez
Method Summary |
boolean |
filter(RouteMessage msg,
Node node)
Given a RouteMessage and a Node as input, filter's method filters the
input RouteMessage if does not satisfy filter's precondition. |
java.lang.String |
getName()
|
java.lang.String |
toString()
|
filter
boolean filter(RouteMessage msg,
Node node)
- Given a RouteMessage and a Node as input, filter's method filters the
input RouteMessage if does not satisfy filter's precondition.
- Parameters:
msg
- RouteMessage taken as input.node
- Node taken as input.
- Returns:
- Returns either an array of RouteMessages or null when no messages
need to transmit this node.
getName
java.lang.String getName()
- Returns:
- Returns the name of the filter.
toString
java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
- Returns:
- Returns a string representation of the filter. In general, the toString
method returns a string that "textually represents" this behaviour. The result should
be a concise but informative representation that is easy for a person to read.