Package com.example.consumer1
Class Consumer
java.lang.Object
com.example.consumer1.Consumer
This is an example consumer which matches
Provider in functionality
This 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 Details
-
Consumer
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 Details
-
getClient
-
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
-