- java.lang.Object
-
- io.netty5.channel.local.LocalHandler
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidderegister(IoHandle handle)Deregister aIoHandlefor IO.voiddestroy()Destroy theIoHandlerand free all its resources.booleanisCompatible(Class<? extends IoHandle> handleType)Returnstrueif the given type is compatible with thisIoHandlerand so can be registered,falseotherwise.static IoHandlerFactorynewFactory()Returns a newIoHandlerFactorythat createsLocalHandlerinstances.voidprepareToDestroy()Prepare to destroy thisIoHandler.voidregister(IoHandle handle)Register aChannelfor IO.intrun(IoExecutionContext runner)Run the IO handled by thisIoHandler.voidwakeup(boolean inEventLoop)Wakeup theIoHandler, which means if any operation blocks it should be unblocked and return as soon as possible.
-
-
-
Method Detail
-
newFactory
public static IoHandlerFactory newFactory()
Returns a newIoHandlerFactorythat createsLocalHandlerinstances.
-
run
public int run(IoExecutionContext runner)
Description copied from interface:IoHandlerRun the IO handled by thisIoHandler. TheIoExecutionContextshould be used to ensure we not execute too long and so block the processing of other task that are scheduled on theEventLoop. This is done by takingIoExecutionContext.delayNanos(long)orIoExecutionContext.deadlineNanos()into account.
-
wakeup
public void wakeup(boolean inEventLoop)
Description copied from interface:IoHandlerWakeup theIoHandler, which means if any operation blocks it should be unblocked and return as soon as possible.
-
prepareToDestroy
public void prepareToDestroy()
Description copied from interface:IoHandlerPrepare to destroy thisIoHandler. This method will be called beforeIoHandler.destroy()and may be called multiple times.- Specified by:
prepareToDestroyin interfaceIoHandler
-
destroy
public void destroy()
Description copied from interface:IoHandlerDestroy theIoHandlerand free all its resources.
-
register
public void register(IoHandle handle)
Description copied from interface:IoHandlerRegister aChannelfor IO.
-
deregister
public void deregister(IoHandle handle)
Description copied from interface:IoHandlerDeregister aIoHandlefor IO.- Specified by:
deregisterin interfaceIoHandler- Parameters:
handle- theIoHandleto deregister..
-
isCompatible
public boolean isCompatible(Class<? extends IoHandle> handleType)
Description copied from interface:IoHandlerReturnstrueif the given type is compatible with thisIoHandlerand so can be registered,falseotherwise.- Specified by:
isCompatiblein interfaceIoHandler- Parameters:
handleType- the type of theIoHandle.- Returns:
- if compatible of not.
-
-