A context object for lifecycle events.
A generalized callback for when all services are removed.
A service is a thing which can be started and stopped.
A service activator which contributes services to a batch.
Context provided to ServiceActivator instances at execution time.
A builder for an individual service in a
A service container which manages a set of running services.
A listener for notification of container shutdown.
A controller for a single service instance.
A listener for service lifecycle events.
A service registry.
The target of ServiceBuilder installations.
The start lifecycle context.
The stop lifecycle context.
An abstract service class which provides default implementations.
An abstract implementation of a service listener whose methods do nothing.
A service builder which delegates to another service builder.
A delegating container for things which depend on a service container rather than a specific target or registry instance.
An "insulated" view of a service registry which prevents access to other public methods on the delegate registry object.
An "insulated" view of a service target which prevents access to other public methods on the delegate target object.
A service listener which calls a callback once all of the services it was attached to have been removed.
A simple service activator context implementation.
The factory class for service containers.
Container shutdown information.
Service name class.
A mapper for service names which allows a service name or pattern to be correlated with a value.
A utility class for service actions.
A service listener which times service start.
An injection of a source value into a target injector.
A service which propagates a value from a dependency.
A service which returns the provided value, which is evaluated once per service start.
The dependency type.
The controller mode for a service.
A possible state for a service controller.
A fine-grained substate of the more general basic controller
A transition from one substate to another.
The inheritance type for a listener.
Exception used to indicate there was a circular dependency discovered during resolution.
An exception which is thrown when the given service is already registered.
Exception which is thrown when a required service is not found in the registry.
Base Exception class used for service registry issues.
A start exception, thrown when a service fails to start.
ServiceContainer.Factory#create(). To create services, implement the
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_DEMANDservices. 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
+1on U always.
PASSIVE- attempt to start immediately if all dependencies are up. Puts a load of
+1on U always.
ON_DEMAND- only start a service if demanded. Puts a load of
+1on 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.
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.