com.sun.media.jsdt.event
Class SessionEvent

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

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

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

 - when a ByteArray has been created.
 - when a ByteArray has been destroyed.
 - when a Channel has been created.
 - when a Channel has been destroyed.
 - when a Token has been created.
 - when a Token has been destroyed.
 - when a Client has joined a Session.
 - when a Client has left a Session.
 - when a Client has been invited to join a Session.
 - when a Client has been expelled from a Session.
 - when a Session has been destroyed.
 

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

Field Summary
static int BYTEARRAY_CREATED
          The Session ByteArray created event type.
static int BYTEARRAY_DESTROYED
          The Session ByteArray destroyed event type.
static int CHANNEL_CREATED
          The Session Channel created event type.
static int CHANNEL_DESTROYED
          The Session Channel destroyed event type.
static int DESTROYED
          The Session destroyed event type.
static int EXPELLED
          The Session expelled event type.
static int INVITED
          The Session invited event type.
static int JOINED
          The Session joined event type.
static int LEFT
          The Session left event type.
static int TOKEN_CREATED
          The Session Token created event type.
static int TOKEN_DESTROYED
          The Session Token destroyed event type.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
SessionEvent(Session session, java.lang.String clientName, java.lang.String resourceName, int type)
           constructor for the SessionEvent class.
 
Method Summary
 java.lang.String getClientName()
           get the name of the Client that generated this event.
 java.lang.String getResourceName()
           get the name of the resource for this event.
 Session getSession()
           get the Session associated with this event.
 java.lang.String toString()
           toString print a short description of this Session 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

BYTEARRAY_CREATED

public static final int BYTEARRAY_CREATED
The Session ByteArray created event type.

BYTEARRAY_DESTROYED

public static final int BYTEARRAY_DESTROYED
The Session ByteArray destroyed event type.

CHANNEL_CREATED

public static final int CHANNEL_CREATED
The Session Channel created event type.

CHANNEL_DESTROYED

public static final int CHANNEL_DESTROYED
The Session Channel destroyed event type.

TOKEN_CREATED

public static final int TOKEN_CREATED
The Session Token created event type.

TOKEN_DESTROYED

public static final int TOKEN_DESTROYED
The Session Token destroyed event type.

JOINED

public static final int JOINED
The Session joined event type.

LEFT

public static final int LEFT
The Session left event type.

INVITED

public static final int INVITED
The Session invited event type.

EXPELLED

public static final int EXPELLED
The Session expelled event type.

DESTROYED

public static final int DESTROYED
The Session destroyed event type.
Constructor Detail

SessionEvent

public SessionEvent(Session session,
                    java.lang.String clientName,
                    java.lang.String resourceName,
                    int type)
constructor for the SessionEvent class. A new session event is generated for a client action within the given session.
Parameters:
session - the session in question.
clientName - the name of the client.
resourceName - the name of the resource within the session that the event affects.
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.

getResourceName

public java.lang.String getResourceName()
get the name of the resource for this event. The resource will be the ByteArray, Channel or Token that the been created or destroyed, or the Session that the Client has just joined, left, been invited to join or expelled from.
Returns:
the name of the resource for this event.

toString

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