|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.deegree.commons.config.AbstractBasicResourceManager
org.deegree.commons.config.AbstractResourceManager<T>
public abstract class AbstractResourceManager<T extends Resource>
| Field Summary | |
|---|---|
protected String |
name
|
protected HashMap<String,ExtendedResourceProvider<T>> |
nsToProvider
|
| Fields inherited from class org.deegree.commons.config.AbstractBasicResourceManager |
|---|
dir, idToState, workspace |
| Constructor Summary | |
|---|---|
AbstractResourceManager()
|
|
| Method Summary | |
|---|---|
ResourceState<T> |
activate(String id)
Activates the resource with the given identifier. |
protected void |
add(T resource)
Called when a new Resource has been successfully initialized. |
T |
create(String id,
URL configUrl)
Is used to obtain a resource instance from a configuration url and register it. |
ResourceState<T> |
deactivate(String id)
Deactivates the resource with the given identifier. |
T |
get(String id)
Is used to obtain a resource instance from an id. |
protected ExtendedResourceProvider<T> |
getProvider(File file)
|
protected ResourceState<T> |
processResourceConfig(File configFile)
Processes the given resource configuration file and returns the resulting resource state. |
protected void |
remove(String id)
|
protected void |
remove(T resource)
Called when a formerly active Resource is going to be destroyed. |
void |
shutdown()
Is called upon workspace shutdown. |
void |
startup(DeegreeWorkspace workspace)
Is called upon workspace startup. |
| Methods inherited from class org.deegree.commons.config.AbstractBasicResourceManager |
|---|
createResource, deleteResource, getState, getStates, init |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.deegree.commons.config.ExtendedResourceManager |
|---|
getMetadata, initMetadata |
| Methods inherited from interface org.deegree.commons.config.ResourceManager |
|---|
createResource, deleteResource, getDependencies, getState, getStates |
| Field Detail |
|---|
protected final HashMap<String,ExtendedResourceProvider<T extends Resource>> nsToProvider
protected String name
| Constructor Detail |
|---|
public AbstractResourceManager()
| Method Detail |
|---|
protected void add(T resource)
Resource has been successfully initialized.
resource - protected void remove(T resource)
Resource is going to be destroyed.
resource -
public T create(String id,
URL configUrl)
throws ResourceInitException
ExtendedResourceManagerResourceProvider.
create in interface ExtendedResourceManager<T extends Resource>id - the desired id of the new resourceconfigUrl - the configuration url of the new resource
ResourceInitException - if an error occurred while creating the resourcepublic T get(String id)
ExtendedResourceManager
get in interface ExtendedResourceManager<T extends Resource>public void shutdown()
ResourceManager
shutdown in interface ResourceManager
public void startup(DeegreeWorkspace workspace)
throws ResourceInitException
ResourceManager
startup in interface ResourceManagerResourceInitExceptionprotected ExtendedResourceProvider<T> getProvider(File file)
getProvider in class AbstractBasicResourceManagerprotected void remove(String id)
remove in class AbstractBasicResourceManager
protected ResourceState<T> processResourceConfig(File configFile)
throws IOException
This method does not update the resource / state maps.
configFile - configuration file, must not be null
null
IOException - if the resource filename is invalid / could not be processedpublic ResourceState<T> activate(String id)
ResourceManager
activate in interface ResourceManagerid - resource identifier, must not be null
nullpublic ResourceState<T> deactivate(String id)
ResourceManager
deactivate in interface ResourceManagerid - resource identifier, must not be null
null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||