public SIPDialog getEarlyDialog(String dialogId) { SIPDialog sipDialog = (SIPDialog) earlyDialogTable.get(dialogId); if (logger.isLoggingEnabled(LogWriter.TRACE_DEBUG)) { logger.logDebug("getEarlyDialog(" + dialogId + ") : returning " + sipDialog); } return sipDialog; }
public void start(SipStackImpl sipStack, Properties configurationProperties) { sipStackImpl= sipStack; // don't need the properties so nothing to see here started.set(true); if(logger.isLoggingEnabled(StackLogger.TRACE_INFO)) { logger.logInfo("the sip stack timer " + this.getClass().getName() + " has been started"); } }
public static void logError(String message, Exception ex) { if ((parserDebug || debug) && stackLogger != null ) { if ( stackLogger.isLoggingEnabled(LogWriter.TRACE_DEBUG)) stackLogger.logError(message,ex); } }
protected void putSocket(String key, Socket sock) { if (logger.isLoggingEnabled(StackLogger.TRACE_DEBUG)) { logger.logDebug("adding socket for key " + key); } socketTable.put(key, sock); }
protected void removeSocket(String key) { socketTable.remove(key); Semaphore s = socketCreationMap.remove(key); if ( s != null ) { s.release(); } if (logger.isLoggingEnabled(StackLogger.TRACE_DEBUG)) { logger.logDebug("removed Socket and Semaphore for key " + key); } }
public static void println(String s) { if ((parserDebug || debug )&& stackLogger != null ) if ( stackLogger.isLoggingEnabled(LogWriter.TRACE_DEBUG)) stackLogger.logDebug(s + "\n"); } public static void printStackTrace(Exception ex) {
@Override protected void addBytes(byte[] bytes) throws Exception { if(logger.isLoggingEnabled(LogWriter.TRACE_DEBUG)) { logger.logDebug("Adding TLS bytes for decryption " + bytes.length); } if(bytes.length <= 0) return; ByteBuffer buffer = ByteBuffer.wrap(bytes); sslStateMachine.unwrap(buffer); }
public void stop() { started.set(false); cancel(); logger.logStackTrace(StackLogger.TRACE_DEBUG); if(logger.isLoggingEnabled(StackLogger.TRACE_INFO)) { logger.logInfo("the sip stack timer " + this.getClass().getName() + " has been stopped"); } }
public void start(SipStackImpl sipStack, Properties configurationProperties) { sipStackImpl= sipStack; // TODO have a param in the stack properties to set the number of thread for the timer executor threadPoolExecutor.prestartAllCoreThreads(); schedulePurgeTaskIfNeeded(); if(logger.isLoggingEnabled(StackLogger.TRACE_INFO)) { logger.logInfo("the sip stack timer " + this.getClass().getName() + " has been started"); } } /*
public void processMessage(SIPMessage sipMessage, InetAddress address) { this.peerAddress = address; try { processMessage(sipMessage); } catch (Exception e) { if (logger.isLoggingEnabled( ServerLog.TRACE_ERROR)) { logger.logError( "ERROR processing self routing", e); } } }
public void evictSIPDialog() { evict(); if(logger.isLoggingEnabled(StackLogger.TRACE_DEBUG)) { logger.logDebug("HA SIP Dialog " + getKey() + " evicted"); } } }
private void checkSocketState() throws IOException { if (socketChannel != null && (!socketChannel.isConnected() || !socketChannel.isOpen())) { if (logger.isLoggingEnabled(LogLevels.TRACE_DEBUG)) logger.logDebug("Need to reset SSL engine for socket " + socketChannel); try { init(sslStateMachine.sslEngine.getUseClientMode()); } catch (Exception ex) { logger.logError("Cannot reset SSL engine", ex); throw new IOException(ex); } } }
public void sendEncryptedData(byte[] msg) throws IOException { // bypass the encryption for already encrypted data or TLS metadata if (logger.isLoggingEnabled(LogWriter.TRACE_DEBUG)) { logger.logDebug("sendEncryptedData " + " this = " + this + " peerPort = " + peerPort + " addr = " + peerAddress); } lastActivityTimeStamp = System.currentTimeMillis(); NIOHandler nioHandler = ((NioTcpMessageProcessor) messageProcessor).nioHandler; if(this.socketChannel != null && this.socketChannel.isConnected() && this.socketChannel.isOpen()) { nioHandler.putSocket(NIOHandler.makeKey(this.peerAddress, this.peerPort), this.socketChannel); } super.sendMessage(msg, this.peerAddress, this.peerPort, true); }
public void setListeningPoint(ListeningPointImpl lp) { if ( logger.isLoggingEnabled(LogWriter.TRACE_DEBUG)) { this.logger.logDebug("setListeningPoint" + this + " listeningPoint = " + lp); } if ( lp.getPort() != this.getPort()) InternalErrorHandler.handleException ("lp mismatch with provider",logger); this.listeningPoint = lp; }
public void viewChange(View view) { if (clusteredSipStack.getStackLogger().isLoggingEnabled(StackLogger.TRACE_DEBUG)) { clusteredSipStack.getStackLogger().logDebug("sipStack " + clusteredSipStack + " View changed : " + view.getVid()); } }
public void addSipConnector(ListeningPoint listeningPoint) { if(logger.isLoggingEnabled(StackLogger.TRACE_INFO)){ logger.logInfo("Adding Listening Point to be using the Load Balancer for outbound traffic " + listeningPoint.getIPAddress() + ":" + listeningPoint.getPort() + "/" + listeningPoint.getTransport()); logger.logInfo("Recomputing SIP Nodes to be sent to the LB"); } // https://github.com/RestComm/jain-sip.ha/issues/3 we restrict only if one connector is passed forcefully this way useLoadBalancerForAllConnectors = false; sipConnectors.add(listeningPoint); updateConnectorsAsSIPNode(); }
public void cacheStarted(TreeCache cache) { if (clusteredSipStack.getStackLogger().isLoggingEnabled(StackLogger.TRACE_DEBUG)) { clusteredSipStack.getStackLogger().logDebug( "Mobicents JAIN SIP Cache started, state: " + cache.getStateString() + ", Mode: " + cache.getCacheMode()); } }
public void stop() throws SipCacheException { if(!isLocal) { // pojoCache.stopService(); if (clusteredSipStack.getStackLogger().isLoggingEnabled(StackLogger.TRACE_INFO)) { clusteredSipStack.getStackLogger().logInfo( "Mobicents JAIN SIP Tree Cache stopped, state: " + pojoCache.getStateString() + ", Mode: " + pojoCache.getCacheMode()); } // pojoCache.destroyService(); } }
@NodeModified public void nodeModified(NodeModifiedEvent nodeModifiedEvent) { if(nodeModifiedEvent.isOriginLocal()) { return ; } final Fqn fqn = nodeModifiedEvent.getFqn(); if (!nodeModifiedEvent.isOriginLocal() && clusteredlogger.isLoggingEnabled(StackLogger.TRACE_DEBUG)) { clusteredlogger.logDebug("sipStack " + clusteredSipStack + " Node modified : " + fqn + " " + nodeModifiedEvent.getData()); } }
@CacheStarted public void cacheStarted(CacheStartedEvent cacheStartedEvent) { if (clusteredlogger.isLoggingEnabled(StackLogger.TRACE_INFO)) { clusteredlogger.logInfo( "Mobicents Cache started, status: " + cacheStartedEvent.getCache().getCacheStatus() + ", Mode: " + cacheStartedEvent.getCache().getConfiguration().getCacheModeString()); } }