Search in sources :

Example 11 with IEventBroker

use of de.janrufmonitor.framework.event.IEventBroker in project janrufmonitor by tbrandt77.

the class SynchronizerService method startup.

public void startup() {
    super.startup();
    if (isEnabled()) {
        IEventBroker eventBroker = this.getRuntime().getEventBroker();
        eventBroker.register(this, eventBroker.createEvent(IEventConst.EVENT_TYPE_RETURNED_HIBERNATE));
        if (this.m_configuration != null && this.m_configuration.getProperty(CFG_SYNCSTARTUP, "false").equalsIgnoreCase("true")) {
            final long delay = 1000 * Long.parseLong(this.m_configuration.getProperty(CFG_STARTUP_DELAY, "0"));
            this.m_logger.info("Startup delay on fritzbox sync set to " + delay + " ms.");
            Thread t = new Thread(new Runnable() {

                public void run() {
                    try {
                        Thread.sleep((delay + 2000));
                    } catch (InterruptedException e) {
                    }
                    new SWTExecuter() {

                        protected void execute() {
                            synchronize(false);
                        }
                    }.start();
                }
            });
            t.setName("FritzBox-Startup-Syncthread");
            t.start();
        }
        boolean isRefreshAfterCallend = this.m_configuration.getProperty(CFG_REFRESH_AFTER_CALLEND, "false").equalsIgnoreCase("true");
        if (isRefreshAfterCallend) {
            eventBroker.register(this, eventBroker.createEvent(IEventConst.EVENT_TYPE_IDENTIFIED_OUTGOING_CALL_ACCEPTED));
            eventBroker.register(this, eventBroker.createEvent(IEventConst.EVENT_TYPE_CALLACCEPTED));
        }
        timebasedSyncing();
    }
}
Also used : SWTExecuter(de.janrufmonitor.ui.swt.SWTExecuter) IEventBroker(de.janrufmonitor.framework.event.IEventBroker)

Example 12 with IEventBroker

use of de.janrufmonitor.framework.event.IEventBroker in project janrufmonitor by tbrandt77.

the class CommentService method startup.

public void startup() {
    super.startup();
    IEventBroker evtBroker = this.getRuntime().getEventBroker();
    evtBroker.register(this, evtBroker.createEvent(IEventConst.EVENT_TYPE_IDENTIFIED_CALL));
}
Also used : IEventBroker(de.janrufmonitor.framework.event.IEventBroker)

Example 13 with IEventBroker

use of de.janrufmonitor.framework.event.IEventBroker in project janrufmonitor by tbrandt77.

the class CommentService method shutdown.

public void shutdown() {
    super.shutdown();
    IEventBroker evtBroker = this.getRuntime().getEventBroker();
    evtBroker.unregister(this, evtBroker.createEvent(IEventConst.EVENT_TYPE_IDENTIFIED_CALL));
}
Also used : IEventBroker(de.janrufmonitor.framework.event.IEventBroker)

Example 14 with IEventBroker

use of de.janrufmonitor.framework.event.IEventBroker in project janrufmonitor by tbrandt77.

the class ExternalApplicationLauncher method startup.

public void startup() {
    super.startup();
    IEventBroker eventBroker = this.getRuntime().getEventBroker();
    eventBroker.register(this, eventBroker.createEvent(IEventConst.EVENT_TYPE_IDENTIFIED_CALL));
    if (this.m_configuration.getProperty(CONFIG_OUTGOING, "false").equalsIgnoreCase("true"))
        eventBroker.register(this, eventBroker.createEvent(IEventConst.EVENT_TYPE_IDENTIFIED_OUTGOING_CALL));
    this.m_logger.info("ExternalApplicationLauncher is started ...");
}
Also used : IEventBroker(de.janrufmonitor.framework.event.IEventBroker)

Example 15 with IEventBroker

use of de.janrufmonitor.framework.event.IEventBroker in project janrufmonitor by tbrandt77.

the class GeoCoding method shutdown.

public void shutdown() {
    super.shutdown();
    IEventBroker eventBroker = this.getRuntime().getEventBroker();
    eventBroker.unregister(this, eventBroker.createEvent(IEventConst.EVENT_TYPE_IDENTIFIED_CALL));
    eventBroker.unregister(this, eventBroker.createEvent(IEventConst.EVENT_TYPE_IDENTIFIED_OUTGOING_CALL));
    eventBroker.unregister(this);
    this.m_logger.info("GeoCoding is shut down ...");
}
Also used : IEventBroker(de.janrufmonitor.framework.event.IEventBroker)

Aggregations

IEventBroker (de.janrufmonitor.framework.event.IEventBroker)52 ICall (de.janrufmonitor.framework.ICall)5 Message (de.janrufmonitor.exception.Message)4 IEvent (de.janrufmonitor.framework.event.IEvent)4 ICaller (de.janrufmonitor.framework.ICaller)3 ICip (de.janrufmonitor.framework.ICip)3 ICallManager (de.janrufmonitor.repository.ICallManager)3 IWriteCallRepository (de.janrufmonitor.repository.types.IWriteCallRepository)3 IOException (java.io.IOException)3 List (java.util.List)3 ICallList (de.janrufmonitor.framework.ICallList)2 IMsn (de.janrufmonitor.framework.IMsn)2 IName (de.janrufmonitor.framework.IName)2 IPhonenumber (de.janrufmonitor.framework.IPhonenumber)2 IReadCallRepository (de.janrufmonitor.repository.types.IReadCallRepository)2 UnsupportedEncodingException (java.io.UnsupportedEncodingException)2 MalformedURLException (java.net.MalformedURLException)2 IAttributeMap (de.janrufmonitor.framework.IAttributeMap)1 FritzBoxCallCsv (de.janrufmonitor.fritzbox.FritzBoxCallCsv)1 FirmwareManager (de.janrufmonitor.fritzbox.firmware.FirmwareManager)1