T
- the service typepublic final class ValueInjectionService<T> extends Object implements Service<T>
NULL, NULL_VALUE
Constructor and Description |
---|
ValueInjectionService() |
Modifier and Type | Method and Description |
---|---|
Injector<T> |
getInjector()
Get the injector, which should be used to inject the dependency.
|
T |
getValue()
Get the actual value.
|
void |
start(StartContext context)
Start the service.
|
void |
stop(StopContext context)
Stop the service.
|
public void start(StartContext context) throws StartException
If the service start involves any activities that may block, the asynchronous mechanism
provided by the context
should be used. See the class javadoc
for details.
start
in interface Service<T>
context
- the context which can be used to trigger an asynchronous service startStartException
- if the service could not be started for some reasonpublic void stop(StopContext context)
If the service start involves any activities that may block, the asynchronous mechanism
provided by the context
should be used. See the class javadoc
for details.
public T getValue() throws IllegalStateException, IllegalArgumentException
getValue
in interface Value<T>
IllegalStateException
- if the value is time-sensitive and the current state does not allow retrieval.IllegalArgumentException
- when the value cannot be read due to misconfigurationCopyright © 2018 JBoss by Red Hat. All rights reserved.