T
- the service typeService.newInstance(Consumer<T>,T
instead. This
class will be removed in a future release.@Deprecated public final class ValueService<T> extends Object implements Service<T>
NULL, NULL_VALUE
Constructor and Description |
---|
ValueService(Value<T> value)
Deprecated.
Construct a new instance.
|
Modifier and Type | Method and Description |
---|---|
T |
getValue()
Deprecated.
Get the actual dependency value.
|
void |
start(StartContext context)
Deprecated.
Start the service.
|
void |
stop(StopContext context)
Deprecated.
Stop the service.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
newInstance
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
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
getValue
in interface Value<T>
IllegalStateException
- if the value is time-sensitive and the current state does not allow retrieval.Copyright © 2019 JBoss by Red Hat. All rights reserved.