Tabnine Logo
ThreadUtils
Code IndexAdd Tabnine to your IDE (free)

How to use
ThreadUtils
in
org.littleshoot.util

Best Java code snippets using org.littleshoot.util.ThreadUtils (Showing top 9 results out of 315)

origin: org.littleshoot/util

/**
 * 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"));
}
origin: org.littleshoot/util

  ThreadUtils.safeSleep(60000);
} else if (!m_firstRun) {
  LOG.debug("Short sleep...");
  ThreadUtils.safeSleep(10000);
origin: org.littleshoot/mina-util

/**
 * {@inheritDoc}
 */
@Override
public void shutdownInput() throws IOException
  {
  m_log.debug("Closing input stream from: "+ThreadUtils.dumpStack());
  this.m_in.close();
  }
origin: org.littleshoot/mina-util

/**
 * {@inheritDoc}
 */
@Override
public void shutdownOutput() throws IOException
  {
  m_log.debug("Closing output stream from: "+ThreadUtils.dumpStack());
  this.m_out.close();
  }
}
origin: org.littleshoot/mina-util

/**
 * {@inheritDoc}
 */
@Override
public void close() throws IOException
  {
  m_log.debug("Closing socket from: "+ThreadUtils.dumpStack());
  this.m_ioSession.close();
  }
origin: org.littleshoot/littleshoot-ice

  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();
  }
}
origin: org.littleshoot/littleshoot-ice

private Object connectToCandidate(final IceCandidate candidate) {
  if (candidate == null) {
    log.warn("Null candidate?? " + ThreadUtils.dumpStack());
    return null;
origin: org.littleshoot/mina-util

@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);
  }
origin: org.littleshoot/mina-util

@Override
public void close() throws IOException 
  {
  m_log.debug("Closing output stream from: "+ThreadUtils.dumpStack());
  try
    {
    flush();
    }
  finally
    {
    m_ioSession.close().join();
    }
  }
org.littleshoot.utilThreadUtils

Javadoc

An implementation of the thread utilities interface.

Most used methods

  • dumpStack
    Returns the stack trace as a string.
  • safeSleep

Popular in Java

  • Finding current android device location
  • scheduleAtFixedRate (ScheduledExecutorService)
  • requestLocationUpdates (LocationManager)
  • setRequestProperty (URLConnection)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now