Oracle Communications Services Gatekeeper Java API Reference
7.0.0.1

E96578-01

com.bea.wlcp.wlng.api.plugin
Interface PluginServiceLifecycle

All Known Subinterfaces:
ManagedPluginService
All Known Implementing Classes:
AbstractManagedPlugin

public interface PluginServiceLifecycle

Interface that defines the lifecycle of a plug-in.

During startup the plug-in goes through these lifecycle events:

 (method -> STATE):
  init -> NEW
  doStarted -> STARTED
  doActivated -> ACTIVE (ADMIN)
  handleResuming -> ACTIVE (RUNNING)
 
During shutdown, the plug-in goes through these lifecycle events:
 (method -> STATE):
  handleSuspending/handleForceSuspending -> ACTIVE (ADMIN)
  doDeactivated -> STARTED
  doStopped -> NEW
 


Method Summary
abstract  void doActivated()
          The plug-in should continue activation and become visible without accepting traffic (register MBeans, etc).
abstract  void doDeactivated()
          The plug-in should deactivate itself (unregister MBeans etc).
abstract  void doStarted()
          The plug-in should perform as much initialization as possible without being externally visible (read config data, create internal object, initialize stores, etc).
abstract  void doStopped()
          The plug-in should clean up so it's available for garbage collection.
abstract  void handleForceSuspending()
          Called when a FORCE STOP/SHUTDOWN has been issued.
abstract  void handleResuming()
          Transitions the plug-in from ACTIVE (ADMIN) to ACTIVE (RUNNING) state where it begins to accept traffic.
abstract  void handleSuspending(CompletionBarrier barrier)
          Called in a normal re-deployment when the plug-in is taken from ACTIVE (RUNNING) to ACTIVE (ADMIN) state.
abstract  void init(java.lang.String id, PluginPool pool)
          Initializes the plug-in service with its id and a reference to its plug-in pool.
 

Method Detail

doActivated

public void doActivated()
                 throws DeploymentException
The plug-in should continue activation and become visible without accepting traffic (register MBeans, etc).

Throws:
DeploymentException - Exception during stop that will return the plug-in to STARTED state.

doDeactivated

public void doDeactivated()
                   throws DeploymentException
The plug-in should deactivate itself (unregister MBeans etc).

Throws:
DeploymentException - Exception during deactivate that will return the plug-in to STARTED state.

doStarted

public void doStarted()
               throws DeploymentException
The plug-in should perform as much initialization as possible without being externally visible (read config data, create internal object, initialize stores, etc).

Throws:
DeploymentException - Exception during start that will cause the plug-in to be returned to NEW state.

doStopped

public void doStopped()
               throws DeploymentException
The plug-in should clean up so it's available for garbage collection.

Throws:
DeploymentException - Exception during stop that will return the plug-in to the NEW state.

handleForceSuspending

public void handleForceSuspending()
Called when a FORCE STOP/SHUTDOWN has been issued. The plug-in shall make a best effort to close all network connections and clean up any resources used in order to minimize traffic loss. The plug-in transitions to the ACTIVE (ADMIN) state in which it should not process any traffic. It is up to the plug-in to transition all of its instances to the appropriate state.


handleResuming

public void handleResuming()
                    throws DeploymentException
Transitions the plug-in from ACTIVE (ADMIN) to ACTIVE (RUNNING) state where it begins to accept traffic. The plug-in should begin the communication toward the network in a protocol-specfic way. It is up to the plug-in to transition all of its instances to the appropriate state.

Throws:
DeploymentException - This causes the current plug-in and others that are part of the same communication service to fail the transition into ACTIVE (RUNNING) state.

handleSuspending

public void handleSuspending(CompletionBarrier barrier)
                      throws DeploymentException
Called in a normal re-deployment when the plug-in is taken from ACTIVE (RUNNING) to ACTIVE (ADMIN) state. Use the barrier to notify when all cleanup is done. The plug-in transitions to ADMIN state in which it should not process any traffic. It is up to the plug-in to transition all of its instances to the appropriate state. All the CompletionBarrierCllback objects must be obtained before this method returns. The actual completion can be signalled asynchronously.

Parameters:
barrier - Used to register for a callback object that later should be called asynchronously to indicate that the plug-in has completed all in-flight traffic and is ready to be undeployed.
Throws:
DeploymentException - In case of internal errors.

init

public void init(java.lang.String id,
                 PluginPool pool)
Initializes the plug-in service with its id and a reference to its plug-in pool.

Parameters:
id - The id for this plug-in service.
pool - The pool associated with this plug-in. It can be used to retrieve registered plug-in instances.

Oracle Communications Services Gatekeeper Java API Reference
7.0.0.1

E96578-01

Copyright © 2008, 2018, Oracle and/or its affiliates. All rights reserved.