wt.services
Interface Manager

All Superinterfaces:
NetFactor
All Known Subinterfaces:
ManagerService
All Known Implementing Classes:
StandardManager, StandardManagerService

public interface Manager
extends NetFactor

Standard interface to all managers. Managers are managed by a ManagerService. Implementations of Manager honor a protocal where Managers go through a lifecycle of statuses. Each implementation of a Manager must emit a prescribed set of events as it goes through its lifecycle.

Supported API: false

Extendable: false

See Also:
ManagerEvent, ManagerService, StandardManager

Field Summary
static String MANAGER_SERVICE
          Label for the attribute.
static String STARTUP_AUTOMATIC
          Indicates that the manager should start automatically.
static String STARTUP_MANUAL
          Indicates that the manager should only start on demand.
static int STATUS_EMERGENCY_SHUTDOWN
          Status when manager has performed an emergency shutdown.
static int STATUS_EMERGENCY_SHUTTING_DOWN
          Status when manager is in the process of an emergency shutdown.
static int STATUS_SHUTDOWN
          Status when manager is shut down. Status when manager is shut down.
static int STATUS_SHUTDOWN_ERRORS
          Status when manager has encountered errors while shutting down.
static int STATUS_SHUTDOWN_FAILURE
          Status when manager has failed to shut down..
static int STATUS_SHUTTING_DOWN
          Status when manager is in the process of shutting down.
static int STATUS_STARTED
          Status when manager is started.
static int STATUS_STARTED_ERRORS
          Status when manager has stared but errors were detected during startup.
static int STATUS_STARTING_UP
          Status when manager is starting up.
static int STATUS_STARTUP_FAILURE
          Status when manager has failed to honor a startup request.
 
Method Summary
 void emergencyShutdown()
          Manager emergency shutdown operation.
 ManagerService getManagerService()
          

Supported API: false
 int getManagerStatus()
          

Supported API: false
 String getName()
          

Supported API: false
 String getStartupType()
          

Supported API: false
 boolean isStarted()
          Determin if the manager is started Answers true if status is STATUS_STARTED or STATUS_STATUS_ERRORS.
 void registerEvents(ManagerService managerService)
          Register events with the passed ManagerService.
 void setManagerService(ManagerService managerService)
          

Supported API: false
 void shutdown()
          Manager shutdown operation.
 void startup()
          Template routine for starting up a service.
 
Methods inherited from interface wt.fc.NetFactor
getClassInfo, getConceptualClassname
 

Field Detail

STATUS_SHUTDOWN

public static final int STATUS_SHUTDOWN
Status when manager is shut down. Status when manager is shut down. Requests are not honored while shut down.

Supported API: false

See Also:
Constant Field Values

STATUS_STARTING_UP

public static final int STATUS_STARTING_UP
Status when manager is starting up. Requests are not honored while starting up.

Supported API: false

See Also:
Constant Field Values

STATUS_STARTED

public static final int STATUS_STARTED
Status when manager is started. Requests are honored while started.

Supported API: false

See Also:
Constant Field Values

STATUS_STARTED_ERRORS

public static final int STATUS_STARTED_ERRORS
Status when manager has stared but errors were detected during startup. Requests will be honored when in this state.

Supported API: false

See Also:
Constant Field Values

STATUS_STARTUP_FAILURE

public static final int STATUS_STARTUP_FAILURE
Status when manager has failed to honor a startup request. Requests are not honored in this state.

Supported API: false

See Also:
Constant Field Values

STATUS_SHUTTING_DOWN

public static final int STATUS_SHUTTING_DOWN
Status when manager is in the process of shutting down. Requests are not honored in this state.

Supported API: false

See Also:
Constant Field Values

STATUS_SHUTDOWN_ERRORS

public static final int STATUS_SHUTDOWN_ERRORS
Status when manager has encountered errors while shutting down. Requests are not honored in this state.

Supported API: false

See Also:
Constant Field Values

STATUS_SHUTDOWN_FAILURE

public static final int STATUS_SHUTDOWN_FAILURE
Status when manager has failed to shut down..

Supported API: false

See Also:
Constant Field Values

STATUS_EMERGENCY_SHUTTING_DOWN

public static final int STATUS_EMERGENCY_SHUTTING_DOWN
Status when manager is in the process of an emergency shutdown. This is a the state the manager may go into when an emergency shutdown is requested.

Supported API: false

See Also:
Constant Field Values

STATUS_EMERGENCY_SHUTDOWN

public static final int STATUS_EMERGENCY_SHUTDOWN
Status when manager has performed an emergency shutdown.

Supported API: false

See Also:
Constant Field Values

STARTUP_AUTOMATIC

public static final String STARTUP_AUTOMATIC
Indicates that the manager should start automatically.

Supported API: false

See Also:
Constant Field Values

STARTUP_MANUAL

public static final String STARTUP_MANUAL
Indicates that the manager should only start on demand.

Supported API: false

See Also:
Constant Field Values

MANAGER_SERVICE

public static final String MANAGER_SERVICE
Label for the attribute.

Supported API: false

See Also:
Constant Field Values
Method Detail

startup

public void startup()
             throws ManagerException
Template routine for starting up a service. This method calls the startingUp method which handles generating and synchronously dispatching an event to all listeners. Listeners may object to the startup by throwing a ManagerException.

This is a template method and should generally not be overridden. Typically the method performStartupProcess sshould be overridden by subclasses.

Manager startup operation. Generally this operation changes the manager status from:

STATUS_SHUTDOWN -> STATUS_STARTING -> STATUS_STARTED.

Supported API: false

Throws:
ManagerException

shutdown

public void shutdown()
              throws ManagerException
Manager shutdown operation.

Generally this operation changes the manager status from:

STATUS_STARTED -> STATUS_SHUTTING_DOWN -> STATUS_SHUTDOWN

Template routine for shutting down a service. This method calls the shuttingDown method which handles generating and synchronously dispatching an event to all listeners. Listeners may object to the shutdown by throwing a ManagerException.

This is a template method and should generally not be overridden. Typically the method performShutdownProcess should be overridden by subclasses.

Supported API: false

Throws:
ManagerException

emergencyShutdown

public void emergencyShutdown()
                       throws ManagerException
Manager emergency shutdown operation. This request can't be refused.

Template routine for emergency shutdown of a manager. This method calls the emergencyShuttingDown method which handles generating and synchronously dispatching an event to all listeners. Listeners may not object to this operation.

This is a template method and should generally not be overridden. Typically the method performEmergencyShutdownProcess should be overridden by subclasses.

Supported API: false

Throws:
ManagerException

isStarted

public boolean isStarted()
Determin if the manager is started Answers true if status is STATUS_STARTED or STATUS_STATUS_ERRORS.

Supported API: false

Returns:
boolean

registerEvents

public void registerEvents(ManagerService managerService)
Register events with the passed ManagerService. The default method does nothing, subclasses should provide an overriding implementation.

Supported API: false

Parameters:
managerService - the ManagerService with which to register events.

setManagerService

public void setManagerService(ManagerService managerService)


Supported API: false

Parameters:
managerService -

getName

public String getName()


Supported API: false

Returns:
String

getStartupType

public String getStartupType()


Supported API: false

Returns:
String

getManagerStatus

public int getManagerStatus()


Supported API: false

Returns:
int

getManagerService

public ManagerService getManagerService()


Supported API: false

Returns:
ManagerService