|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IResource
Base interface representing a resource.
A resource is a logical component of the system that is described by a unique name and by its capabilities. The capabilities represent what this resource can do and are fixed during runtime.
A logical component should be modeled as a separate resource X if one of the following statements apply:
Object| Method Summary | ||
|---|---|---|
Map<Class<?>,Object> |
getCapabilities()
Returns all capabilities of the resource. |
|
|
getCapability(Class<T> capability)
Returns the capability of this resource that is an instance of the given class. |
|
String |
getName()
Returns the unique name of this resource. |
|
boolean |
hasCapability(Class<?> capability)
Checks if the resource has the given capability. |
|
| Method Detail |
|---|
Map<Class<?>,Object> getCapabilities()
boolean hasCapability(Class<?> capability)
capability - a capability class
<T> T getCapability(Class<T> capability)
CapabilityNotAvailableException is thrown when the
resource does not have such a capability.
T - type of the returned capabilitycapability - a capability class
CapabilityNotAvailableExceptionString getName()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||