JBoss Modular Service Kernel API 1.0.0.Beta1

org.jboss.msc.service
Interface ServiceContainer


public interface ServiceContainer

A service container which manages a set of running services.

Author:
David M. Lloyd

Nested Class Summary
static class ServiceContainer.Factory
          The factory class for service containers.
 
Method Summary
 BatchBuilder batchBuilder()
          Get a new batch builder, which is used to resolve and install described services.
 ServiceController<?> getRequiredService(ServiceName serviceName)
           
 ServiceController<?> getService(ServiceName serviceName)
           
 void setExecutor(Executor executor)
          Set the container executor.
 void shutdown()
          Stop all services within this container.
 

Method Detail

setExecutor

void setExecutor(Executor executor)
Set the container executor. If null is specified, a default single-thread executor is used.

You must adhere to the following rules when setting an executor:

Parameters:
executor - the executor to use

shutdown

void shutdown()
Stop all services within this container.


batchBuilder

BatchBuilder batchBuilder()
Get a new batch builder, which is used to resolve and install described services.

Returns:
the new batch builder

getRequiredService

ServiceController<?> getRequiredService(ServiceName serviceName)
                                        throws ServiceNotFoundException
Throws:
ServiceNotFoundException

getService

ServiceController<?> getService(ServiceName serviceName)

JBoss Modular Service Kernel API 1.0.0.Beta1

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