Search in sources :

Example 1 with ServerHandler

use of de.janrufmonitor.service.server.http.simple.ServerHandler 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)

Aggregations

IEventBroker (de.janrufmonitor.framework.event.IEventBroker)1 SimplePortListener (de.janrufmonitor.service.commons.http.simple.SimplePortListener)1 ServerHandler (de.janrufmonitor.service.server.http.simple.ServerHandler)1