Class Ctx


public class Ctx extends Object
  • Constructor Details

    • Ctx

      public Ctx()
  • Method Details

    • isActive

      public boolean isActive()
      Returns:
      false if terminate()terminate() has been called.
    • checkTag

      @Deprecated public boolean checkTag()
      Deprecated.
      use isActive() instead
      Returns:
      false if terminate()terminate() has been called.
    • terminate

      public void terminate()
    • setUncaughtExceptionHandler

      public void setUncaughtExceptionHandler(Thread.UncaughtExceptionHandler handler)
      Set the handler invoked when a Poller abruptly terminates due to an uncaught exception.

      It default to the value of Thread.getDefaultUncaughtExceptionHandler()

      Parameters:
      handler - The object to use as this thread's uncaught exception handler. If null then this thread has no explicit handler.
    • getUncaughtExceptionHandler

      public Thread.UncaughtExceptionHandler getUncaughtExceptionHandler()
      Returns:
      The handler invoked when a Poller abruptly terminates due to an uncaught exception.
    • setNotificationExceptionHandler

      public void setNotificationExceptionHandler(Thread.UncaughtExceptionHandler handler)
      In Poller.run(), some non-fatal exceptions can be thrown. This handler will be notified, so they can be logged.

      Default to Throwable.printStackTrace()

      Parameters:
      handler - The object to use as this thread's handler for recoverable exceptions notifications.
    • getNotificationExceptionHandler

      public Thread.UncaughtExceptionHandler getNotificationExceptionHandler()
      Returns:
      The handler invoked when a non-fatal exceptions is thrown in zmq.poll.Poller#run()
    • set

      public boolean set(int option, int optval)
    • get

      public int get(int option)
    • createSocket

      public SocketBase createSocket(int type)
    • createSelector

      public Selector createSelector()
    • closeSelector

      public boolean closeSelector(Selector selector)
    • errno

      public Errno errno()