com.apama.service.framework
Event ServiceFrameworkManager


The Service Framework Manager is used in conjunction with the ServiceInterface object to provide a two-phase startup mechanism for applications.

After all ServiceInterfaces have been created/injected, the Service Framework Manager waits for the user to activate the Service Framework (via the Activate() event). At that point, any instances of the Service Interface that need to be configured are called back.

Before activation, a user can send parameters for all Service Types or for a specific Service Type/Name instance (via the ServiceParameter() event). These parameters are passed to the service in the configuration request callback.

Only after all Service Interface instances have responded to the configuration request will the second-phase be started by the Service Framework Manager broadcasting an AllInitialServicesInitialised event to them all.

The Service Framework Manager manages the communication to all of the Service Interface instances that have been created. Users should not need to create this object, unless they want the Service Framework Manager to operate in a context other than main. A default monitor implementation is provided that will create an instance of the Service Framework Manager in the main context.

After the Service Framework Manager has been created, Users should not interact with object directly. All communication with the Service Framework Manager will be via an instance of the Service Interface.
Since:
SoFo 2.1.0
Version:
9.12
See Also:
com.apama.service.framework.ServiceInterface - The Service Interface object
com.apama.service.framework.ServiceParameters - The Service Parameters object
com.apama.config.Activate - The Service Framework activation request event
Sends:
com.apama.config.Activate - 
Listens:
com.apama.config.Activate - 
com.apama.service.framework.ServiceParameters - 

Member Summary
 dictionary<integer, dictionary<integer, context > >dependentServices
 listenerlistenInitialiseService
 listenerlistenRemoveService
 listenerlistenServiceParameters
 listenerlistenServiceConfigRequest
 dictionary<com.apama.service.framework.ServiceKey, integer >serviceKeyToId
 
Action Summary
 voiddelete()

Deletes an instance of the Service Framework Manager.
 voidinitialise(context mainCtx)

This action initialises an instance of the ServiceFrameworkManager, and creates all the listeners required for the Service Framework protocol.
 booleanisActivated()

Returns whether the Service Framework has been activated or not.
 
Member Detail

dependentServices

dictionary<integer, dictionary<integer, context > > dependentServices

listenInitialiseService

listener listenInitialiseService

listenRemoveService

listener listenRemoveService

listenServiceConfigRequest

listener listenServiceConfigRequest

listenServiceParameters

listener listenServiceParameters

serviceKeyToId

dictionary<com.apama.service.framework.ServiceKey, integer > serviceKeyToId

Action Detail

delete

void delete()
Deletes an instance of the Service Framework Manager.

initialise

void initialise(context mainCtx)
This action initialises an instance of the ServiceFrameworkManager, and creates all the listeners required for the Service Framework protocol.
Parameters:
mainCtx - A reference to the main Context.

isActivated

boolean isActivated()
Returns whether the Service Framework has been activated or not.
Returns:
Returns True, if the Service Framework was activated, False otherwise.