|
JBoss Modular Service Kernel API 1.0.0.Beta4-SNAPSHOT | |||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
Interface Summary | |
---|---|
BatchBuilder | A batch builder for installing service definitions in a single action. |
LifecycleContext | A context object for lifecycle events. |
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. |
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. |
Location | A location at which a service was defined. |
ServiceContainer.Factory | The factory class for service containers. |
ServiceLogger_$logger | Deprecated. Will be removed when the logger tooling is complete. |
ServiceName | Service name class. |
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. |
Enum Summary | |
---|---|
ServiceController.Mode | The controller mode for a service. |
ServiceController.State | A possible state for a service controller. |
Exception Summary | |
---|---|
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.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.REMOVE
- never start; in addition, remove the service as soon as it is down.
|
JBoss Modular Service Kernel API 1.0.0.Beta4-SNAPSHOT | |||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |