Class ClientImpl
-
- All Implemented Interfaces:
-
com.google.common.util.concurrent.Service,org.somda.sdc.dpws.client.Client,org.somda.sdc.dpws.soap.wsdiscovery.HelloByeAndProbeMatchesObserver
public final class ClientImpl extends AbstractIdleService implements Client, Service, HelloByeAndProbeMatchesObserver
Default implementation of Client.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classClientImpl.Companion
-
Field Summary
Fields Modifier and Type Field Description public final static ClientImpl.CompanionCompanion
-
Method Summary
Modifier and Type Method Description Unitprobe(DiscoveryFilter discoveryFilter)Probes for devices. ListenableFuture<ProbeMatchesType>directedProbe(String xAddr)Sends a directed probe to a specific physical address. ListenableFuture<DiscoveredDevice>resolve(String eprAddress)Resolves physical addresses (XAddrs) of a device. ListenableFuture<HostingServiceProxy>connect(DiscoveredDevice discoveredDevice)Connects to a hosting service by using DiscoveredDevice. ListenableFuture<HostingServiceProxy>connect(String eprAddress)Connects to a hosting service by using an EPR address. UnitregisterDiscoveryObserver(DiscoveryObserver observer)Subscribes to discovery events. UnitunregisterDiscoveryObserver(DiscoveryObserver observer)Unsubscribes from discovery events. UnitregisterEventObserver(EventObserver eventObserver)Subscribes to client events. UnitunregisterEventObserver(EventObserver eventObserver)Unsubscribes from client events. -
Methods inherited from class com.google.common.util.concurrent.AbstractIdleService
addListener, awaitRunning, awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, awaitTerminated, failureCause, isRunning, startAsync, state, stopAsync, toString -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
probe
Unit probe(DiscoveryFilter discoveryFilter)
Probes for devices.
This method synchronously sends a WS-Discovery Probe. All parties that subscribed to event messages by using registerDiscoveryObserver will be notified on found devices and probe ending.
-
directedProbe
ListenableFuture<ProbeMatchesType> directedProbe(String xAddr)
Sends a directed probe to a specific physical address.
This method is an asynchronous unidirectional call; the result will not be notified to any subscribed parties.
- Returns:
a future that holds the result of the directed probe.
-
resolve
ListenableFuture<DiscoveredDevice> resolve(String eprAddress)
Resolves physical addresses (XAddrs) of a device.
This method is an asynchronous unidirectional call; the result will not be notified to any subscribed parties.
- Returns:
a future that holds the result of the resolve.
-
connect
ListenableFuture<HostingServiceProxy> connect(DiscoveredDevice discoveredDevice)
Connects to a hosting service by using DiscoveredDevice.
This function requires a fully populated DiscoveredDevice including XAddrs.
By saying connect this method resolves a hosting service by using WS-TransferGet and hosted service information by using WS-MetadataExchange.
- Returns:
a future that holds the result of the connect.
-
connect
ListenableFuture<HostingServiceProxy> connect(String eprAddress)
Connects to a hosting service by using an EPR address.
- Returns:
a future that holds the result of the connect.
-
registerDiscoveryObserver
Unit registerDiscoveryObserver(DiscoveryObserver observer)
Subscribes to discovery events.
-
unregisterDiscoveryObserver
Unit unregisterDiscoveryObserver(DiscoveryObserver observer)
Unsubscribes from discovery events.
-
registerEventObserver
Unit registerEventObserver(EventObserver eventObserver)
Subscribes to client events.
-
unregisterEventObserver
Unit unregisterEventObserver(EventObserver eventObserver)
Unsubscribes from client events.
-
-
-
-