| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Destroy the
IoHandler and free all its resources. |
boolean |
isCompatible(Class<? extends IoHandle> handleType)
Returns
true if the given type is compatible with this IoHandler and so can be registered,
false otherwise. |
static IoHandlerFactory |
newFactory()
Returns a new
IoHandlerFactory that creates LocalIoHandler instances. |
void |
prepareToDestroy()
Prepare to destroy this
IoHandler. |
IoRegistration |
register(IoEventLoop eventLoop,
IoHandle handle)
Register a
IoHandle for IO. |
int |
run(IoExecutionContext runner)
Run the IO handled by this
IoHandler. |
void |
wakeup(IoEventLoop eventLoop)
Wakeup the
IoHandler, which means if any operation blocks it should be unblocked and
return as soon as possible. |
public static IoHandlerFactory newFactory()
IoHandlerFactory that creates LocalIoHandler instances.public int run(IoExecutionContext runner)
IoHandlerIoHandler. The IoExecutionContext should be used
to ensure we not execute too long and so block the processing of other task that are
scheduled on the EventLoop. This is done by taking IoExecutionContext.delayNanos(long) or
IoExecutionContext.deadlineNanos() into account.public void wakeup(IoEventLoop eventLoop)
IoHandlerIoHandler, which means if any operation blocks it should be unblocked and
return as soon as possible.public void prepareToDestroy()
IoHandlerIoHandler. This method will be called before IoHandler.destroy() and may be
called multiple times.prepareToDestroy in interface IoHandlerpublic void destroy()
IoHandlerpublic IoRegistration register(IoEventLoop eventLoop, IoHandle handle)
IoHandlerIoHandle for IO.register in interface IoHandlereventLoop - the IoEventLoop that did issue the registration.handle - the IoHandle to register.public boolean isCompatible(Class<? extends IoHandle> handleType)
IoHandlertrue if the given type is compatible with this IoHandler and so can be registered,
false otherwise.isCompatible in interface IoHandlerhandleType - the type of the IoHandle.Copyright © 2008–2025 The Netty Project. All rights reserved.