public class Ctx extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Ctx.Endpoint |
| Constructor and Description |
|---|
Ctx() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkTag()
Deprecated.
use
isActive() instead |
boolean |
closeSelector(Selector selector) |
Selector |
createSelector() |
SocketBase |
createSocket(int type) |
Errno |
errno() |
int |
get(int option) |
Thread.UncaughtExceptionHandler |
getNotificationExceptionHandler() |
Thread.UncaughtExceptionHandler |
getUncaughtExceptionHandler() |
boolean |
isActive() |
boolean |
set(int option,
int optval) |
void |
setNotificationExceptionHandler(Thread.UncaughtExceptionHandler handler)
In
Poller.run(), some non-fatal exceptions can be thrown. |
void |
setUncaughtExceptionHandler(Thread.UncaughtExceptionHandler handler)
Set the handler invoked when a
Poller abruptly terminates due to an uncaught exception. |
void |
terminate() |
public boolean isActive()
terminate()terminate() has been called.@Deprecated public boolean checkTag()
isActive() insteadterminate()terminate() has been called.public void terminate()
public void setUncaughtExceptionHandler(Thread.UncaughtExceptionHandler handler)
Poller abruptly terminates due to an uncaught exception.
It default to the value of Thread.getDefaultUncaughtExceptionHandler()
handler - The object to use as this thread's uncaught exception handler. If null then this thread has no explicit handler.public Thread.UncaughtExceptionHandler getUncaughtExceptionHandler()
Poller abruptly terminates due to an uncaught exception.public void setNotificationExceptionHandler(Thread.UncaughtExceptionHandler handler)
Poller.run(), some non-fatal exceptions can be thrown. This handler will be notified, so they can
be logged.
Default to Throwable.printStackTrace()
handler - The object to use as this thread's handler for recoverable exceptions notifications.public Thread.UncaughtExceptionHandler getNotificationExceptionHandler()
public boolean set(int option,
int optval)
public int get(int option)
public SocketBase createSocket(int type)
public Selector createSelector()
public boolean closeSelector(Selector selector)
public Errno errno()
Copyright © 2022. All rights reserved.