JBoss Modular Service Kernel API 1.0.0.GA

Package org.jboss.msc.service

The service container implementation itself.

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.States.
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.
 

Package org.jboss.msc.service Description

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:

State machine image

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:


JBoss Modular Service Kernel API 1.0.0.GA

Copyright © 2011 JBoss, a division of Red Hat, Inc.