if (LogWriter.needsLogging) { sipStack.logMessage("handleEvent " + sipEvent + "currentTransaction = " + transaction + "this.sipListener = " + this.sipListener + "sipEvent.source = " + sipEvent.getSource()); sipStack.logStackTrace(); }
if (sipStack.isLoggingEnabled()) { sipStack.getLogWriter().logDebug( "handleEvent " + sipEvent + "currentTransaction = " + transaction + "this.sipListener = " + this.sipListener + "sipEvent.source = " + sipEvent.getSource()); if (sipEvent instanceof RequestEvent) { Dialog dialog = ((RequestEvent) sipEvent).getDialog(); sipStack.getLogWriter().logDebug("Dialog = " + dialog); } else if (sipEvent instanceof ResponseEvent) { Dialog dialog = ((ResponseEvent) sipEvent).getDialog(); sipStack.getLogWriter().logDebug("Dialog = " + dialog); } sipStack.getLogWriter().logStackTrace(); }
    public void handleEvent(EventObject sipEvent, SIPTransaction transaction) {        if (LogWriter.needsLogging) {            sipStack.logMessage("handleEvent " + sipEvent                    + "currentTransaction = " + transaction                    + "this.sipListener = " + this.sipListener                    + "sipEvent.source = " + sipEvent.getSource());            sipStack.logStackTrace();        }        EventWrapper eventWrapper = new EventWrapper();        eventWrapper.sipEvent = sipEvent;        eventWrapper.transaction = transaction;        if (transaction != null)            transaction.setEventPending();        if (!sipStack.reEntrantListener) {            // Run the event in the context of a single thread.            this.eventScanner.addEvent(eventWrapper);        } else {            // just call the delivery method            this.eventScanner.deliverEvent(eventWrapper);        }    }