public interface Service
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
NO_PARAMETER
to use with getOperation/s and getEventSource/s
|
| Modifier and Type | Method and Description |
|---|---|
void |
disconnectAllServiceReferences(boolean resetServiceRefs)
The method disconnected all ServiceReferences from this service.
|
Iterator |
getAllEventSources()
Returns all
EventSources of this service. |
Iterator |
getAllOperations()
Returns all
Operations from this service. |
UnknownDataContainer[] |
getCustomMData(java.lang.String communicationManagerId)
The method returns all custom metadata
|
WSDL |
getDescription(java.lang.String targetNamespace)
Returns a WSDL document describing this service by the given namespace.
|
Iterator |
getDescriptions()
Returns an iterator over all WSDLs directly attached to this service.
|
Iterator |
getEprInfos()
Returns an iterator of
EprInfo. |
EventSource |
getEventSource(QName portType,
java.lang.String eventName,
java.lang.String inputName,
java.lang.String outputName)
Returns the first
EventSource matching the given criteria. |
Iterator |
getEventSources(QName portType,
java.lang.String eventName,
java.lang.String inputName,
java.lang.String outputName)
Returns all
EventSources matching the given criteria. |
Operation |
getOperation(QName portType,
java.lang.String opName,
java.lang.String inputName,
java.lang.String outputName)
Returns the first
Operation matching the given criteria. |
Iterator |
getOperations(QName portType,
java.lang.String opName,
java.lang.String inputName,
java.lang.String outputName)
Returns all
Operations matching the given criteria. |
DeviceReference |
getParentDeviceReference(SecurityKey securityKey)
Gets device reference of parent device.
|
CustomAttributeValue |
getPortTypeAttribute(QName portTypeName,
QName attributeName)
Returns the value of the port type attribute with the given
name for the port type
with the specified unique portTypeName or with null if this attribute
is not available (or if its value is explicitly set to null). |
HashMap |
getPortTypeAttributes(QName portTypeName)
Returns all port type attributes explicitly set on this service instance for the port type with
the given unique
portTypeName. |
Iterator |
getPortTypes()
Gets service port types.
|
URI |
getServiceId()
Gets service id
|
ServiceReference |
getServiceReference(SecurityKey securityKey)
Gets the service reference.
|
long |
getStatus(ClientSubscription subscription,
CredentialInfo credentialInfo)
Returns the duration in milliseconds until expiration of the specified client subscription.
|
boolean |
hasPortTypeAttributes(QName portTypeName)
Returns
true only if this service instance has at least one port type attribute
set for the port type with the specified unique portTypeName. |
boolean |
isRemote()
Is the service remote (proxy) or local?
|
long |
renew(ClientSubscription subscription,
long duration,
CredentialInfo credentialInfo)
Renews an existing subscription with a new duration.
|
ClientSubscription |
subscribe(EventSink sink,
java.lang.String clientSubscriptionId,
URISet eventActionURIs,
long duration,
CredentialInfo credentialInfo)
Initializes event receiving from specified event sender.
|
void |
unsubscribe(ClientSubscription subscription,
CredentialInfo credentialInfo)
Unsubscribe specified subscription.
|
static final java.lang.String NO_PARAMETER
URI getServiceId()
Iterator getPortTypes()
QName.ServiceReference getServiceReference(SecurityKey securityKey)
DeviceReference getParentDeviceReference(SecurityKey securityKey)
null in case this
service doesn't reside on a device or its underlying device is not known at this time.nullOperation getOperation(QName portType, java.lang.String opName, java.lang.String inputName, java.lang.String outputName)
Operation matching the given criteria. Use the constant
Service.SERVICE_NO_PARAMETER to indicate that the operation has explicitly no input or
output parameter (it could be a one-way message or something similar). Supplying null as a
parameter makes the method ignore it (matches all).portType - opName - inputName - outputName - Iterator getAllOperations()
Operations from this service.Iterator getAllEventSources()
EventSources of this service.Iterator getOperations(QName portType, java.lang.String opName, java.lang.String inputName, java.lang.String outputName)
Operations matching the given criteria. Use the constant
Service.SERVICE_NO_PARAMETER to indicate that the operation has explicitly no input or
output parameter (it could be a one-way message or something similar). Supplying null as a
parameter makes the method ignores the parameter (matches all).portType - opName - inputName - outputName - EventSource getEventSource(QName portType, java.lang.String eventName, java.lang.String inputName, java.lang.String outputName)
EventSource matching the given criteria. Use the constant
Service.SERVICE_NO_PARAMETER to indicate that the operation has explicitly no input or
output parameter (it could be a one-way message or something similar). Supplying null as a
parameter makes the method ignore it (matches all).portType - eventName - inputName - outputName - Iterator getEventSources(QName portType, java.lang.String eventName, java.lang.String inputName, java.lang.String outputName)
EventSources matching the given criteria. Use the constant
Service.SERVICE_NO_PARAMETER to indicate that the operation has explicitly no input or
output parameter (it could be a one-way message or something similar). Supplying null as a
parameter makes the method ignore it (matches all).portType - opName - inputName - outputName - boolean isRemote()
ClientSubscription subscribe(EventSink sink, java.lang.String clientSubscriptionId, URISet eventActionURIs, long duration, CredentialInfo credentialInfo) throws EventingException, java.io.IOException, CommunicationException
sink - event sink which will receive the notifications.clientSubscriptionId - eventActionURIs - a set of action URIs to subscribe toduration - duration in millis of subscription. If 0, subscription does not expire.EventingExceptionCommunicationExceptionjava.io.IOExceptionvoid unsubscribe(ClientSubscription subscription, CredentialInfo credentialInfo) throws EventingException, java.io.IOException, CommunicationException
subscription - subscription to terminate.EventingExceptionCommunicationExceptionjava.io.IOExceptionlong renew(ClientSubscription subscription, long duration, CredentialInfo credentialInfo) throws EventingException, java.io.IOException, CommunicationException
subscription - duration - EventingExceptionCommunicationExceptionjava.io.IOExceptionlong getStatus(ClientSubscription subscription, CredentialInfo credentialInfo) throws EventingException, java.io.IOException, CommunicationException
subscription - EventingExceptionCommunicationExceptionjava.io.IOExceptionIterator getDescriptions()
WSDL getDescription(java.lang.String targetNamespace)
targetNamespace - the namespace.CustomAttributeValue getPortTypeAttribute(QName portTypeName, QName attributeName)
name for the port type
with the specified unique portTypeName or with null if this attribute
is not available (or if its value is explicitly set to null).
This method throws a java.lang.IllegalArgumentException if a port type with the
given portTypeName is not found within this service instance.
portTypeName - the unique name of the port type within the scope of this service instance, see getPortTypes()attributeName - the name of the port type attribute to query the value ofnulljava.lang.IllegalArgumentException - if no port type with the given portTypeName is foundHashMap getPortTypeAttributes(QName portTypeName)
portTypeName. Note that depending on the actual implementation
the returned reference may point at the 'life map', i .e. the actual storage for the port type
attributes. Thus, modifications to that map should be performed with care and keeping this in
mind.
This method throws a java.lang.IllegalArgumentException if a port type with the
given portTypeName is not found within this instance.
portTypeName - the unique name of the port type within the scope of this instance, see getPortTypes()java.lang.IllegalArgumentException - if no port type with the given portTypeName is foundboolean hasPortTypeAttributes(QName portTypeName)
true only if this service instance has at least one port type attribute
set for the port type with the specified unique portTypeName. Returns false
in any other case, including when there is no port type with the given
portTypeName.portTypeName - the unique name of the port type within the scope of this service instance, see getPortTypes()true only if there is at least one port type attribute set for the named port type within
this service instanceUnknownDataContainer[] getCustomMData(java.lang.String communicationManagerId)
void disconnectAllServiceReferences(boolean resetServiceRefs)
true all service
references will be reseted.resetServiceRefs -