Package org.jboss.msc.service
Class ServiceContainer.Factory
- java.lang.Object
-
- org.jboss.msc.service.ServiceContainer.Factory
-
- Enclosing interface:
- ServiceContainer
public static class ServiceContainer.Factory extends Object
The factory class for service containers.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ServiceContainercreate()Create a new instance with a generated name and default thread pool.static ServiceContainercreate(boolean autoShutdown)Create a new instance with a generated name and default thread pool.static ServiceContainercreate(int coreSize, long keepAliveTime, TimeUnit keepAliveTimeUnit)Create a new instance with a generated name and specified initial thread pool settings.static ServiceContainercreate(int coreSize, long keepAliveTime, TimeUnit keepAliveTimeUnit, boolean autoShutdown)Create a new instance with a generated name and specified initial thread pool settings.static ServiceContainercreate(String name)Create a new instance with a given name and default thread pool.static ServiceContainercreate(String name, boolean autoShutdown)Create a new instance with a given name and default thread pool.static ServiceContainercreate(String name, int coreSize, long keepAliveTime, TimeUnit keepAliveTimeUnit)Create a new instance with a given name and specified initial thread pool settings.static ServiceContainercreate(String name, int coreSize, long keepAliveTime, TimeUnit keepAliveTimeUnit, boolean autoShutdown)Create a new instance with a given name and specified initial thread pool settings.
-
-
-
Method Detail
-
create
public static ServiceContainer create()
Create a new instance with a generated name and default thread pool.- Returns:
- a new service container instance
-
create
public static ServiceContainer create(String name)
Create a new instance with a given name and default thread pool.- Parameters:
name- the name of the new container- Returns:
- a new service container instance
-
create
public static ServiceContainer create(int coreSize, long keepAliveTime, TimeUnit keepAliveTimeUnit)
Create a new instance with a generated name and specified initial thread pool settings.- Parameters:
coreSize- the core pool size (must be greater than zero)keepAliveTime- the amount of time that non-core threads should linger without taskskeepAliveTimeUnit- the time unit forkeepAliveTime- Returns:
- a new service container instance
-
create
public static ServiceContainer create(String name, int coreSize, long keepAliveTime, TimeUnit keepAliveTimeUnit)
Create a new instance with a given name and specified initial thread pool settings.- Parameters:
name- the name of the new containercoreSize- the core pool size (must be greater than zero)keepAliveTime- the amount of time that non-core threads should linger without taskskeepAliveTimeUnit- the time unit forkeepAliveTime- Returns:
- a new service container instance
-
create
public static ServiceContainer create(boolean autoShutdown)
Create a new instance with a generated name and default thread pool.- Parameters:
autoShutdown-trueto automatically shut down the container at VM exit,falseotherwise- Returns:
- a new service container instance
-
create
public static ServiceContainer create(String name, boolean autoShutdown)
Create a new instance with a given name and default thread pool.- Parameters:
name- the name of the new containerautoShutdown-trueto automatically shut down the container at VM exit,falseotherwise- Returns:
- a new service container instance
-
create
public static ServiceContainer create(int coreSize, long keepAliveTime, TimeUnit keepAliveTimeUnit, boolean autoShutdown)
Create a new instance with a generated name and specified initial thread pool settings.- Parameters:
coreSize- the core pool size (must be greater than zero)keepAliveTime- the amount of time that non-core threads should linger without taskskeepAliveTimeUnit- the time unit forkeepAliveTimeautoShutdown-trueto automatically shut down the container at VM exit,falseotherwise- Returns:
- a new service container instance
-
create
public static ServiceContainer create(String name, int coreSize, long keepAliveTime, TimeUnit keepAliveTimeUnit, boolean autoShutdown)
Create a new instance with a given name and specified initial thread pool settings.- Parameters:
name- the name of the new containercoreSize- the core pool size (must be greater than zero)keepAliveTime- the amount of time that non-core threads should linger without taskskeepAliveTimeUnit- the time unit forkeepAliveTimeautoShutdown-trueto automatically shut down the container at VM exit,falseotherwise- Returns:
- a new service container instance
-
-