planet.symphony.behaviours
Class IdleFilter

java.lang.Object
  extended by planet.symphony.behaviours.IdleFilter
All Implemented Interfaces:
Filter

public class IdleFilter
extends java.lang.Object
implements Filter

IdleFilter class does not filter any RouteMessage.

Author:
Marc Sanchez

Constructor Summary
IdleFilter()
           
 
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()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IdleFilter

public IdleFilter()
Method Detail

filter

public 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.

Specified by:
filter in interface Filter
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

public java.lang.String getName()
Specified by:
getName in interface Filter
Returns:
Returns the name of the filter.

toString

public java.lang.String toString()
Specified by:
toString in interface Filter
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.