Overview | Package | Class | Use | Tree | Deprecated | Index | Help
|  | Oracle Corporation
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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

  Copyright © 2008 Oracle Corporation Systems, Inc. All Rights Reserved.

Method Summary
`void` | `doActivated()` The plug-in should continue activation and become visible without accepting traffic (register MBeans, etc).
`void` | `doDeactivated()` The plug-in should deactivate itself (unregister MBeans etc).
`void` | `doStarted()` The plug-in should perform as much initialization as possible without be externally visible (read config data, create internal object, initialize stores, etc).
`void` | `doStopped()` The plug-in should make all cleanup nessesary to be available for garbage collection.
`void` | `handleForceSuspending()` Called when a FORCE STOP/SHUTDOWN have been issued.
`void` | `handleResuming()` Transitions the plug-in from ACTIVE (ADMIN) to ACTIVE (RUNNING) state where it begins to accept traffic.
`void` | `handleSuspending(CompletionBarrier barrier)` Called in a normal re-deployment when the plug-in is taken from ACTIVE (RUNNING) to ACTIVE (ADMIN) state.
`void` | `init(String id, PluginPool pool)` Initializes the plug-in service with it's id and a reference to it's 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 be 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 make all cleanup nessesary to be available for garbage collection.

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

### handleForceSuspending

    public void handleForceSuspending()

  Called when a FORCE STOP/SHUTDOWN have been issued. The plug-in shall in a best effort close all network connections and clean up any resources used in order to minimize traffic loss. The plug-in transitions to ACTIVE (ADMIN) state in which is should not process any traffic. It is up to the plug-in to transition all of it's 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 it's 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 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 is should not process any traffic. It is up to the plug-in to transition all of it's instances to the appropriate state. All the CompletionBarrierCllback object must be obtained before this method returns. The actual completion could be saignaled asyncronously.

  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(String id,
                     PluginPool pool)

  Initializes the plug-in service with it's id and a reference to it's 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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
|  | Oracle Corporation
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD