|
JBoss Modular Service Kernel API 1.0.0.GA | |||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
Interface Summary | |
---|---|
BatchServiceTarget | A ServiceTarget that provides removal of all services installed so far. |
LifecycleContext | A context object for lifecycle events. |
MultipleRemoveListener.Callback<T> | A generalized callback for when all services are removed. |
Service<T> | A service is a thing which can be started and stopped. |
ServiceActivator | A service activator which contributes services to a batch. |
ServiceActivatorContext | Context provided to ServiceActivator instances at execution time. |
ServiceBuilder<T> | A builder for an individual service in a ServiceTarget . |
ServiceContainer | A service container which manages a set of running services. |
ServiceContainer.TerminateListener | A listener for notification of container shutdown. |
ServiceController<S> | A controller for a single service instance. |
ServiceListener<S> | A listener for service lifecycle events. |
ServiceRegistry | A service registry. |
ServiceTarget | The target of ServiceBuilder installations. |
StartContext | The start lifecycle context. |
StopContext | The stop lifecycle context. |
Class Summary | |
---|---|
AbstractService<T> | An abstract service class which provides default implementations. |
AbstractServiceListener<S> | An abstract implementation of a service listener whose methods do nothing. |
DelegatingServiceBuilder<T> | A service builder which delegates to another service builder. |
DelegatingServiceContainer | A delegating container for things which depend on a service container rather than a specific target or registry instance. |
DelegatingServiceRegistry | An "insulated" view of a service registry which prevents access to other public methods on the delegate registry object. |
DelegatingServiceTarget | An "insulated" view of a service target which prevents access to other public methods on the delegate target object. |
MultipleRemoveListener<T> | A service listener which calls a callback once all of the services it was attached to have been removed. |
ServiceActivatorContextImpl | A simple service activator context implementation. |
ServiceContainer.Factory | The factory class for service containers. |
ServiceContainer.TerminateListener.Info | Container shutdown information. |
ServiceName | Service name class. |
ServiceNameMapper<V> | A mapper for service names which allows a service name or pattern to be correlated with a value. |
ServiceUtils | A utility class for service actions. |
TimingServiceListener | A service listener which times service start. |
ValueInjection<T> | An injection of a source value into a target injector. |
ValueInjectionService<T> | A service which propagates a value from a dependency. |
ValueService<T> | A service which returns the provided value, which is evaluated once per service start. |
Enum Summary | |
---|---|
ServiceBuilder.DependencyType | The dependency type. |
ServiceController.Mode | The controller mode for a service. |
ServiceController.State | A possible state for a service controller. |
ServiceController.Substate | A fine-grained substate of the more general basic controller ServiceController.State s. |
ServiceController.Transition | A transition from one substate to another. |
ServiceListener.Inheritance | The inheritance type for a listener. |
Exception Summary | |
---|---|
CircularDependencyException | Exception used to indicate there was a circular dependency discovered during resolution. |
DuplicateServiceException | An exception which is thrown when the given service is already registered. |
ServiceNotFoundException | Exception which is thrown when a required service is not found in the registry. |
ServiceRegistryException | Base Exception class used for service registry issues. |
StartException | A start exception, thrown when a service fails to start. |
The service container implementation itself. The service container is what coordinates the registry of services and
manages their installation and execution. To create a service container, see ServiceContainer.Factory#create()
.
To create services, implement the Service
interface.
Individual service instances are controlled using the ServiceController
interface. Service controllers follow
this strict internal state machine:
The green boxes represent states; the red boxes below them represent possible transitions. The "When:" condition must be satisfied before a transition is taken; if it is, then the asynchronous tasks listed under "Tasks:" are executed.
The variables are what determine when a transition may occur; any time a variable is changed, the conditions are checked to see if a transition can occur. The variables are as follows:
ON_DEMAND
services. If greater than zero,
a single "demand" is propagated to the dependency set (parents) of this service.start()
method, if any.ACTIVE
- attempt to start immediately, and request all parents (dependencies) to start as well by incrementing
their "demand" count (D). Puts a load of +1
on U always.PASSIVE
- attempt to start immediately if all dependencies are up. Puts a load of +1
on U always.ON_DEMAND
- only start a service if demanded. Puts a load of +1
on U only if D is greater than zero.NEVER
- never start. The value of U is not affected and not considered. The value of D is disregarded; if D was
greater than zero, then the existing "demand" on the dependency set (parents) is revoked and further "demands" are suppressed until this mode is left.REMOVE
- the same as NEVER
; in addition, remove the service as soon as it is down. The mode may not be changed again after setting
this mode.
|
JBoss Modular Service Kernel API 1.0.0.GA | |||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |