Package com.example.consumer1
Class Consumer
- java.lang.Object
-
- com.example.consumer1.Consumer
-
public class Consumer extends Object
This is an example consumer which matchesProviderin functionalityThis consumer executes the following steps and prints whether each step was successful 1. discovery of device with specific endpoint 2. connect to device with specific endpoint 3. read mdib of provider 4. subscribe metrics, alerts, waveforms 5. check that least one patient context exists 6. check that at least one location context exists 7. check that the metric (see above) changes within 30 seconds at least 5 times 8. check that the alert condition (see above)change within 30 seconds at least 5 times 9. execute operations (Activate, SetString, SetValue) as specified and check that result is “finished”
-
-
Constructor Summary
Constructors Constructor Description Consumer(ConsumerUtil consumerUtil)Creates an SDC Consumer instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ClientgetClient()SdcRemoteDevicesConnectorgetConnector()com.google.inject.InjectorgetInjector()static voidmain(String[] args)protected voidshutDown()protected voidstartUp()
-
-
-
Constructor Detail
-
Consumer
public Consumer(ConsumerUtil consumerUtil) throws SocketException, UnknownHostException
Creates an SDC Consumer instance.- Parameters:
consumerUtil- utility containing injector and settings- Throws:
SocketException- if network adapter couldn't be boundUnknownHostException- if localhost couldn't be determined
-
-
Method Detail
-
getClient
public Client getClient()
-
getConnector
public SdcRemoteDevicesConnector getConnector()
-
startUp
protected void startUp()
-
shutDown
protected void shutDown()
-
getInjector
public com.google.inject.Injector getInjector()
-
main
public static void main(String[] args) throws SocketException, UnknownHostException, InterceptorException, TransportException, InterruptedException
-
-