use of org.openhab.binding.dscalarm.internal.DSCAlarmEventListener in project openhab1-addons by openhab.
the class SerialConnector method handleIncomingMessage.
/**
* Handles an incoming message
*
* @param incomingMessage
*/
public synchronized void handleIncomingMessage(String incomingMessage) {
APIMessage Message = new APIMessage(incomingMessage);
logger.debug("handleIncomingMessage(): Message received: {} - {}", incomingMessage, Message.toString());
DSCAlarmEvent event = new DSCAlarmEvent(this);
event.dscAlarmEventMessage(Message);
// send message to event listeners
try {
Iterator<DSCAlarmEventListener> iterator = _listeners.iterator();
while (iterator.hasNext()) {
((DSCAlarmEventListener) iterator.next()).dscAlarmEventRecieved(event);
}
} catch (Exception e) {
logger.error("handleIncomingMessage(): Event listener invoking error", e);
}
}
use of org.openhab.binding.dscalarm.internal.DSCAlarmEventListener in project openhab1-addons by openhab.
the class TCPConnector method handleIncomingMessage.
/**
* Handles an incoming message
*
* @param incomingMessage
*/
public synchronized void handleIncomingMessage(String incomingMessage) {
APIMessage Message = new APIMessage(incomingMessage);
logger.debug("handleIncomingMessage(): Message received: {} - {}", incomingMessage, Message.toString());
DSCAlarmEvent event = new DSCAlarmEvent(this);
event.dscAlarmEventMessage(Message);
// send message to event listeners
try {
Iterator<DSCAlarmEventListener> iterator = _listeners.iterator();
while (iterator.hasNext()) {
((DSCAlarmEventListener) iterator.next()).dscAlarmEventRecieved(event);
}
} catch (Exception e) {
logger.error("handleIncomingMessage(): Event listener invoking error", e);
}
}
Aggregations