flex.messaging
Class Destination

java.lang.Object
  extended byflex.management.ManageableComponent
      extended byflex.messaging.Destination
All Implemented Interfaces:
Manageable, Serializable

public class Destination
extends ManageableComponent
implements Serializable

The Destination class is a source and sink for messages sent through a service destination and uses an adapter to process messages.

See Also:
Serialized Form

Constructor Summary
Destination(Service service, DestinationSettings settings)
          Constructs a Destination instance for the passed Service using the passed settings.
Destination(Service service, DestinationSettings settings, boolean enableManagement)
          Constructs a Destination instance for the passed Service using the passed settings.
 
Method Summary
 ServiceAdapter getAdapter()
          Returns the ServiceAdapter for the Destination.
 String getId()
          Returns the id for the Destination.
 Service getService()
          Returns the Service managing this Destination.
 String getServiceType()
          Returns the Java class name for the Service managing this Destination.
 void initDestination()
          This method is called by the Service after the Destination is created and registered, allowing it to complete setup.
 boolean isBackendShared()
          The destination may be not clustered at all, may be clustered for channel failover and destination sharing, or it may be clustered for channel failover and also have a common backend, such as a common database or backend clustered JMS topic.
 boolean isClustered()
          The destination may be not clustered at all, may be clustered for channel failover only, or it may be clustered for channel failover and also have shared back ends.
 void setId(String id)
          Sets the id for the Destination.
protected  void setupDestinationControl(Service service)
          Invoked automatically to allow the Destination to setup its corresponding MBean control.
 
Methods inherited from class flex.management.ManageableComponent
getControl, isManaged, setControl, setManaged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Destination

public Destination(Service service,
                   DestinationSettings settings)
Constructs a Destination instance for the passed Service using the passed settings. The Destination is treated as manageable by default.

Parameters:
service - The Service managing this Destination.
settings - The settings for this Destination.

Destination

public Destination(Service service,
                   DestinationSettings settings,
                   boolean enableManagement)
Constructs a Destination instance for the passed Service using the passed settings.

Parameters:
service - The Service managing this Destination.
settings - The settings for this Destination.
enableManagement - true if the Destination is manageable; otherwise false.
Method Detail

initDestination

public void initDestination()
This method is called by the Service after the Destination is created and registered, allowing it to complete setup. Subclasses that override this method must call super.initDestination().


isClustered

public boolean isClustered()
The destination may be not clustered at all, may be clustered for channel failover only, or it may be clustered for channel failover and also have shared back ends. If the destination is clustered, regardless of whether or not it relies on a shared back end for cluster configuration, this method returns true.

Returns:
true if the Destination is clustered; otherwise false.

isBackendShared

public boolean isBackendShared()
The destination may be not clustered at all, may be clustered for channel failover and destination sharing, or it may be clustered for channel failover and also have a common backend, such as a common database or backend clustered JMS topic. If the destination is clustered and has a common backend to coordinate the cluster, this method returns true; otherwise it return false.

Returns:
true if the clustered Destination shares a common backend; otherwise false.

getId

public String getId()
Returns the id for the Destination.

Returns:
The id for the Destination.

setId

public void setId(String id)
Sets the id for the Destination.

Parameters:
id - The id for the Destination.

getService

public Service getService()
Returns the Service managing this Destination.

Returns:
The Service managing this Destination.

getServiceType

public String getServiceType()
Returns the Java class name for the Service managing this Destination.

Returns:
The Java class name for the Service manageing this Destination.

getAdapter

public ServiceAdapter getAdapter()
Returns the ServiceAdapter for the Destination.

Returns:
The ServiceAdapter for the Destination.

setupDestinationControl

protected void setupDestinationControl(Service service)
Invoked automatically to allow the Destination to setup its corresponding MBean control. Subclasses should override to setup and register their MBean control.

Parameters:
service - The Service that manages this Destination.


Copyright © 2006 Adobe Systems Inc. All Rights Reserved. (Updated August 2, 2006)

Take a survey