Package io.openems.common.event
Class EventBuilder
java.lang.Object
io.openems.common.event.EventBuilder
-
Method Summary
Modifier and TypeMethodDescription<T> EventBuilder
Add an argument to EventBuilder.static EventBuilder
Create new EventBuilder.void
post()
Build event and post it via given EventAdmin.static void
Build event without arguments and post it via given EventAdmin.void
send()
Build event and send it via given EventAdmin.static void
Build event without arguments and send it via given EventAdmin.
-
Method Details
-
from
Create new EventBuilder.- Parameters:
eventAdmin
- used eventAdmineventTopic
- topic of event- Returns:
- new EventBuilder
-
post
Build event without arguments and post it via given EventAdmin.- Parameters:
eventAdmin
- used eventAdmineventTopic
- topic of event- Throws:
SecurityException
- If the caller does not have TopicPermission[topic,PUBLISH] for the topic specified in the event.- See Also:
-
EventAdmin.postEvent(Event)
-
post
Build event and post it via given EventAdmin.- Throws:
SecurityException
- If the caller does not have TopicPermission[topic,PUBLISH] for the topic specified in the event.- See Also:
-
EventAdmin.postEvent(Event)
-
send
Build event without arguments and send it via given EventAdmin.- Parameters:
eventAdmin
- used eventAdmineventTopic
- topic of event- Throws:
SecurityException
- If the caller does not have TopicPermission[topic,PUBLISH] for the topic specified in the event.- See Also:
-
EventAdmin.sendEvent(Event)
-
send
Build event and send it via given EventAdmin.- Throws:
SecurityException
- If the caller does not have TopicPermission[topic,PUBLISH] for the topic specified in the event.- See Also:
-
EventAdmin.sendEvent(Event)
-
addArg
Add an argument to EventBuilder.- Type Parameters:
T
- type of constant- Parameters:
identifier
- the identifierarg
- the actual argument- Returns:
- same instance
-