public class DefaultContextDiscovery extends Object implements ContextDiscovery
ContextDiscovery.| Constructor and Description |
|---|
DefaultContextDiscovery(CommunicationAdapter communicationAdapter)
Instantiates a new default context discovery.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(ContextDiscoveryListener listener)
Adds the listener.
|
void |
clear()
Clear the discovered context information.
|
void |
discover(boolean doSearch)
Fill the context information repository.
|
<T extends AbstractContextDescriptor> |
getDeviceReferencesForInstanceIdentifiers(Class<T> descriptorClass,
List<InstanceIdentifier> ids)
Returns a list of device references that have been discovered in the network and that match at
least one element in the id list.
|
List<InstanceIdentifier> |
getDiscoveredContextIds()
Returns a list of instance identifiers that have been discovered in the network and that are
related to a context descriptor.
|
List<InstanceIdentifier> |
getDiscoveredEnsembleIds()
Returns a list of instance identifiers that have been discovered in the network and that are
related to an ensemble context descriptor.
|
<T extends AbstractContextDescriptor> |
getDiscoveredIdsForDescriptorType(Class<T> descriptorClass)
Returns a list of instance identifiers that have been discovered in the network and that are
related to the context descriptor class.
|
List<InstanceIdentifier> |
getDiscoveredLocationIds()
Returns a list of instance identifiers that have been discovered in the network and that are
related to a location context descriptor.
|
List<InstanceIdentifier> |
getDiscoveredPatientIds()
Returns a list of instance identifiers that have been discovered in the network and that are
related to a patient context descriptor.
|
List<ContextHelper.InstanceIdentifierWithType<AbstractContextDescriptor>> |
getInstanceIdentifiersForDeviceReferences(org.ws4d.java.service.reference.DeviceReference deviceReference)
Returns a list of ids with context descriptor type that are in the scope of the device.
|
void |
removeListener(ContextDiscoveryListener listener)
Removes the listener.
|
void |
updateWithEndpointInformation(org.ws4d.java.service.reference.DeviceReference deviceRef)
Update with endpoint information.
|
public DefaultContextDiscovery(CommunicationAdapter communicationAdapter)
communicationAdapter - the communication adapterpublic List<InstanceIdentifier> getDiscoveredContextIds()
ContextDiscoverygetDiscoveredContextIds in interface ContextDiscoverypublic <T extends AbstractContextDescriptor> List<InstanceIdentifier> getDiscoveredIdsForDescriptorType(Class<T> descriptorClass)
ContextDiscoverygetDiscoveredIdsForDescriptorType in interface ContextDiscoveryT - the generic typedescriptorClass - the descriptor classpublic List<InstanceIdentifier> getDiscoveredLocationIds()
ContextDiscoverygetDiscoveredLocationIds in interface ContextDiscoverypublic List<InstanceIdentifier> getDiscoveredPatientIds()
ContextDiscoverygetDiscoveredPatientIds in interface ContextDiscoverypublic List<InstanceIdentifier> getDiscoveredEnsembleIds()
ContextDiscoverygetDiscoveredEnsembleIds in interface ContextDiscoverypublic void updateWithEndpointInformation(org.ws4d.java.service.reference.DeviceReference deviceRef)
ContextDiscoveryupdateWithEndpointInformation in interface ContextDiscoverydeviceRef - the dev refpublic void clear()
ContextDiscoveryclear in interface ContextDiscoverypublic void discover(boolean doSearch)
ContextDiscoverydiscover in interface ContextDiscoverydoSearch - if true, a network discovery will be performed.public void addListener(ContextDiscoveryListener listener)
ContextDiscoveryaddListener in interface ContextDiscoverylistener - the listenerpublic void removeListener(ContextDiscoveryListener listener)
ContextDiscoveryremoveListener in interface ContextDiscoverylistener - the listenerpublic <T extends AbstractContextDescriptor> List<org.ws4d.java.service.reference.DeviceReference> getDeviceReferencesForInstanceIdentifiers(Class<T> descriptorClass, List<InstanceIdentifier> ids)
ContextDiscoverygetDeviceReferencesForInstanceIdentifiers in interface ContextDiscoveryT - the generic typedescriptorClass - the descriptor classids - the idspublic List<ContextHelper.InstanceIdentifierWithType<AbstractContextDescriptor>> getInstanceIdentifiersForDeviceReferences(org.ws4d.java.service.reference.DeviceReference deviceReference)
ContextDiscoverygetInstanceIdentifiersForDeviceReferences in interface ContextDiscoverydeviceReference - the device referenceCopyright © 2018. All rights reserved.