use of de.janrufmonitor.service.server.request.handler.IncomingCallHandler in project janrufmonitor by tbrandt77.
the class Server method received.
public void received(IEvent event) {
if (event.getType() == IEventConst.EVENT_TYPE_INCOMINGCALL) {
this.m_logger.info("Sending INCOMING_CALL event to clients.");
IHttpRequest request = new IncomingCallHandler((ICall) event.getData());
this.sendRequest(event, request);
}
if (event.getType() == IEventConst.EVENT_TYPE_OUTGOINGCALL) {
this.m_logger.info("Sending OUTGOING_CALL event to clients.");
IHttpRequest request = new OutgoingCallHandler((ICall) event.getData());
this.sendRequest(event, request);
}
if (event.getType() == IEventConst.EVENT_TYPE_APPLICATION_READY) {
this.m_logger.info("Sending APPLICATION_READY event to clients.");
IHttpRequest request = new ApplicationReadyHandler();
this.sendRequest(event, request);
}
if (event.getType() == IEventConst.EVENT_TYPE_CALLACCEPTED) {
this.m_logger.info("Sending CALLACCEPTED event to clients.");
IHttpRequest request = new AcceptHandler((ICall) event.getData());
this.sendRequest(event, request);
}
// added: 19/06/2004: Reject flag on client was not set
if (event.getType() == IEventConst.EVENT_TYPE_CALLREJECTED) {
this.m_logger.info("Sending CALLREJECTED event to clients.");
IHttpRequest request = new RejectedHandler((ICall) event.getData());
this.sendRequest(event, request);
}
if (event.getType() == IEventConst.EVENT_TYPE_CALLCLEARED) {
this.m_logger.info("Sending CALLCLEARED event to clients.");
IHttpRequest request = new ClearHandler((ICall) event.getData());
this.sendRequest(event, request);
}
if (event.getType() == IEventConst.EVENT_TYPE_IDENTIFIED_CALL) {
this.m_logger.info("Sending IDENTIFIED_CALL event to clients.");
IHttpRequest request = new IdentifiedCallHandler((ICall) event.getData());
this.sendRequest(event, request);
}
if (event.getType() == IEventConst.EVENT_TYPE_IDENTIFIED_OUTGOING_CALL) {
this.m_logger.info("Sending IDENTIFIED_OUTGOING_CALL event to clients.");
IHttpRequest request = new IdentifiedOutgoingCallHandler((ICall) event.getData());
this.sendRequest(event, request);
}
}
Aggregations