Search in sources :

Example 51 with IEventBroker

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

the class Journal method received.

public void received(IEvent event) {
    if (event.getType() == IEventConst.EVENT_TYPE_UPDATE_CALL || event.getType() == IEventConst.EVENT_TYPE_IDENTIFIED_CALL || event.getType() == IEventConst.EVENT_TYPE_IDENTIFIED_OUTGOING_CALL || event.getType() == IEventConst.EVENT_TYPE_CALL_MANAGER_UPDATED) {
        Thread t = new Thread() {

            public void run() {
                DisplayManager.getDefaultDisplay().asyncExec(new Runnable() {

                    public void run() {
                        updateViews(true);
                    }
                });
            }
        };
        t.start();
        // send application ready event
        IEventBroker eventBroker = this.getRuntime().getEventBroker();
        eventBroker.send(this, eventBroker.createEvent(IEventConst.EVENT_TYPE_APPLICATION_READY));
    }
}
Also used : IEventBroker(de.janrufmonitor.framework.event.IEventBroker)

Example 52 with IEventBroker

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

the class Last10Calls method open.

public int open() {
    IEventBroker eventBroker = this.getRuntime().getEventBroker();
    eventBroker.register(this, eventBroker.createEvent(IEventConst.EVENT_TYPE_IDENTIFIED_CALL));
    eventBroker.register(this, eventBroker.createEvent(IEventConst.EVENT_TYPE_IDENTIFIED_OUTGOING_CALL));
    eventBroker.register(this, eventBroker.createEvent(IEventConst.EVENT_TYPE_UPDATE_CALL));
    eventBroker.register(this, eventBroker.createEvent(IEventConst.EVENT_TYPE_CALL_MANAGER_UPDATED));
    return super.open();
}
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