| Package | flex.messaging.services |
| Class | public class AbstractService |
| Inheritance | AbstractService ManageableComponent |
Service, which provides a convenient base for behavior and associations common to all Services.| Method | Defined By | ||
|---|---|---|---|
Constructs an unmanaged AbstractService. | AbstractService | ||
AbstractService(boolean enableManagement) Constructs an AbstractService with the indicated management. | AbstractService | ||
void addDefaultChannel(String id) Adds the channel to the list of channels of the AbstractService. | AbstractService | ||
void addDestination(Destination destination) Adds the Destination instance to the list of destinations known by the AbstractService. | AbstractService | ||
Destination createDestination(String id) Creates a Destination instance, sets its id, sets it manageable if the AbstractService that created it is manageable, and sets its Service to the AbstractService that created it. | AbstractService | ||
Returns a ConfigMap service properties that the client needs. | AbstractService | ||
![]() | |||
String getDefaultAdapter() Returns the id of the default adapter of the AbstractService. | AbstractService | ||
List getDefaultChannels() Returns the list of channel ids of the AbstractService. | AbstractService | ||
Returns the Destination that the Message targets. | AbstractService | ||
Destination getDestination(String id) Returns the Destination with the specified id or null if no Destination with id exists. | AbstractService | ||
Map getDestinations() Returns the Map of Destination ids and instances. | AbstractService | ||
![]() | String getId() Returns the id of the ManageableComponent. | ||
Returns the MessageBroker of the AbstractService. | AbstractService | ||
![]() | Returns the parent of the component. | ||
Map getRegisteredAdapters() Returns the adapters registered with the AbstractService. | AbstractService | ||
![]() | void initialize(String id, ConfigMap properties) Invoked to initialize the ManageableComponent. | ||
![]() | boolean isManaged() | ||
![]() | boolean isStarted() Returns if the component is started or not. | ||
![]() | boolean isValid() Returns if the component is valid. | ||
String registerAdapter(String id, String adapterClass) Registers the adapter with the AbstractService. | AbstractService | ||
boolean removeDefaultChannel(String id) Removes the channel from the list of channels for the AbstractService. | AbstractService | ||
Destination removeDestination(String id) Removes the Destination from the list of destinations known by the AbstractService. | AbstractService | ||
Object serviceCommand(CommandMessage message) | AbstractService | ||
Object serviceMessage(Message message) Processes messages by invoking the requested destination's adapter. | AbstractService | ||
![]() | void setControl(BaseControl control) | ||
void setDefaultAdapter(String id) Sets the default adapter of the AbstractService. | AbstractService | ||
void setDefaultChannels(List ids) Sets the channel list of the AbstractService. | AbstractService | ||
void setId(String id) Sets the id of the AbstractService. | AbstractService | ||
![]() | void setManaged(boolean enableManagement) Enables or disables management for the component. | ||
void setMessageBroker(MessageBroker broker) Sets the MessageBroker of the AbstractService. | AbstractService | ||
![]() | void setParent(Manageable parent) Sets the parent of the component. | ||
void start() Starts the service if its associated MessageBroker is started. | AbstractService | ||
void stop() The default implementation of this method stops all of the destinations of the service. | AbstractService | ||
String unregisterAdapter(String id) Unregistered the adapter with the AbstractService and set the default adapter to null if needed. | AbstractService | ||
| Constant | Defined By | ||
|---|---|---|---|
| LOG_CATEGORY [static] Log category for AbstractService. | AbstractService | ||
| LOG_CATEGORY_STARTUP_DESTINATION [static] Log category that captures startup information for service's destinations. | AbstractService | ||
| AbstractService | () |
public AbstractService()Constructs an unmanaged AbstractService.
| AbstractService | () |
public AbstractService(boolean enableManagement)Constructs an AbstractService with the indicated management.
enableManagement — true if the AbstractService is manageable; otherwise false. |
| addDefaultChannel | () |
public void addDefaultChannel(String id)Adds the channel to the list of channels of the AbstractService. MessageBroker has to know the channel. Otherwise, the channel is not added to the list.
Parameters
id — The id of the channel. |
| addDestination | () |
public void addDestination(Destination destination)Adds the Destination instance to the list of destinations known by the AbstractService. It also sets destination's service to this AbstractService instance. Note that Destination cannot be null, it cannot have a null id, and it cannot have an id of a Destination already registered with the AbstractService. Destination needs to be started if the AbstractService is already running.
Parameters
destination — The Destination instance to be added. |
| createDestination | () |
public Destination createDestination(String id)Creates a Destination instance, sets its id, sets it manageable if the AbstractService that created it is manageable, and sets its Service to the AbstractService that created it.
Parameters
id — The id of the Destination. |
The Destination instanced created. |
| describeService | () |
public ConfigMap describeService(Endpoint endpoint)Returns a ConfigMap service properties that the client needs. By default, it returns null. Subclasses can override to return properties relevant to their implementation.
Parameters
endpoint — Endpoint used to filter the destinations of the service. |
| ConfigMap of service properties. |
| getDefaultAdapter | () |
public String getDefaultAdapter()Returns the id of the default adapter of the AbstractService.
defaultAdapterId The id of the default adapter of the AbstractService. |
| getDefaultChannels | () |
public List getDefaultChannels()Returns the list of channel ids of the AbstractService.
| getDestination | () |
public Destination getDestination(Message message)Returns the Destination that the Message targets.
Parameters
message |
The Destination that the Message targets. |
MessageException — if no such Destination exists. |
| getDestination | () |
public Destination getDestination(String id)Returns the Destination with the specified id or null if no Destination with id exists.
Parameters
id — The id of the Destination. |
| getDestinations | () |
public Map getDestinations()Returns the Map of Destination ids and instances.
The Map of Destination ids and instances. |
| getMessageBroker | () |
public MessageBroker getMessageBroker()Returns the MessageBroker of the AbstractService.
MessageBroker of the AbstractService. |
| getRegisteredAdapters | () |
public Map getRegisteredAdapters()Returns the adapters registered with the AbstractService.
| The Map of adapter id and classes. |
| registerAdapter | () |
public String registerAdapter(String id, String adapterClass)Registers the adapter with the AbstractService.
Parameters
id — The id of the adapter. | |
adapterClass — The class of the adapter. |
| The previous adapter class that the id was associated with. |
| removeDefaultChannel | () |
public boolean removeDefaultChannel(String id)Removes the channel from the list of channels for the AbstractService.
Parameters
id — The id of the channel. |
true if the list contained the channel id. |
| removeDestination | () |
public Destination removeDestination(String id)Removes the Destination from the list of destinations known by the AbstractService.
Parameters
id — The id of the Destination. |
Previous Destination associated with the id. |
| serviceCommand | () |
| serviceMessage | () |
public Object serviceMessage(Message message)Processes messages by invoking the requested destination's adapter. Subclasses should provide their implementation.
Parameters
message |
| setDefaultAdapter | () |
public void setDefaultAdapter(String id)Sets the default adapter of the AbstractService.
Parameters
id — The id of the default adapter. |
| setDefaultChannels | () |
public void setDefaultChannels(List ids)Sets the channel list of the AbstractService. MessageBroker has to know the channels, otherwise they are not added to the list.
Parameters
ids — List of channel ids. |
| setId | () |
public void setId(String id)Sets the id of the AbstractService. If the AbstractService has a MessageBroker assigned, it also updates the id in the MessageBroker.
Parameters
id |
| setMessageBroker | () |
public void setMessageBroker(MessageBroker broker)Sets the MessageBroker of the AbstractService. Removes the AbstractService from the old broker (if there was one) and adds to the list of services in the new broker.
Parameters
broker — MessageBroker of the AbstractService. |
| start | () |
public void start()Starts the service if its associated MessageBroker is started. and if the service is not already running. The default implementation of this method starts all of the destinations of the service. If subclasses override, they must call super.start().
| stop | () |
public void stop()The default implementation of this method stops all of the destinations of the service. If subclasses override, they must call super.stop().
| unregisterAdapter | () |
public String unregisterAdapter(String id)Unregistered the adapter with the AbstractService and set the default adapter to null if needed.
Parameters
id — The id of the adapter. |
| The adapter class that the id was associated with. |
| LOG_CATEGORY | Constant |
public static final LOG_CATEGORYLog category for AbstractService.
| LOG_CATEGORY_STARTUP_DESTINATION | Constant |
public static final LOG_CATEGORY_STARTUP_DESTINATIONLog category that captures startup information for service's destinations.
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/livecycle/8.2/programLC/programmer/javadoc/flex/messaging/services/AbstractService.html