flex.messaging.client
Class FlexClient

java.lang.Object
  extended by flex.messaging.client.FlexClient
All Implemented Interfaces:
FlexSessionListener, MessageClientListener, flex.messaging.util.TimeoutCapable

public class FlexClient
extends Object
implements FlexSessionListener, MessageClientListener, flex.messaging.util.TimeoutCapable

Represents a Flex client application instance on the server.


Field Summary
static String FLEX_CLIENT_LOG_CATEGORY
          Log category for FlexClient related messages.
 
Method Summary
 void addClientAttributeListener(FlexClientAttributeListener listener)
          Adds a FlexClient attribute listener that will be notified when an attribute is added, removed or changed.
static void addClientCreatedListener(FlexClientListener listener)
          Adds a create listener that will be notified when new FlexClients are created.
 void addClientDestroyedListener(FlexClientListener listener)
          Adds a destroy listener that will be notified when the FlexClient is destroyed.
 Object getAttribute(String name)
          Returns the attribute bound to the specified name for the FlexClient, or null if no attribute is bound under the name.
 Enumeration getAttributeNames()
          Returns a snapshot of the names of all attributes bound to the FlexClient.
 List getFlexSessions()
          Returns a snapshot of the FlexSessions associated with the FlexClient when this method is invoked.
 String getId()
          Returns the unique Id for the FlexClient.
 List getMessageClients()
          Returns a snapshot of the MessageClients (subscriptions) associated with the FlexClient when this method is invoked.
 void invalidate()
          Invalidates the FlexClient.
 boolean isValid()
          Returns true if the FlexClient is valid; false if it has been invalidated.
 void removeAttribute(String name)
          Removes the attribute bound to the specified name for the FlexClient.
 void removeClientAttributeListener(FlexClientAttributeListener listener)
          Removes a FlexClient attribute listener.
static void removeClientCreatedListener(FlexClientListener listener)
          Removes a FlexClient created listener.
 void removeClientDestroyedListener(FlexClientListener listener)
          Removes a FlexClient destroyed listener.
 void setAttribute(String name, Object value)
          Binds an attribute value for the FlexClient under the specified name.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface flex.messaging.FlexSessionListener
sessionCreated, sessionDestroyed
 
Methods inherited from interface flex.messaging.MessageClientListener
messageClientCreated, messageClientDestroyed
 
Methods inherited from interface flex.messaging.util.TimeoutCapable
cancelTimeout, getLastUse, getTimeoutPeriod, setTimeoutFuture, timeout
 

Field Detail

FLEX_CLIENT_LOG_CATEGORY

public static final String FLEX_CLIENT_LOG_CATEGORY
Log category for FlexClient related messages.

See Also:
Constant Field Values
Method Detail

addClientCreatedListener

public static void addClientCreatedListener(FlexClientListener listener)
Adds a create listener that will be notified when new FlexClients are created.

Parameters:
listener - The listener to add.
See Also:
FlexClientListener

removeClientCreatedListener

public static void removeClientCreatedListener(FlexClientListener listener)
Removes a FlexClient created listener.

Parameters:
listener - The listener to remove.
See Also:
FlexClientListener

addClientAttributeListener

public void addClientAttributeListener(FlexClientAttributeListener listener)
Adds a FlexClient attribute listener that will be notified when an attribute is added, removed or changed. If the attribute implements FlexClientBindingListener, it will be notified before any FlexClientAttributeListeners are notified.

Parameters:
listener - The listener to add.

addClientDestroyedListener

public void addClientDestroyedListener(FlexClientListener listener)
Adds a destroy listener that will be notified when the FlexClient is destroyed. Listeners are notified after all attributes have been unbound from the FlexClient and any FlexClientBindingListeners and FlexClientAttributeListeners have been notified.

Parameters:
listener - The listener to add.
See Also:
FlexClientListener

getAttribute

public Object getAttribute(String name)
Returns the attribute bound to the specified name for the FlexClient, or null if no attribute is bound under the name.

Parameters:
name - The name the attribute is bound to.
Returns:
The attribute bound to the specified name.

getAttributeNames

public Enumeration getAttributeNames()
Returns a snapshot of the names of all attributes bound to the FlexClient.

Returns:
A snapshot of the names of all attributes bound to the FlexClient.

invalidate

public void invalidate()
Invalidates the FlexClient.


isValid

public boolean isValid()
Returns true if the FlexClient is valid; false if it has been invalidated.

Returns:
true if the FlexClient is valid; otherwise false.

getFlexSessions

public List getFlexSessions()
Returns a snapshot of the FlexSessions associated with the FlexClient when this method is invoked. This list is not guaranteed to remain consistent with the actual list of active FlexSessions associated with the FlexClient over time.

Returns:
A snapshot of the current list of FlexSessions associated with the FlexClient.

getMessageClients

public List getMessageClients()
Returns a snapshot of the MessageClients (subscriptions) associated with the FlexClient when this method is invoked. This list is not guaranteed to remain consistent with the actual list of active MessageClients associated with the FlexClient over time.

Returns:
A snapshot of the current list of MessageClients associated with the FlexClient.

getId

public String getId()
Returns the unique Id for the FlexClient.

Returns:
The unique Id for the FlexClient.

removeAttribute

public void removeAttribute(String name)
Removes the attribute bound to the specified name for the FlexClient.

Parameters:
name - The name of the attribute to remove.

removeClientAttributeListener

public void removeClientAttributeListener(FlexClientAttributeListener listener)
Removes a FlexClient attribute listener.

Parameters:
listener - The listener to remove.

removeClientDestroyedListener

public void removeClientDestroyedListener(FlexClientListener listener)
Removes a FlexClient destroyed listener.

Parameters:
listener - The listener to remove.
See Also:
FlexClientListener

setAttribute

public void setAttribute(String name,
                         Object value)
Binds an attribute value for the FlexClient under the specified name.

Parameters:
name - The name to bind the attribute under.
value - The value of the attribute.


Copyright © 2007 Adobe Systems Inc. All Rights Reserved.

 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/livecycle/es/sdkHelp/programmer/lcdsjavadoc/flex/messaging/client/FlexClient.html