net.user1.union.core.event
Class ClientEvent

java.lang.Object
  extended by net.user1.union.core.event.BaseEvent
      extended by net.user1.union.core.event.ClientEvent
All Implemented Interfaces:
Event

public class ClientEvent
extends BaseEvent

ClientEvent is a simple data class used to pass information from a client to registered event-listeners when a client event occurs. The ClientEvent class also defines constants representing the available client events. To register for a client event, use the Client class's addEventListener() method.


Field Summary
static java.lang.String ATTRIBUTE_CHANGED
          Dispatched when a client attribute changes.
static java.lang.String ATTRIBUTE_REMOVED
          Dispatched when a client attribute is removed.
static java.lang.String SHUTDOWN
          Dispatched when a client is shutdown.
 
Fields inherited from class net.user1.union.core.event.BaseEvent
m_eventProperties
 
Constructor Summary
ClientEvent(Client client)
          Constructor.
ClientEvent(Client client, Attribute attribute)
           
 
Method Summary
 Attribute getAttribute()
          In ATTRIBUTE_CHANGED, and ATTRIBUTE_REMOVED events this returns the attribute involved in the event.
 Client getClient()
          For all events this returns the client involved in the event.
 
Methods inherited from class net.user1.union.core.event.BaseEvent
getProperty, isCanceled, preventDefault
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ATTRIBUTE_CHANGED

public static final java.lang.String ATTRIBUTE_CHANGED
Dispatched when a client attribute changes.

See Also:
Constant Field Values

ATTRIBUTE_REMOVED

public static final java.lang.String ATTRIBUTE_REMOVED
Dispatched when a client attribute is removed.

See Also:
Constant Field Values

SHUTDOWN

public static final java.lang.String SHUTDOWN
Dispatched when a client is shutdown.

See Also:
Constant Field Values
Constructor Detail

ClientEvent

public ClientEvent(Client client)
Constructor.


ClientEvent

public ClientEvent(Client client,
                   Attribute attribute)
Method Detail

getClient

public Client getClient()
For all events this returns the client involved in the event. Otherwise this returns null.

Returns:
the client involved in the event

getAttribute

public Attribute getAttribute()
In ATTRIBUTE_CHANGED, and ATTRIBUTE_REMOVED events this returns the attribute involved in the event.

Returns:
the attribute involved in the event


Copyright USER1 Subsystems Corporation - Tue Jan 28 2014, 05:05 PM -0500