|
JBoss Modular Service Kernel API 1.0.0.Beta1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.msc.services.LifecycleService<T>
T - the target typepublic final class LifecycleService<T>

A service which calls lifecycle methods on a POJO-style object.
| Field Summary |
|---|
| Fields inherited from interface org.jboss.msc.service.Service |
|---|
NULL, NULL_VALUE |
| Constructor Summary | |
|---|---|
LifecycleService(Value<T> target,
Method startMethod,
List<Value<?>> startParams,
Method stopMethod,
List<Value<?>> stopParams)
Construct a new instance. |
|
LifecycleService(Value<T> target,
Value<Method> startMethod,
List<Value<?>> startParams,
Value<Method> stopMethod,
List<Value<?>> stopParams)
Construct a new instance. |
|
| Method Summary | |
|---|---|
T |
getValue()
Get the actual value. |
void |
start(StartContext context)
Start the service. |
void |
stop(StopContext context)
Stop the service. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LifecycleService(Value<T> target,
Method startMethod,
List<Value<?>> startParams,
Method stopMethod,
List<Value<?>> stopParams)
target - the target object valuestartMethod - the start method to call, if anystartParams - the start method parameters to passstopMethod - the stop method to call, if anystopParams - the stop method parameters to pass
public LifecycleService(Value<T> target,
Value<Method> startMethod,
List<Value<?>> startParams,
Value<Method> stopMethod,
List<Value<?>> stopParams)
target - the target object valuestartMethod - the start method to call, if anystartParams - the start method parameters to passstopMethod - the stop method to call, if anystopParams - the stop method parameters to pass| Method Detail |
|---|
public void start(StartContext context)
throws StartException
start in interface Service<T>context - the context which can be used to trigger an asynchronous service start
StartException - if the service could not be started for some reasonpublic void stop(StopContext context)
stop in interface Service<T>context - the context which can be used to trigger an asynchronous service stop
public T getValue()
throws IllegalStateException
getValue in interface Value<T>IllegalStateException - if the value is time-sensitive and the current state does not allow retrieval.
|
JBoss Modular Service Kernel API 1.0.0.Beta1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||