public abstract class AbstractResourceService extends AbstractGenericService<ResourceProvider,ResourceManager> implements ResourceService
ResourceService
. This skeleton
implementation provides an abstract builder mechanism to construct
instances of extended classes. It holds resource provider and manager.Modifier and Type | Class and Description |
---|---|
protected static class |
AbstractResourceService.AbstractBuilder<B extends AbstractResourceService.AbstractBuilder<B>>
An abstract builder for creating resource service instances.
|
AbstractGenericService.AbstractGenericBuilder<B extends AbstractGenericService.AbstractGenericBuilder<B,P,M>,P extends Provider,M extends Manager>
ResourceService.Builder
manager, provider
Modifier | Constructor and Description |
---|---|
protected |
AbstractResourceService(AbstractResourceService.AbstractBuilder<?> builder)
Constructor for use by subclasses.
|
Modifier and Type | Method and Description |
---|---|
ResourceManager |
getResourceManager()
Gets the resource manager.
|
ResourceProvider |
getResourceProvider()
Gets the resource provider.
|
checkRunning, checkState, checkState, equals, getName, hashCode, toString
addListener, awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, doStart, doStop, failureCause, isRunning, notifyFailed, notifyStarted, notifyStopped, startAsync, state, stopAsync
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
equals, hashCode
protected AbstractResourceService(AbstractResourceService.AbstractBuilder<?> builder)
public final ResourceProvider getResourceProvider()
getResourceProvider
in interface ResourceService
java.lang.IllegalStateException
- if the service is not runningpublic final ResourceManager getResourceManager()
getResourceManager
in interface ResourceService
java.lang.IllegalStateException
- if the service is not running