Package io.netty.channel
Class SingleThreadIoEventLoop.IoRegistrationWrapper
- java.lang.Object
-
- io.netty.channel.SingleThreadIoEventLoop.IoRegistrationWrapper
-
- All Implemented Interfaces:
IoRegistration
- Enclosing class:
- SingleThreadIoEventLoop
private final class SingleThreadIoEventLoop.IoRegistrationWrapper extends java.lang.Object implements IoRegistration
-
-
Field Summary
Fields Modifier and Type Field Description private IoRegistrationregistration
-
Constructor Summary
Constructors Constructor Description IoRegistrationWrapper(IoRegistration registration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> Tattachment()Implementation specific attachment, which might benull.booleancancel()Cancel the registration.booleanisValid()Returnstrueif the registration is still valid.longsubmit(IoOps ops)Submit theIoOpsto the registration.
-
-
-
Field Detail
-
registration
private final IoRegistration registration
-
-
Constructor Detail
-
IoRegistrationWrapper
IoRegistrationWrapper(IoRegistration registration)
-
-
Method Detail
-
attachment
public <T> T attachment()
Description copied from interface:IoRegistrationImplementation specific attachment, which might benull.- Specified by:
attachmentin interfaceIoRegistration- Returns:
- attachment.
-
submit
public long submit(IoOps ops)
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).
-
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.
-
cancel
public boolean cancel()
Description copied from interface:IoRegistrationCancel the registration.- Specified by:
cancelin interfaceIoRegistration- Returns:
trueif cancellation was successful,falseotherwise.
-
-