at.spardat.xma.event.global
Class GlobalEvent

java.lang.Object
  extended byat.spardat.xma.event.global.GlobalEvent
All Implemented Interfaces:
java.io.Serializable

public class GlobalEvent
extends java.lang.Object
implements java.io.Serializable

A GlobalEvent is created and sent by GlobalEventManager. Sent events can than be polled (by GlobalEventManager) and be transmitted to server side or client side registered GlobalEventListener

Since:
version_number
See Also:
Serialized Form

Field Summary
static int RECIPIENT_ALL_CLIENTS
          The event is sent to all clients of all servers in the cluster.
static int RECIPIENT_ALL_CLIENTS_ALL_SERVERS
          The event is sent to all clients and servers in the cluster.
static int RECIPIENT_ALL_SERVERS
          The event is sent to all servers in the cluster.
static int RECIPIENT_BY_ID
          The event is sent only to a client identified by its session ID.
 
Method Summary
 boolean filterRecipient(int aRecipient)
          Returns true if this event is valid for the type of recipient of aRecipient.
 int getCount()
           
 long getExpiresMilliSec()
           
 java.lang.String getId()
           
 java.lang.String getName()
           
 java.util.Properties getProperties()
           
 java.lang.String getProperty(java.lang.String name)
           
 java.lang.String getProperty(java.lang.String name, java.lang.String defaultValue)
           
 boolean isEventForClient()
          is recipient RECIPIENT_ALL_CLIENTS
 boolean isEventForClient(java.lang.String idSession)
           
 boolean isEventForServer()
          is recipient RECIPIENT_ALL_SERVERS
 java.lang.Object setProperty(java.lang.String key, java.lang.String value)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RECIPIENT_BY_ID

public static final int RECIPIENT_BY_ID
The event is sent only to a client identified by its session ID. Can be '|' concatinated with the other constants.

See Also:
Constant Field Values

RECIPIENT_ALL_SERVERS

public static final int RECIPIENT_ALL_SERVERS
The event is sent to all servers in the cluster. Can be '|' concatinated with the other constants.

See Also:
Constant Field Values

RECIPIENT_ALL_CLIENTS

public static final int RECIPIENT_ALL_CLIENTS
The event is sent to all clients of all servers in the cluster. Can be '|' concatinated with the other constants.

See Also:
Constant Field Values

RECIPIENT_ALL_CLIENTS_ALL_SERVERS

public static final int RECIPIENT_ALL_CLIENTS_ALL_SERVERS
The event is sent to all clients and servers in the cluster. Concat of RECIPIENT_ALL_SERVERS | RECIPIENT_ALL_CLIENTS.

See Also:
Constant Field Values
Method Detail

getExpiresMilliSec

public long getExpiresMilliSec()
Returns:
Returns the expires.

getCount

public int getCount()
Returns:
Returns the id.

getName

public java.lang.String getName()
Returns:
Returns the name.

getProperties

public java.util.Properties getProperties()
Returns:
Returns the properties.

getId

public java.lang.String getId()
Returns:
unique ID
Since:
version_number

getProperty

public java.lang.String getProperty(java.lang.String name)
Parameters:
name -
Returns:
@since version_number

getProperty

public java.lang.String getProperty(java.lang.String name,
                                    java.lang.String defaultValue)
Parameters:
name -
defaultValue -
Returns:
the named property transmitted from xma caller
Since:
version_number

setProperty

public java.lang.Object setProperty(java.lang.String key,
                                    java.lang.String value)
Parameters:
key -
value -
Returns:
@since version_number

toString

public java.lang.String toString()

filterRecipient

public boolean filterRecipient(int aRecipient)
Returns true if this event is valid for the type of recipient of aRecipient.

Parameters:
aRecipient -
Returns:
@since version_number

isEventForServer

public boolean isEventForServer()
is recipient RECIPIENT_ALL_SERVERS

Returns:
@since version_number

isEventForClient

public boolean isEventForClient()
is recipient RECIPIENT_ALL_CLIENTS

Returns:
@since version_number

isEventForClient

public boolean isEventForClient(java.lang.String idSession)
Parameters:
idSession -
Returns:
true if it is an event for a client with the session id idSession.
Since:
version_number