|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Service
Interface of service classes representing "DPWS Hosted Services"
Method Summary | |
---|---|
EventSource |
getAnyEventSource(QName portType,
java.lang.String eventName)
Returns the first (or last, or ANY other) event source with the specified portType and eventName . |
Operation |
getAnyOperation(QName portType,
java.lang.String operationName)
Returns the first (or last, or ANY other) operation with the specified portType and operationName . |
java.lang.Object |
getCertificate()
This certificate is used to validate signatures. |
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)
Gets event source of specified portType with given
eventName . |
EventSource |
getEventSource(java.lang.String outputAction)
Gets event source with specified unique outputAction . |
Iterator |
getEventSources()
Gets all events sources. |
Iterator |
getEventSources(QName portType)
Gets all event sources of the specified service port type. |
Operation |
getOperation(QName portType,
java.lang.String opName,
java.lang.String inputName,
java.lang.String outputName)
Gets an operation of specified portType with given
opName . |
Operation |
getOperation(java.lang.String inputAction)
Gets operation with specified unique inputAction . |
Iterator |
getOperations()
Gets all operations. |
Iterator |
getOperations(QName portType)
Gets all operations of the specified service port type. |
DeviceReference |
getParentDeviceReference()
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()
Gets the service reference. |
long |
getStatus(ClientSubscription subscription)
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? |
boolean |
isSecure()
return weather or not a service uses the security techniques. |
long |
renew(ClientSubscription subscription,
long duration)
Renews an existing subscription with a new duration. |
void |
setCertificate(java.lang.Object cert)
Sets the certificate of this service. |
void |
setSecure(boolean sec)
|
ClientSubscription |
subscribe(EventSink sink,
java.lang.String clientSubscriptionId,
URISet eventActionURIs,
long duration)
Initializes event receiving from specified event sender. |
void |
unsubscribe(ClientSubscription subscription)
Unsubscribe specified subscription. |
Method Detail |
---|
URI getServiceId()
Iterator getEprInfos()
EprInfo
.
EprInfo
.Iterator getPortTypes()
ServiceReference getServiceReference()
DeviceReference getParentDeviceReference()
null
in case this service doesn't reside on a device or its
underlying device is not known at this time.
null
Iterator getOperations(QName portType)
portType
- specific port type
Iterator getOperations()
Operation getOperation(QName portType, java.lang.String opName, java.lang.String inputName, java.lang.String outputName)
portType
with given
opName
. The inputName
and/or
outputName
may be null
only if the requested
operation doesn't have any input/output. Otherwise, this method won't get
any results.
When an operation is added to a service, and it doesn't provide an
explicit name for either its input or output elements (see
OperationCommons.setInputName(String)
and
OperationCommons.setOutputName(String)
), a default name is generated
according to the WSDL 1.1 Specification. As long as there are other
operations with the same input/output name which have already been added
to this service, an incremental index is appended to the default
generated name.
portType
and with the given opName
is
NOT overloaded (i.e. there is no other operation within the same
port type with the same operation name), then you can use method
getAnyOperation(QName, String)
instead of this one.
portType
- specific port type of operationopName
- name of operationinputName
- the name of the input element which belongs to this
operation according to its WSDL; must be null
, if
operation has no inputoutputName
- the name of the output element which belongs to this
operation according to its WSDL; must be null
, if
operation has no output
null
, if not foundgetAnyOperation(QName, String)
Operation getOperation(java.lang.String inputAction)
inputAction
.
inputAction
- the WS-Addressing action URI of the requested
operation according to its WSDL
null
, if not foundOperation getAnyOperation(QName portType, java.lang.String operationName)
portType
and operationName
. Note that
there might be more than one operation with the same name and port type
in the case of overloading. In such situations, it is the user's
responsibility to determine which of the overloaded versions was returned
by this method. This method returns null
, if there are no
operations matching the portType
and
operationName
arguments.
This method is useful in case it is known that there is only one operation with a given name within a port type.
portType
- the port type to which the desired operationoperationName
- the name of the operation
getOperation(QName, String, String, String)
Iterator getEventSources(QName portType)
portType
- specific port type
Iterator getEventSources()
EventSource getEventSource(QName portType, java.lang.String eventName, java.lang.String inputName, java.lang.String outputName)
portType
with given
eventName
. The inputName
and/or
outputName
may be null
only if the requested
event source doesn't have any input/output. Otherwise, this method won't
find any results. *
When an event source is added to a service, and it doesn't provide an
explicit name for either its input or output elements (see
OperationCommons.setInputName(String)
and
OperationCommons.setOutputName(String)
), a default name is
therefore generated according to the WSDL 1.1 Specification. If there are
other event sources with the same input/output name already added to this
service, an incremental index is appended to the default generated name.
portType
and with the given eventName
is
NOT overloaded (i.e. there is no other event source within the
same port type with the same event name), then you can use method
getAnyEventSource(QName, String)
instead of this one.
portType
- specific port type of operationeventName
- name of event sourceinputName
- the name of the input element that belongs to this event
source according to its WSDL; must be null
, if
event source has no inputoutputName
- the name of the output element that belongs to this
event source according to its WSDL; must be null
,
if event source has no output
null
, if not foundgetAnyEventSource(QName, String)
EventSource getEventSource(java.lang.String outputAction)
outputAction
.
outputAction
- the WS-Addressing action URI of the requested event
source according to its WSDL
null
if not foundEventSource getAnyEventSource(QName portType, java.lang.String eventName)
portType
and eventName
. Note that
there might be more than one event source with the same name and port
type in the case of overloading. In such situations, it is the user's
responsibility to determine which of the overloaded versions was returned
by this method. This method returns null
, if there are no
event source matching the portType
and
eventName
arguments.
This method is useful in case it is known that there is only one event source with a given name within a port type.
portType
- the port type the desired event source belongs toeventName
- the name of the event source
getEventSource(QName, String, String, String)
boolean isRemote()
ClientSubscription subscribe(EventSink sink, java.lang.String clientSubscriptionId, URISet eventActionURIs, long duration) throws EventingException, TimeoutException
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.
EventingException
TimeoutException
void unsubscribe(ClientSubscription subscription) throws EventingException, TimeoutException
subscription
- subscription to terminate.
EventingException
TimeoutException
long renew(ClientSubscription subscription, long duration) throws EventingException, TimeoutException
subscription
- duration
-
EventingException
TimeoutException
long getStatus(ClientSubscription subscription) throws EventingException, TimeoutException
subscription
-
EventingException
TimeoutException
Iterator 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 of
null
java.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
instancejava.lang.Object getCertificate()
void setCertificate(java.lang.Object cert)
cert
- the java.security.cert.Certificateboolean isSecure()
void setSecure(boolean sec)
sec
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |