flex.messaging.services
Class AbstractBootstrapService

java.lang.Object
  extended by flex.messaging.services.AbstractBootstrapService
All Implemented Interfaces:
Manageable, FlexComponent, FlexConfigurable, Service

public abstract class AbstractBootstrapService
extends Object
implements Service

The purpose of AbstractBootstrapService is to enable creation of dynamic services, destinations, and adapters. MessageBroker creates an instance of this class and calls initialize after all of the server components are created but right before they are started. MessageBroker also calls start as server starts and stop as server stops. Subclasses should have their dynamic component creation code in one of initialize, start, and stop methods depending on when they want their components to be created.


Constructor Summary
AbstractBootstrapService()
          Default constructor which is no-op.
 
Method Summary
 String getId()
          Returns the id of the AbstractBootstrapService.
 MessageBroker getMessageBroker()
          Returns the MessageBroker managing this AbstractBootstrapService.
abstract  void initialize(String id, ConfigMap properties)
          Called by the MessageBroker after all of the server components are created but right before they are started.
 boolean isManaged()
          Always unmanaged.
 void setId(String id)
          Sets the id of the AbstractBootstrapService.
 void setManaged(boolean enableManagement)
          Management is always disabled.
 void setMessageBroker(MessageBroker broker)
          Sets the MessageBroker managing this AbstractBootstrapService.
abstract  void start()
          Called by the MessageBroker as server starts.
abstract  void stop()
          Called by the MessageBroker as server stops.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface flex.messaging.services.Service
addDefaultChannel, addDestination, createDestination, describeService, getDefaultAdapter, getDefaultChannels, getDestination, getDestination, getDestinations, getRegisteredAdapters, registerAdapter, removeDefaultChannel, removeDestination, serviceCommand, serviceMessage, setDefaultAdapter, setDefaultChannels, unregisterAdapter
 
Methods inherited from interface flex.management.Manageable
getControl, setControl
 
Methods inherited from interface flex.messaging.FlexComponent
isStarted
 

Constructor Detail

AbstractBootstrapService

public AbstractBootstrapService()
Default constructor which is no-op.

Method Detail

getId

public String getId()
Returns the id of the AbstractBootstrapService.

Specified by:
getId in interface Service
Returns:
The id of the AbstractBootstrapService.

setId

public void setId(String id)
Sets the id of the AbstractBootstrapService. If the AbstractBootstrapService has a MessageBroker already assigned, it also updates the id in the MessageBroker.

Specified by:
setId in interface Service
Parameters:
id - The id for the service.

getMessageBroker

public MessageBroker getMessageBroker()
Returns the MessageBroker managing this AbstractBootstrapService.

Specified by:
getMessageBroker in interface Service
Returns:
MessageBroker of the AbstractBootstrapService.

setMessageBroker

public void setMessageBroker(MessageBroker broker)
Sets the MessageBroker managing this AbstractBootstrapService. Removes the AbstractService from the old broker (if there was one) and adds to the list of services in the new broker.

Specified by:
setMessageBroker in interface Service
Parameters:
broker - MessageBroker of the AbstractBootstrapService.

isManaged

public boolean isManaged()
Always unmanaged.

Specified by:
isManaged in interface Manageable
Returns:
false.

setManaged

public void setManaged(boolean enableManagement)
Management is always disabled.

Specified by:
setManaged in interface Manageable
Parameters:
enableManagement - true to enable management, false to disable management.

initialize

public abstract void initialize(String id,
                                ConfigMap properties)
Called by the MessageBroker after all of the server components are created but right before they are started. This is usually the place to create dynamic components.

Specified by:
initialize in interface FlexConfigurable
Parameters:
id - Id of the AbstractBootstrapService.
properties - Properties for the AbstractBootstrapService.

start

public abstract void start()
Called by the MessageBroker as server starts. Useful for custom code that needs to run after all the components are initialized and the server is starting up.

Specified by:
start in interface FlexComponent

stop

public abstract void stop()
Called by the MessageBroker as server stops. Useful for custom code that needs to run as the server is shutting down.

Specified by:
stop in interface FlexComponent


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/services/AbstractBootstrapService.html