Class LinkEventFactory
java.lang.Object
org.openhab.core.events.AbstractEventFactory
org.openhab.core.thing.link.events.LinkEventFactory
- All Implemented Interfaces:
 EventFactory
This is an 
EventFactory for creating link events. The following event types are supported by this factory:
 - Author:
 - Dennis Nobel - Initial contribution, Kai Kreuzer - Removed Thing link events
 
- 
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 ItemChannelLinkAddedEventcreateItemChannelLinkAddedEvent(ItemChannelLink itemChannelLink) Creates an item channel link added event.static ItemChannelLinkRemovedEventcreateItemChannelLinkRemovedEvent(ItemChannelLink itemChannelLink) Creates an item channel link removed event.Methods inherited from class org.openhab.core.events.AbstractEventFactory
checkNotNull, checkNotNullOrEmpty, createEvent, deserializePayload, getSupportedEventTypes, getTopicElements, serializePayload 
- 
Constructor Details
- 
LinkEventFactory
public LinkEventFactory()Constructs a new LinkEventFactory. 
 - 
 - 
Method Details
- 
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
 - 
createItemChannelLinkAddedEvent
public static ItemChannelLinkAddedEvent createItemChannelLinkAddedEvent(ItemChannelLink itemChannelLink) Creates an item channel link added event.- Parameters:
 itemChannelLink- item channel link- Returns:
 - the created item channel link added event
 - Throws:
 IllegalArgumentException- if item channel link is null
 - 
createItemChannelLinkRemovedEvent
public static ItemChannelLinkRemovedEvent createItemChannelLinkRemovedEvent(ItemChannelLink itemChannelLink) Creates an item channel link removed event.- Parameters:
 itemChannelLink- item channel link- Returns:
 - the created item channel link removed event
 - Throws:
 IllegalArgumentException- if item channel link is null
 
 -