Rainbow
Class ChannelEvent

java.lang.Object
  |
  +--Rainbow.ChannelEvent
All Implemented Interfaces:
Serializable

public class ChannelEvent
extends Object
implements Serializable

An event on a channel.

See Also:
Serialized Form

Field Summary
static String ACKNOWLEDGE
          The end of a (concrete) transition.
static String BLOCKED
          A partial (abstract) transition.
 Object data
          What value was passed on the channel.
 String label
          Which channel was it.
static String REQUEST
          The start of a (concrete) transition.
 long time
          When did the event happen.
static String TRANSITION
          A complete (abstract) transition.
 String type
          What sort of event was it.
 
Constructor Summary
ChannelEvent(String type, String label, Object data, long time)
          Create a new channel event.
 
Method Summary
 boolean equals(Object o)
          Compares this event with the specified object.
 int hashCode()
          Return a hashcode for this event.
 String toString()
          Produce a human-readable representation of this event.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

REQUEST

public static final String REQUEST
The start of a (concrete) transition.

ACKNOWLEDGE

public static final String ACKNOWLEDGE
The end of a (concrete) transition.

TRANSITION

public static final String TRANSITION
A complete (abstract) transition.

BLOCKED

public static final String BLOCKED
A partial (abstract) transition.

type

public String type
What sort of event was it. Will be one of REQUEST, ACKNOWLEDGE, TRANSITION or BLOCKED and may be compared safely by pointer.

label

public String label
Which channel was it.

data

public Object data
What value was passed on the channel.

time

public long time
When did the event happen.
Constructor Detail

ChannelEvent

public ChannelEvent(String type,
                    String label,
                    Object data,
                    long time)
Create a new channel event.
Method Detail

toString

public String toString()
Produce a human-readable representation of this event.
Overrides:
toString in class Object

equals

public boolean equals(Object o)
Compares this event with the specified object. They will be equal precisely when the other object is an event and the (public) fields of both events are equal.
Overrides:
equals in class Object

hashCode

public int hashCode()
Return a hashcode for this event.
Overrides:
hashCode in class Object