|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectist.palcom.services.AbstractService
ist.palcom.contingency.manager.ResourceDirectory
public class ResourceDirectory
ResourceDirectory is an entity that caches the resources currently visible from the device where the resource directory resides. Further it can be queried for the available resources or requested to listen for the pop up or disappearance of the resource or its alternate.
| Field Summary |
|---|
| Fields inherited from class ist.palcom.services.AbstractService |
|---|
_node, connectionsMonitor, context, info, siid |
| Fields inherited from interface ist.palcom.contingency.manager.IResourceDirectory |
|---|
SERVICE_NAME, URN_SUFFIX |
| Fields inherited from interface ist.palcom.hgraph.IHgraphNode |
|---|
CHILD_NAME_CLASH, CIRCULARITY_CLASH, COMMAND_OR_NODE_MISSING, ERROR, HANDLER_MISSING, INVOKATOR_MISSING, LISTENER_MISSING, NODE_NOT_CHILD, PATH_MISSING, SIBLING_ALREADY_EXISTS, SIBLING_NONEXISTENT, SIBLING_REFERENCE_ALREADY_EXISTS, SIBLING_REFERENCE_NONEXISTENT, STATUS_OK, VALUE_ALREADY_EXISTS, VALUE_NOT_PRESENT |
| Constructor Summary | |
|---|---|
ResourceDirectory(DeviceContext context,
java.lang.String serviceName)
|
|
| Method Summary | |
|---|---|
java.util.List<Device> |
getAlternateDevices(SameResourceTypeRelation deviceEquivRelation,
java.lang.Object deviceDesc)
Return the list of devices that are equivalent to the given device according to the specified equivalence relation. |
java.util.List<Service> |
getAlternateServices(SameResourceTypeRelation serviceEquivRelation,
SingleServiceDecl decl)
Return the list of services that are equivalent to the given service according to the specified equivalence relation. |
java.util.List<Device> |
getDevices()
Get available devices cached in the Resource Directory. |
PalcomThread |
getResourceDirectoryThread()
Returns a thread for receiving resource queries and requests for resource monitoring. |
ServiceID |
getServiceID()
|
java.util.List<Service> |
getServices()
Get available services cached in the Resource Directory |
void |
registerResourceListener(ResourceEventType eventType,
ResourceQuery query,
PalcomThread listener)
Register a listener for the occurence of a particular event type (resource pop up/resource disappearance) on the given resource. |
void |
start()
Start the service. |
void |
stop()
|
void |
unregisterResourceListener(ResourceEventType eventType,
URN urn)
Unregister a listener for the occurence of a particular event type (resource pop up/resource disappearance) on the given resource. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ResourceDirectory(DeviceContext context,
java.lang.String serviceName)
throws java.io.IOException
java.io.IOException| Method Detail |
|---|
public ServiceID getServiceID()
getServiceID in class AbstractService
public void registerResourceListener(ResourceEventType eventType,
ResourceQuery query,
PalcomThread listener)
IResourceDirectory
registerResourceListener in interface IResourceDirectory
public void unregisterResourceListener(ResourceEventType eventType,
URN urn)
IResourceDirectory
unregisterResourceListener in interface IResourceDirectorypublic java.util.List<Device> getDevices()
IResourceDirectory
getDevices in interface IResourceDirectorypublic java.util.List<Service> getServices()
IResourceDirectory
getServices in interface IResourceDirectory
public java.util.List<Device> getAlternateDevices(SameResourceTypeRelation deviceEquivRelation,
java.lang.Object deviceDesc)
IResourceDirectory
getAlternateDevices in interface IResourceDirectorydeviceEquivRelation - - equivalence relation to compare the devicesdeviceDesc - - description of the requested device
public java.util.List<Service> getAlternateServices(SameResourceTypeRelation serviceEquivRelation,
SingleServiceDecl decl)
IResourceDirectory
getAlternateServices in interface IResourceDirectoryserviceEquivRelation - - equivalence relation to compare the devicesdecl - - description of the requested service
public PalcomThread getResourceDirectoryThread()
getResourceDirectoryThread in interface IResourceDirectory
public void start()
throws java.io.IOException
AbstractService
start in interface IResourceDirectorystart in class AbstractServicejava.io.IOException
public void stop()
throws java.io.IOException
stop in interface IResourceDirectorystop in class AbstractServicejava.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||