|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ResourceManager
Responsible for managing and creating a specific type of Resource
s from configuration documents.
Method Summary | |
---|---|
ResourceState<?> |
activate(String id)
Activates the resource with the given identifier. |
ResourceState<?> |
createResource(String id,
InputStream config)
Creates a new Resource (which is initially in state ResourceState.StateType.deactivated ). |
ResourceState<?> |
deactivate(String id)
Deactivates the resource with the given identifier. |
ResourceState<?> |
deleteResource(String id)
Removes the specified resource and deletes the corresponding configuration file. |
Class<? extends ResourceManager>[] |
getDependencies()
|
ResourceManagerMetadata |
getMetadata()
|
ResourceState<?> |
getState(String id)
Returns the state of the resource. |
ResourceState<?>[] |
getStates()
Returns the state of all resources. |
void |
shutdown()
Is called upon workspace shutdown. |
void |
startup(DeegreeWorkspace workspace)
Is called upon workspace startup. |
Method Detail |
---|
void startup(DeegreeWorkspace workspace) throws ResourceInitException
ResourceInitException
void shutdown()
Class<? extends ResourceManager>[] getDependencies()
ResourceManagerMetadata getMetadata()
ResourceState<?>[] getStates()
null
ResourceState<?> getState(String id)
id
- resource identifier, must not be null
null
(if the specified resource does not exist)ResourceState<?> activate(String id)
id
- resource identifier, must not be null
null
ResourceState<?> deactivate(String id)
id
- resource identifier, must not be null
null
ResourceState<?> createResource(String id, InputStream config) throws IllegalArgumentException
Resource
(which is initially in state ResourceState.StateType.deactivated
).
id
- resource identifier, must not be null
config
- provides the configuration file content, must not be null
ResourceState.StateType.deactivated
), never null
IllegalArgumentException
- if a resource with the specified identifier already existsResourceState<?> deleteResource(String id)
id
- resource identifier, must not be null
null
(if not, deletion failed)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |