ist.palcom.contingency.manager
Interface IResourceDirectory

All Known Implementing Classes:
ResourceDirectory

public interface IResourceDirectory


Field Summary
static java.lang.String SERVICE_NAME
           
static java.lang.String URN_SUFFIX
           
 
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.
 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()
           
 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.
 

Field Detail

URN_SUFFIX

static final java.lang.String URN_SUFFIX
See Also:
Constant Field Values

SERVICE_NAME

static final java.lang.String SERVICE_NAME
See Also:
Constant Field Values
Method Detail

registerResourceListener

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.


unregisterResourceListener

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.


getDevices

java.util.List<Device> getDevices()
Get available devices cached in the Resource Directory.


getServices

java.util.List<Service> getServices()
Get available services cached in the Resource Directory


getAlternateDevices

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. This includes the device itself (when it is available). The device description to pass to this method depends on the used equivalence relation.

Parameters:
deviceEquivRelation - - equivalence relation to compare the devices
deviceDesc - - description of the requested device
Returns:
List of devices equivalent to the given device.

getAlternateServices

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. This includes the service itself (when it is available).

Parameters:
serviceEquivRelation - - equivalence relation to compare the devices
decl - - description of the requested service
Returns:
List of services equivalent to the given device.

getResourceDirectoryThread

PalcomThread getResourceDirectoryThread()
Returns a thread for receiving resource queries and requests for resource monitoring.

Returns:
The resource directory thread.

start

void start()
           throws java.io.IOException
Throws:
java.io.IOException

stop

void stop()
          throws java.io.IOException
Throws:
java.io.IOException