flex.messaging.services.messaging
Class RemoteSubscriptionManager

java.lang.Object
  extended by flex.management.ManageableComponent
      extended by flex.messaging.services.messaging.SubscriptionManager
          extended by flex.messaging.services.messaging.RemoteSubscriptionManager
All Implemented Interfaces:
Manageable, RemoveNodeListener, FlexComponent, FlexConfigurable

public class RemoteSubscriptionManager
extends SubscriptionManager
implements RemoveNodeListener

The RemoteSubscriptionManager monitors subscriptions from other servers, not other clients. One MessageClient instance is used for each remote server. It clientId is the address of the remote server. Using a separate instance of this class keeps the subscriptions of local clients separate from remote clients.


Field Summary
 
Fields inherited from class flex.messaging.services.messaging.SubscriptionManager
TYPE
 
Constructor Summary
RemoteSubscriptionManager(MessageDestination destination)
           
RemoteSubscriptionManager(MessageDestination destination, boolean enableManagement)
           
 
Method Summary
 void addSubscriber(String flexClientId, Object clientId, String selector, String subtopic)
           
 long getSessionTimeout()
           
 void removeClusterNode(Object address)
          Called when a cluster node gets removed.
 void removeSubscriber(String flexClientId, Object clientId, String selector, String subtopic, String endpoint)
           
 void setSessionTimeout(long sessionConfigValue)
           
 void setSubscriptionState(Object state, Object address)
          Takes the selector and subtopic list from this address and for each one create a RemoteSubscription which gets registered in this table.
 void waitForSubscriptions(Object addr)
          This method waits for some time for the receipt of the subscription state for the server with the given address.
 
Methods inherited from class flex.messaging.services.messaging.SubscriptionManager
addSubscriber, destroy, getMessageClient, getSubscriber, getSubscriberIds, getSubscriberIds, getSubscriberIds, getSubscriptionState, getSubscriptionTimeoutMillis, registerMessageClient, releaseMessageClient, removeSubscriber, removeSubscriber, setId, setSubscriptionTimeoutMillis
 
Methods inherited from class flex.management.ManageableComponent
getControl, getId, getParent, initialize, isManaged, isStarted, isValid, setControl, setManaged, setParent, start, stop
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteSubscriptionManager

public RemoteSubscriptionManager(MessageDestination destination)

RemoteSubscriptionManager

public RemoteSubscriptionManager(MessageDestination destination,
                                 boolean enableManagement)
Method Detail

setSessionTimeout

public void setSessionTimeout(long sessionConfigValue)

getSessionTimeout

public long getSessionTimeout()

addSubscriber

public void addSubscriber(String flexClientId,
                          Object clientId,
                          String selector,
                          String subtopic)

removeSubscriber

public void removeSubscriber(String flexClientId,
                             Object clientId,
                             String selector,
                             String subtopic,
                             String endpoint)

setSubscriptionState

public void setSubscriptionState(Object state,
                                 Object address)
Takes the selector and subtopic list from this address and for each one create a RemoteSubscription which gets registered in this table. We also register the remote subscription with a "per server" index so we can easily remove them later on.


waitForSubscriptions

public void waitForSubscriptions(Object addr)
This method waits for some time for the receipt of the subscription state for the server with the given address. If we fail to receive a message after waiting for the 5 seconds, a warning is printed.


removeClusterNode

public void removeClusterNode(Object address)
Called when a cluster node gets removed. We need to make sure that all subscriptions for this node are removed.

Specified by:
removeClusterNode in interface RemoveNodeListener


Copyright © 2008 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/blazeds/1/javadoc/flex/messaging/services/messaging/RemoteSubscriptionManager.html