uk.ac.man.cs.rainbow.rapa.data
Class Channel

java.lang.Object
  |
  +--uk.ac.man.cs.rainbow.rapa.data.Channel
All Implemented Interfaces:
Argument, Serializable

public class Channel
extends Object
implements Serializable, Argument

A channel upon which RAPA processes can communicate.

See Also:
Action, Serialized Form

Inner Class Summary
static class Channel.Adapter
          Null implementation of a channel listener.
static interface Channel.Listener
          Indicate that a class's objects might want to be told of events on channels.
 
Constructor Summary
Channel(String name)
           
 
Method Summary
 void addListener(Channel.Listener l)
          Register an object for receipt of channel event notifications.
 void compatableWith(Argument arg)
           
 boolean equals(Object o)
           
 int hashCode()
           
 void removeListener(Channel.Listener l)
          Unregister an object from receipt of channel event notifications.
 Channel subst(GeneralSubstitution s)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Channel

public Channel(String name)
Method Detail

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

compatableWith

public void compatableWith(Argument arg)
Specified by:
compatableWith in interface Argument
Following copied from interface: uk.ac.man.cs.rainbow.rapa.data.Argument
Throws:
CompatabilityFailure - If you are not allowed to map from this argument to the given one.

subst

public Channel subst(GeneralSubstitution s)

addListener

public final void addListener(Channel.Listener l)
Register an object for receipt of channel event notifications.
Parameters:
l - The listener object to register.

removeListener

public final void removeListener(Channel.Listener l)
Unregister an object from receipt of channel event notifications.
Parameters:
l - The listener object to unregister.