... | ... | @@ -86,7 +86,8 @@ Agent agent = new Agent("NAME_OF_SERVICE_OR_THING_TO_MONITOR", "HOST_ADDRESS_OF_ |
|
|
String event = "event";
|
|
|
agent.fire(event);
|
|
|
|
|
|
//This method will fire a following information : timestamp+"-"+event+"-NAME_OF_SERVICE_OR_THING_TO_MONITOR";
|
|
|
/* This method fires the below information :
|
|
|
System.currentTimeMillis()+"-"+event+"-NAME_OF_SERVICE_OR_THING_TO_MONITOR";*/
|
|
|
```
|
|
|
|
|
|
* API Listener :
|
... | ... | @@ -104,7 +105,6 @@ while(listener.isConnect()){ |
|
|
String data = listener.getMessageListened();
|
|
|
System.out.println(data);
|
|
|
}
|
|
|
|
|
|
// To close connection with the SERVICE_OR_THING_TO_MONITOR
|
|
|
listener.disconnect();
|
|
|
```
|
... | ... | |