|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IResourceManager
User interface of the resource manager. The resource manager maintains a
central list of all resources (IResource) in the station.
Resources are registered at the resource manager as completely instantiated and fully operational objects. Resources can also potentially leave the system at any time when they become unavailable and are unregistered.
You can request for a specific resource using its unique name or query for resources that have certain capabilities.
| Method Summary | |
|---|---|
void |
addResourceListener(IResourceManagerListener listener)
Adds a listener to the resource manager. |
Collection<IResource> |
getAllResources()
Returns all registered resources. |
IResource |
getResource(String name)
Returns a registered resource with the given name in the local context. |
Collection<IResource> |
getResources(Class<?>... capabilities)
Returns every registered resource providing at least all the requested capabilities. |
Collection<IResource> |
getResources(Collection<Class<?>> capabilities)
Returns every registered resource providing at least the requested capabilities. |
void |
removeResourceListener(IResourceManagerListener listener)
Removes a previously registered listener from the resource manager. |
IResource |
tryGetResource(String name)
Returns a registered resource with the given name in the local context or null if no resource with such name is registered. |
| Method Detail |
|---|
Collection<IResource> getAllResources()
IResource getResource(String name)
throws ResourceNotRegisteredException
A ResourceNotRegisteredException is thrown if no resource with such name is registered.
name - the name of a resource
ResourceNotRegisteredException - if a resource with the given name is not registered.IResource tryGetResource(String name)
name - the name of a resource
Collection<IResource> getResources(Class<?>... capabilities)
A requested capability is searched only by direct implementations of the class. I.e. the capability should be registered at a resource under the specified interface, inheritance hierarchy of he implementing class will be ignored.
capabilities - a list of capabilities to look for. Double instances are
ignored.
Collection<IResource> getResources(Collection<Class<?>> capabilities)
A requested capability is searched only by direct implementations of the class. I.e. the capability should be registered at resource under the specified interface, inheritance hierarchy of he implementing class will be ignored.
capabilities - a list of capabilities to look for. Double instances are
ignored.
void addResourceListener(IResourceManagerListener listener)
listener - a listener to be registered for event notifications.void removeResourceListener(IResourceManagerListener listener)
listener - a listener to be removed from event notifications.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||