Search in sources :

Example 36 with IEventBroker

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

the class DefaultCallDialogService 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));
    this.m_logger.info("DefaultCallDialogService is shut down ...");
}
Also used : IEventBroker(de.janrufmonitor.framework.event.IEventBroker)

Example 37 with IEventBroker

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

the class Server method shutdown.

public void shutdown() {
    super.shutdown();
    IHttpRequest request = new ShutdownHandler();
    this.sendRequest(getRuntime().getEventBroker().createEvent(-1), request);
    try {
        Thread.sleep(2000);
    } catch (InterruptedException e) {
        this.m_logger.severe(e.getMessage());
    }
    IEventBroker eventBroker = this.getRuntime().getEventBroker();
    eventBroker.unregister(this, eventBroker.createEvent(IEventConst.EVENT_TYPE_INCOMINGCALL));
    eventBroker.unregister(this, eventBroker.createEvent(IEventConst.EVENT_TYPE_CALLACCEPTED));
    eventBroker.unregister(this, eventBroker.createEvent(IEventConst.EVENT_TYPE_CALLCLEARED));
    eventBroker.unregister(this, eventBroker.createEvent(IEventConst.EVENT_TYPE_CALLREJECTED));
    eventBroker.unregister(this, eventBroker.createEvent(IEventConst.EVENT_TYPE_MANUALCALLACCEPTED));
    eventBroker.unregister(this, eventBroker.createEvent(IEventConst.EVENT_TYPE_APPLICATION_READY));
    eventBroker.unregister(this, eventBroker.createEvent(IEventConst.EVENT_TYPE_IDENTIFIED_CALL));
    eventBroker.unregister(this, eventBroker.createEvent(IEventConst.EVENT_TYPE_IDENTIFIED_OUTGOING_CALL));
    eventBroker.unregister(this, eventBroker.createEvent(IEventConst.EVENT_TYPE_OUTGOINGCALL));
    // stop HTTP Server
    this.m_httpSrv.stop();
    this.m_httpSrv = null;
    ClientRegistry.getInstance().shutdown();
    this.m_logger.info("Server is shut down ...");
}
Also used : IHttpRequest(de.janrufmonitor.service.commons.http.IHttpRequest) ShutdownHandler(de.janrufmonitor.service.server.request.handler.ShutdownHandler) IEventBroker(de.janrufmonitor.framework.event.IEventBroker)

Example 38 with IEventBroker

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

the class Server method startup.

public void startup() {
    super.startup();
    this.m_httpSrv = new SimplePortListener(new ServerHandler(), this.getListenPort());
    IEventBroker eventBroker = this.getRuntime().getEventBroker();
    eventBroker.register(this, eventBroker.createEvent(IEventConst.EVENT_TYPE_INCOMINGCALL));
    eventBroker.register(this, eventBroker.createEvent(IEventConst.EVENT_TYPE_CALLACCEPTED));
    eventBroker.register(this, eventBroker.createEvent(IEventConst.EVENT_TYPE_CALLCLEARED));
    eventBroker.register(this, eventBroker.createEvent(IEventConst.EVENT_TYPE_CALLREJECTED));
    eventBroker.register(this, eventBroker.createEvent(IEventConst.EVENT_TYPE_MANUALCALLACCEPTED));
    eventBroker.register(this, eventBroker.createEvent(IEventConst.EVENT_TYPE_APPLICATION_READY));
    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_OUTGOINGCALL));
    // start HTTP Server
    this.m_httpSrv.start();
    this.m_logger.info("Server is started ...");
}
Also used : SimplePortListener(de.janrufmonitor.service.commons.http.simple.SimplePortListener) ServerHandler(de.janrufmonitor.service.server.http.simple.ServerHandler) IEventBroker(de.janrufmonitor.framework.event.IEventBroker)

Example 39 with IEventBroker

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

the class IconBlinker 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_CALLACCEPTED));
    eventBroker.unregister(this, eventBroker.createEvent(IEventConst.EVENT_TYPE_CALLCLEARED));
    eventBroker.unregister(this, eventBroker.createEvent(IEventConst.EVENT_TYPE_CALLREJECTED));
    eventBroker.unregister(this, eventBroker.createEvent(IEventConst.EVENT_TYPE_APPLICATION_READY));
    this.m_logger.info("IconBlinker is shut down ...");
}
Also used : IEventBroker(de.janrufmonitor.framework.event.IEventBroker)

Example 40 with IEventBroker

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

the class IconBlinker method startup.

public void startup() {
    super.startup();
    IEventBroker eventBroker = this.getRuntime().getEventBroker();
    eventBroker.register(this, eventBroker.createEvent(IEventConst.EVENT_TYPE_IDENTIFIED_CALL));
    eventBroker.register(this, eventBroker.createEvent(IEventConst.EVENT_TYPE_CALLACCEPTED));
    eventBroker.register(this, eventBroker.createEvent(IEventConst.EVENT_TYPE_CALLCLEARED));
    eventBroker.register(this, eventBroker.createEvent(IEventConst.EVENT_TYPE_CALLREJECTED));
    eventBroker.register(this, eventBroker.createEvent(IEventConst.EVENT_TYPE_APPLICATION_READY));
    this.m_logger.info("IconBlinker is started ...");
}
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