Package org.openhab.core.events.system
Class SystemEventFactory
java.lang.Object
org.openhab.core.events.AbstractEventFactory
org.openhab.core.events.system.SystemEventFactory
- All Implemented Interfaces:
 EventFactory
Factory that creates system events.
- Author:
 - Kai Kreuzer - Initial contribution
 
- 
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThis is a java bean that is used to serialize/deserialize system event payload. - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionprotected EventcreateEventByType(String eventType, String topic, String payload, @Nullable String source) Create a new event instance based on the event type.static StartlevelEventcreateStartlevelEvent(Integer startlevel) Creates a trigger event from aType.createStartlevelEvent(String topic, String payload, @Nullable String source) Creates a startlevel event from a payload.Methods inherited from class org.openhab.core.events.AbstractEventFactory
checkNotNull, checkNotNullOrEmpty, createEvent, deserializePayload, getSupportedEventTypes, getTopicElements, serializePayload 
- 
Constructor Details
- 
SystemEventFactory
public SystemEventFactory() 
 - 
 - 
Method Details
- 
createStartlevelEvent
Creates a trigger event from aType.- Parameters:
 startlevel- Startlevel of system- Returns:
 - Created start level event.
 
 - 
createEventByType
protected Event createEventByType(String eventType, String topic, String payload, @Nullable String source) throws Exception Description copied from class:AbstractEventFactoryCreate a new event instance based on the event type.- Specified by:
 createEventByTypein classAbstractEventFactory- Parameters:
 eventType- the event typetopic- the topicpayload- the payloadsource- the source, can be null- Returns:
 - the created event instance
 - Throws:
 Exception- if the creation of the event fails
 - 
createStartlevelEvent
Creates a startlevel event from a payload.- Parameters:
 topic- Event topicsource- Event sourcepayload- Payload- Returns:
 - created startlevel event
 
 
 -