Class NioIoHandler.DefaultNioRegistration
java.lang.Object
io.netty.channel.nio.NioIoHandler.DefaultNioRegistration
- All Implemented Interfaces:
IoRegistration
- Enclosing class:
NioIoHandler
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AtomicBooleanprivate final NioIoHandleprivate SelectionKey -
Constructor Summary
ConstructorsConstructorDescriptionDefaultNioRegistration(ThreadAwareExecutor executor, NioIoHandle handle, NioIoOps initialOps, Selector selector) -
Method Summary
Modifier and TypeMethodDescription<T> TImplementation specific attachment, which might benull.booleancancel()Cancel the registration.(package private) voidclose()(package private) NioIoHandlehandle()(package private) voidhandle(int ready) booleanisValid()Returnstrueif the registration is still valid.(package private) voidlongSubmit theIoOpsto the registration.
-
Field Details
-
canceled
-
handle
-
key
-
-
Constructor Details
-
DefaultNioRegistration
DefaultNioRegistration(ThreadAwareExecutor executor, NioIoHandle handle, NioIoOps initialOps, Selector selector) throws IOException - Throws:
IOException
-
-
Method Details
-
handle
NioIoHandle handle() -
register
- Throws:
IOException
-
attachment
public <T> T attachment()Description copied from interface:IoRegistrationImplementation specific attachment, which might benull.- Specified by:
attachmentin interfaceIoRegistration- Returns:
- attachment.
-
isValid
public boolean isValid()Description copied from interface:IoRegistrationReturnstrueif the registration is still valid. OnceIoRegistration.cancel()is called this will returnfalse.- Specified by:
isValidin interfaceIoRegistration- Returns:
- valid.
-
submit
Description copied from interface:IoRegistrationSubmit theIoOpsto the registration.- Specified by:
submitin interfaceIoRegistration- Parameters:
ops- ops.- Returns:
- an identifier for the operation, which might be unique or not (depending on the implementation).
-
cancel
public boolean cancel()Description copied from interface:IoRegistrationCancel the registration.- Specified by:
cancelin interfaceIoRegistration- Returns:
trueif cancellation was successful,falseotherwise.
-
close
void close() -
handle
void handle(int ready)
-