D
- the delegation object typepublic abstract static class RuntimeResource.DelegateRegisterer<D> extends Object implements RuntimeResource
RuntimeResource.DelegateRegisterer<D>
Constructor and Description |
---|
DelegateRegisterer() |
Modifier and Type | Method and Description |
---|---|
void |
cleanup(ResourceConfiguration configuration)
Finalizes this resource.
|
protected abstract String |
getClassNameKey()
Returns the configuration key of the delegation object class name.
|
protected abstract Class<? extends D> |
getInterfaceType()
Returns the interface type of the delegation object.
|
protected abstract void |
register(D delegate,
ResourceConfiguration configuration)
Registers the delegation object.
|
void |
setup(ResourceConfiguration configuration)
Initializes this resource.
|
protected abstract void |
unregister(D delegate,
ResourceConfiguration configuration)
Unregisters the delegation object.
|
protected abstract String getClassNameKey()
protected abstract Class<? extends D> getInterfaceType()
protected abstract void register(D delegate, ResourceConfiguration configuration) throws IOException, InterruptedException
delegate
- the delegation objectconfiguration
- the current configurationIOException
- if failed to register the object by I/O errorInterruptedException
- if interrupted while registering the objectprotected abstract void unregister(D delegate, ResourceConfiguration configuration) throws IOException, InterruptedException
delegate
- the delegation objectconfiguration
- the current configurationIOException
- if failed to unregister the object by I/O errorInterruptedException
- if interrupted while unregistering the objectpublic void setup(ResourceConfiguration configuration) throws IOException, InterruptedException
RuntimeResource
setup
in interface RuntimeResource
configuration
- the current configurationIOException
- if failed to initialize this resourceInterruptedException
- if interrupted while initializing this resourcepublic void cleanup(ResourceConfiguration configuration) throws IOException, InterruptedException
RuntimeResource
cleanup
in interface RuntimeResource
configuration
- the current configurationIOException
- if failed to finalizing this resourceInterruptedException
- if interrupted while finalizing this resourceCopyright © 2011–2019 Asakusa Framework Team. All rights reserved.