/** * Returns the stack trace as a string. * * @return The stack trace as a string. */ public static String dumpStack() { return dumpStack(new Exception("Stack Dump Generated Exception")); }
/** * {@inheritDoc} */ @Override public void shutdownInput() throws IOException { m_log.debug("Closing input stream from: "+ThreadUtils.dumpStack()); this.m_in.close(); }
/** * {@inheritDoc} */ @Override public void shutdownOutput() throws IOException { m_log.debug("Closing output stream from: "+ThreadUtils.dumpStack()); this.m_out.close(); } }
/** * {@inheritDoc} */ @Override public void close() throws IOException { m_log.debug("Closing socket from: "+ThreadUtils.dumpStack()); this.m_ioSession.close(); }
private void connectToCandidate(final IceCandidate candidate) { if (candidate == null) { m_log.warn("Null candidate?? " + ThreadUtils.dumpStack()); return; } final Runnable threadRunner = new Runnable() { public void run() { Socket sock = null; try { m_log.info("Connecting to: {}", candidate); sock = new Socket(); sock.connect(candidate.getSocketAddress(), 20 * 1000); m_log.info("Connected to: {}", candidate); m_offerAnswerListener.onTcpSocket(sock); } catch (final IOException e) { m_log.warn("Could not connect to relay?", e); } } }; final Thread connectorThread = new Thread(threadRunner, "ICE-TCP-Connect-" + candidate); connectorThread.setDaemon(true); connectorThread.start(); } }
private Object connectToCandidate(final IceCandidate candidate) { if (candidate == null) { log.warn("Null candidate?? " + ThreadUtils.dumpStack()); return null;
@Override public void exceptionCaught(final IoSession session, final Throwable cause) throws Exception { m_log.debug("Caught exception", cause); m_log.debug("Cause trace: "+ThreadUtils.dumpStack(cause.getCause())); this.m_ioHandler1.exceptionCaught(session, cause); this.m_ioHandler2.exceptionCaught(session, cause); }
@Override public void close() throws IOException { m_log.debug("Closing output stream from: "+ThreadUtils.dumpStack()); try { flush(); } finally { m_ioSession.close().join(); } }