com.sun.media.jsdt.event
Class TokenEvent

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--com.sun.media.jsdt.event.TokenEvent

public class TokenEvent
extends java.util.EventObject
implements com.sun.media.jsdt.impl.JSDTDebugFlags

The Token event. Token events are created for the following actions:

 - when a Token has been given from one Client to another.
 - when a Client has grabbed a Token.
 - when a Client has inhibited a Token.
 - when a Client has joined a Token.
 - when a Client has left a Token.
 - when a Client has released itself from a Token.
 - when a Client has requested a Token.
 - when a Client has been invited to join a Token.
 - when a Client has been expelled from a Token.
 

Since:
JSDT 1.0
Version:
1.5 - 7th January 1999
Author:
Rich Burridge
See Also:
Serialized Form

Field Summary
static int EXPELLED
          The Token expelled event type.
static int GIVEN
          The Token given event type.
static int GRABBED
          The Token grabbed event type.
static int INHIBITED
          The Token inhibited event type.
static int INVITED
          The Token invited event type.
static int JOINED
          The Token joined event type.
static int LEFT
          The Token left event type.
static int RELEASED
          The Token released event type.
static int REQUESTED
          The Token requested event type.
protected  Token token
          The token this event occured on.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
TokenEvent(Session session, java.lang.String clientName, Token token, int type)
           constructor for the TokenEvent class.
 
Method Summary
 java.lang.String getClientName()
           get the name of the Client that generated this event.
 Session getSession()
           get the Session associated with this event.
 Token getToken()
           get the name of the token for this event.
 java.lang.String toString()
           toString print a short description of this Token event.
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

GIVEN

public static final int GIVEN
The Token given event type.

GRABBED

public static final int GRABBED
The Token grabbed event type.

INHIBITED

public static final int INHIBITED
The Token inhibited event type.

JOINED

public static final int JOINED
The Token joined event type.

LEFT

public static final int LEFT
The Token left event type.

RELEASED

public static final int RELEASED
The Token released event type.

REQUESTED

public static final int REQUESTED
The Token requested event type.

INVITED

public static final int INVITED
The Token invited event type.

EXPELLED

public static final int EXPELLED
The Token expelled event type.

token

protected Token token
The token this event occured on.
Constructor Detail

TokenEvent

public TokenEvent(Session session,
                  java.lang.String clientName,
                  Token token,
                  int type)
constructor for the TokenEvent class. A new token event is generated for a client action for a specific token.
Parameters:
session - the session this channel belongs to.
clientName - the name of the client.
token - the token.
type - the type of event.
Method Detail

getSession

public Session getSession()
get the Session associated with this event.
Returns:
the Session associated with this event.

getClientName

public java.lang.String getClientName()
get the name of the Client that generated this event.
Returns:
the name of the Client that generated this event.

getToken

public Token getToken()
get the name of the token for this event.
Returns:
the name of the token for this event.

toString

public java.lang.String toString()
toString print a short description of this Token event.
Returns:
a String containing a description of this Token event.
Overrides:
toString in class java.util.EventObject
Since:
JSDT 1.3