Package org.pipservices3.commons.run
Interface INotifiable
- All Known Subinterfaces:
IEvent
- All Known Implementing Classes:
Event
public interface INotifiable
Interface for components that can be asynchronously notified.
The notification may include optional argument that describe
the occured event.
### Example ###
class MyComponent implements INotifable {
...
public void notify(String correlationId, Parameters args) {
System.out.println("Occured event " + args.getAsString("event"));
}
}
MyComponent myComponent = new MyComponent();
myComponent.notify("123", Parameters.fromTuples("event", "Test Event"));
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
notify
(String correlationId, Parameters args) Notifies the component about occured event.
-
Method Details
-
notify
Notifies the component about occured event.- Parameters:
correlationId
- (optional) transaction id to trace execution through call chain.args
- notification arguments.- Throws:
ApplicationException
- when errors occured.
-