public interface ServiceReference extends Reference
Service references are registered in the DeviceServiceRegistry. There should only be
one service reference for each service. Global service listening can be initiated by registration
via ServiceReferenceEventRegistry.registerServiceListening(ServiceListener) , the method
ServiceReferenceEventRegistry.unregisterServiceListening(ServiceListener) removes service
listening.
| Modifier and Type | Field and Description |
|---|---|
static boolean |
SUPPRESS_GET_METADATA_IF_POSSIBLE_DEFAULT |
LOCATION_LOCAL, LOCATION_REMOTE, LOCATION_UNKNOWN| Modifier and Type | Method and Description |
|---|---|
boolean |
containsAllPortTypes(QNameSet portTypes)
Returns
true only in case this service reference provides all port types listed
within argumentportTypes. |
void |
dispose() |
Iterator |
getEprInfos()
Gets
EprInfos. |
Iterator |
getMetadataLocations()
Returns an iterator over the set of
URI instances pointing at the addresses of the
target service's metadata description locations (i.e. |
Iterator |
getMetadataReferences()
Returns an iterator over the set of
EndpointReference instances pointing at the
locations of the target service's metadata descriptions (i.e. |
EndpointReference |
getParentDeviceEndpointReference()
Returns the parent device endpoint reference of the device which hosts the service, if the
device is known.
|
int |
getPortTypeCount()
Returns the number of port types for this service reference.
|
Iterator |
getPortTypes()
Gets service port types.
|
SecurityKey |
getSecurityKey() |
Service |
getService()
Gets present service of reference.
|
URI |
getServiceId()
Returns the service ID (unique within the scope of its parent device).
|
Iterator |
getWSDLs()
Returns an iterator over the set of
WSDL instances describing the target service. |
boolean |
isServiceObjectExisting()
Returns whether the service is build up or not.
|
boolean |
isSuppressGetMetadataIfPossible() |
void |
reset()
Resets this service reference, i.e.
|
void |
setSecurityKey(SecurityKey newKey) |
void |
setSuppressGetMetadataIfPossible(boolean suppressGetMetadataIfPossible)
Set suppressGetMetadataIfPossible to decide if a get metadata message to a service should be
suppressed if the related hosted block of the parent device contains at least one type and all
contained types can be retrieved form the WSDLRepository.
|
getComManId, getLocation, getPreferredXAddressstatic final boolean SUPPRESS_GET_METADATA_IF_POSSIBLE_DEFAULT
boolean isSuppressGetMetadataIfPossible()
setSuppressGetMetadataIfPossible(boolean
suppressGetMetadataIfPossible)void setSuppressGetMetadataIfPossible(boolean suppressGetMetadataIfPossible)
suppressGetMetadataIfPossible - Service getService() throws CommunicationException
DescriptionRepository or by sending a
get metadata message.CommunicationException - This exception is thrown if the remote service doesn't answer to the get metadata message, which tries to
receive the necessary data to build up the service. The timeout value can be configured in the DispatchingProperties via the method DispatchingProperties.setResponseWaitTime(int).Iterator getEprInfos()
EprInfos. In DPWS the address contained in an endpoint reference is a transport
address.Iterator getPortTypes()
QName.int getPortTypeCount()
boolean containsAllPortTypes(QNameSet portTypes)
true only in case this service reference provides all port types listed
within argumentportTypes.portTypes - the port types to check this service reference fortrue if all port types are provided by this service reference, false otherwiseURI getServiceId()
Iterator getMetadataReferences()
EndpointReference instances pointing at the
locations of the target service's metadata descriptions (i.e. usually its WSDL files).EndpointReferences to the service's metadataIterator getMetadataLocations()
URI instances pointing at the addresses of the
target service's metadata description locations (i.e. usually its WSDL files).URIs to the service's metadataIterator getWSDLs()
WSDL instances describing the target service.WSDLs containing the service's metadataEndpointReference getParentDeviceEndpointReference()
boolean isServiceObjectExisting()
true, if service object exists.void reset()
SecurityKey getSecurityKey()
void setSecurityKey(SecurityKey newKey)
void dispose()