use of de.janrufmonitor.framework.event.IEventBroker in project janrufmonitor by tbrandt77.
the class MailNotification method startup.
public void startup() {
super.startup();
IEventBroker eventBroker = this.getRuntime().getEventBroker();
if (this.m_configuration.getProperty(CONFIG_PRE, "true").equalsIgnoreCase("true"))
eventBroker.register(this, eventBroker.createEvent(IEventConst.EVENT_TYPE_IDENTIFIED_CALL));
if (this.m_configuration.getProperty(CONFIG_OUT, "false").equalsIgnoreCase("true") || this.m_configuration.getProperty(CONFIG_END, "false").equalsIgnoreCase("true"))
eventBroker.register(this, eventBroker.createEvent(IEventConst.EVENT_TYPE_IDENTIFIED_OUTGOING_CALL));
if (this.m_configuration.getProperty(CONFIG_MIS, "false").equalsIgnoreCase("true"))
eventBroker.register(this, eventBroker.createEvent(IEventConst.EVENT_TYPE_CALLCLEARED));
if (this.m_configuration.getProperty(CONFIG_ACC, "false").equalsIgnoreCase("true") || this.m_configuration.getProperty(CONFIG_END, "false").equalsIgnoreCase("true"))
eventBroker.register(this, eventBroker.createEvent(IEventConst.EVENT_TYPE_CALLACCEPTED));
if (this.m_configuration.getProperty(CONFIG_REJ, "false").equalsIgnoreCase("true"))
eventBroker.register(this, eventBroker.createEvent(IEventConst.EVENT_TYPE_CALLREJECTED));
this.m_logger.info("MailNotification is started ...");
if (this.m_timer == null) {
this.m_task = new MailTask();
this.m_task.setConfiguration(this.m_configuration);
this.m_timer = new Timer(true);
this.m_timer.schedule(this.m_task, getQueueTime(), getQueueTime());
}
}
use of de.janrufmonitor.framework.event.IEventBroker in project janrufmonitor by tbrandt77.
the class MailNotification method shutdown.
public void shutdown() {
super.shutdown();
if (this.m_timer != null) {
this.m_task.run();
this.m_task.cancel();
this.m_timer.cancel();
this.m_timer = null;
this.m_task = null;
}
IEventBroker eventBroker = this.getRuntime().getEventBroker();
// if (this.m_configuration.getProperty(CONFIG_PRE, "true").equalsIgnoreCase("true"))
eventBroker.unregister(this, eventBroker.createEvent(IEventConst.EVENT_TYPE_IDENTIFIED_CALL));
// if (this.m_configuration.getProperty(CONFIG_OUT, "false").equalsIgnoreCase("true") || this.m_configuration.getProperty(CONFIG_END, "false").equalsIgnoreCase("true"))
eventBroker.unregister(this, eventBroker.createEvent(IEventConst.EVENT_TYPE_IDENTIFIED_OUTGOING_CALL));
// if (this.m_configuration.getProperty(CONFIG_OUT, "false").equalsIgnoreCase("true"))
eventBroker.unregister(this, eventBroker.createEvent(IEventConst.EVENT_TYPE_IDENTIFIED_OUTGOING_CALL));
// if (this.m_configuration.getProperty(CONFIG_MIS, "false").equalsIgnoreCase("true"))
eventBroker.unregister(this, eventBroker.createEvent(IEventConst.EVENT_TYPE_CALLCLEARED));
// if (this.m_configuration.getProperty(CONFIG_ACC, "false").equalsIgnoreCase("true") || this.m_configuration.getProperty(CONFIG_END, "false").equalsIgnoreCase("true"))
eventBroker.unregister(this, eventBroker.createEvent(IEventConst.EVENT_TYPE_CALLACCEPTED));
// if (this.m_configuration.getProperty(CONFIG_REJ, "false").equalsIgnoreCase("true"))
eventBroker.unregister(this, eventBroker.createEvent(IEventConst.EVENT_TYPE_CALLREJECTED));
this.m_logger.info("MailNotification is shut down ...");
}
use of de.janrufmonitor.framework.event.IEventBroker in project janrufmonitor by tbrandt77.
the class MySqlJournal method startup.
@Override
public void startup() {
super.startup();
IEventBroker eb = getRuntime().getEventBroker();
eb.register(this, eb.createEvent(IEventConst.EVENT_TYPE_RETURNED_HIBERNATE));
}
use of de.janrufmonitor.framework.event.IEventBroker in project janrufmonitor by tbrandt77.
the class MySqlJournal method shutdown.
@Override
public void shutdown() {
IEventBroker eb = getRuntime().getEventBroker();
eb.register(this, eb.createEvent(IEventConst.EVENT_TYPE_RETURNED_HIBERNATE));
super.shutdown();
}
use of de.janrufmonitor.framework.event.IEventBroker in project janrufmonitor by tbrandt77.
the class MySqlAddressbook method shutdown.
@Override
public void shutdown() {
IEventBroker eb = getRuntime().getEventBroker();
eb.register(this, eb.createEvent(IEventConst.EVENT_TYPE_RETURNED_HIBERNATE));
super.shutdown();
}
Aggregations