Interface TNCEventSenderIfc
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
AdminTNCCallbackHandler,TNCCallbackHandler,TNCEventSender
The TNCEventSenderIfc interface extends Serializable and defines methods for sending various types of events.
Implementations of this interface can notify receivers about events in TNC ( Test Node Chain )
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddReceiver(String receiverID, TNCEventReceiverIfc receiver) Adds a receiver and subscribes it for events across all testsvoidaddReceiver(String receiverID, TNCEventReceiverIfc receiver, boolean subForAllTests) Adds a receiver for event handling with an option to subscribe for events across all tests.voidbulkEvents(String recieverID, List<BaseEventIfc> events) Sends bulk events to the specified receiver identified by recieverID.voidfreeUpTestResources(String testID, boolean removeTestListeners) Frees up resources associated with a test identified by the given test ID.booleanhasHistoricEvents(String testID) Checks whether there are historic events associated with the specified test ID.voidnodeOutputFileAvailable(NodeOutputFileAvailableEvent nodeOutputFileAvailable) Sends an event when there are output files available for a node to the associated receivers.voidnodeStatisticsChange(List<NodeUpdateEvent> nodeData) Sends node statistics changes to the associated receivers.voidnodeStatusChange(NodeStatusUpdateEventIfc nodeStatus) Sends node status changes to the associated receivers.voidsubscribeForTest(String recieverID, String testID) Subscribes a receiver to receive events for a specific test.voidNotifies that a test is about to timeout to the associated receivers.voidtestStatusChange(TestStatusChangeEventIfc testStatus) Sends test status changes to the associated receivers.
-
Method Details
-
nodeStatisticsChange
Sends node statistics changes to the associated receivers.- Parameters:
nodeData- A List of NodeUpdateEvent objects representing the updated node statistics.
-
bulkEvents
Sends bulk events to the specified receiver identified by recieverID.- Parameters:
recieverID- The unique identifier of the receiver for which the bulk events are sent.events- A List of BaseEventIfc objects representing the bulk events to be sent.
-
nodeStatusChange
Sends node status changes to the associated receivers.- Parameters:
nodeStatus- The NodeStatusUpdateEventIfc object representing the updated node status.
-
testStatusChange
Sends test status changes to the associated receivers.- Parameters:
testStatus- The TestStatusChangeEventIfc object representing the updated test status.
-
testAboutToTimeout
Notifies that a test is about to timeout to the associated receivers.- Parameters:
event- The TestTimeoutReminderEvent containing information about the test about to timeout.
-
nodeOutputFileAvailable
Sends an event when there are output files available for a node to the associated receivers.- Parameters:
nodeOutputFileAvailable- The NodeOutputFileAvailableEvent object representing the output file data
-
addReceiver
Adds a receiver and subscribes it for events across all tests- Parameters:
receiverID- The unique identifier for the receiver.receiver- The TNCEventReceiverIfc implementation to be added.
-
addReceiver
Adds a receiver for event handling with an option to subscribe for events across all tests.- Parameters:
receiverID- The unique identifier for the receiver.receiver- The TNCEventReceiverIfc implementation to be added.subForAllTests- A boolean flag indicating whether to subscribe for events across all tests.
-
subscribeForTest
Subscribes a receiver to receive events for a specific test.- Parameters:
recieverID- The unique identifier of the receiver to be subscribed.testID- The unique identifier of the test for which the receiver is subscribing.
-
freeUpTestResources
Frees up resources associated with a test identified by the given test ID.- Parameters:
testID- The unique identifier of the test whose resources should be freed up.removeTestListeners- A boolean flag indicating whether to remove test listeners associated with the test. If set totrue, the test listeners will be removed; otherwise, they will be retained.
-
hasHistoricEvents
Checks whether there are historic events associated with the specified test ID.- Parameters:
testID- The unique identifier of the test to check for historic events.- Returns:
trueif there are historic events for the given test ID;falseotherwise.
-