Package io.netty.channel.kqueue
Class AbstractKQueueChannel.AbstractKQueueUnsafe
- java.lang.Object
-
- io.netty.channel.AbstractChannel.AbstractUnsafe
-
- io.netty.channel.kqueue.AbstractKQueueChannel.AbstractKQueueUnsafe
-
- All Implemented Interfaces:
Channel.Unsafe,IoHandle,KQueueIoHandle,java.lang.AutoCloseable
- Direct Known Subclasses:
AbstractKQueueServerChannel.KQueueServerSocketUnsafe,AbstractKQueueStreamChannel.KQueueStreamUnsafe,KQueueDatagramChannel.KQueueDatagramChannelUnsafe,KQueueDomainDatagramChannel.KQueueDomainDatagramChannelUnsafe
- Enclosing class:
- AbstractKQueueChannel
@UnstableApi public abstract class AbstractKQueueChannel.AbstractKQueueUnsafe extends AbstractChannel.AbstractUnsafe implements KQueueIoHandle
-
-
Field Summary
Fields Modifier and Type Field Description private KQueueRecvByteAllocatorHandleallocHandle(package private) booleanreadPending
-
Constructor Summary
Constructors Constructor Description AbstractKQueueUnsafe()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description (package private) Channelchannel()protected voidclearReadFilter0()voidclose()Called once theIoHandleshould be closed.voidconnect(java.net.SocketAddress remoteAddress, java.net.SocketAddress localAddress, ChannelPromise promise)private booleandoFinishConnect()(package private) booleanfailConnectPromise(java.lang.Throwable cause)private voidfinishConnect()private voidfireEventAndClose(java.lang.Object evt)protected voidflush0()private voidfulfillConnectPromise(ChannelPromise promise, boolean wasActive)private voidfulfillConnectPromise(ChannelPromise promise, java.lang.Throwable cause)voidhandle(IoRegistration registration, IoEvent event)Be called once there is something to handle.intident()Return the ident of theIoHandle.private voidreadEOF()(package private) abstract voidreadReady(KQueueRecvByteAllocatorHandle allocHandle)KQueueRecvByteAllocatorHandlerecvBufAllocHandle()Return the assignedRecvByteBufAllocator.Handlewhich will be used to allocateByteBuf's when receiving data.(package private) booleanshouldStopReading(ChannelConfig config)(package private) voidshutdownInput(boolean readEOF)Shutdown the input side of the channel.private voidwriteReady()-
Methods inherited from class io.netty.channel.AbstractChannel.AbstractUnsafe
annotateConnectException, beginRead, bind, close, close, closeForcibly, closeIfClosed, deregister, disconnect, ensureOpen, flush, handleWriteError, localAddress, outboundBuffer, prepareToClose, register, remoteAddress, safeSetFailure, safeSetSuccess, shutdownOutput, voidPromise, write
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.netty.channel.IoHandle
registered, unregistered
-
-
-
-
Field Detail
-
readPending
boolean readPending
-
allocHandle
private KQueueRecvByteAllocatorHandle allocHandle
-
-
Method Detail
-
channel
Channel channel()
-
ident
public int ident()
Description copied from interface:KQueueIoHandleReturn the ident of theIoHandle.- Specified by:
identin interfaceKQueueIoHandle- Returns:
- ident.
-
close
public void close()
Description copied from interface:IoHandleCalled once theIoHandleshould be closed. Even once this method is called this handle might still receive events viaIoHandle.handle(IoRegistration, IoEvent)(if it was previous be registered and so itsIoHandle.registered()method was called) until theIoHandle.unregistered()method is called.
-
handle
public void handle(IoRegistration registration, IoEvent event)
Description copied from interface:IoHandleBe called once there is something to handle.
-
readReady
abstract void readReady(KQueueRecvByteAllocatorHandle allocHandle)
-
shouldStopReading
final boolean shouldStopReading(ChannelConfig config)
-
failConnectPromise
final boolean failConnectPromise(java.lang.Throwable cause)
-
writeReady
private void writeReady()
-
shutdownInput
void shutdownInput(boolean readEOF)
Shutdown the input side of the channel.
-
readEOF
private void readEOF()
-
recvBufAllocHandle
public KQueueRecvByteAllocatorHandle recvBufAllocHandle()
Description copied from interface:Channel.UnsafeReturn the assignedRecvByteBufAllocator.Handlewhich will be used to allocateByteBuf's when receiving data.- Specified by:
recvBufAllocHandlein interfaceChannel.Unsafe- Overrides:
recvBufAllocHandlein classAbstractChannel.AbstractUnsafe
-
flush0
protected final void flush0()
- Overrides:
flush0in classAbstractChannel.AbstractUnsafe
-
clearReadFilter0
protected final void clearReadFilter0()
-
fireEventAndClose
private void fireEventAndClose(java.lang.Object evt)
-
connect
public void connect(java.net.SocketAddress remoteAddress, java.net.SocketAddress localAddress, ChannelPromise promise)Description copied from interface:Channel.UnsafeConnect theChannelof the givenChannelFuturewith the given remoteSocketAddress. If a specific localSocketAddressshould be used it need to be given as argument. Otherwise just passnullto it. TheChannelPromisewill get notified once the connect operation was complete.- Specified by:
connectin interfaceChannel.Unsafe
-
fulfillConnectPromise
private void fulfillConnectPromise(ChannelPromise promise, boolean wasActive)
-
fulfillConnectPromise
private void fulfillConnectPromise(ChannelPromise promise, java.lang.Throwable cause)
-
finishConnect
private void finishConnect()
-
doFinishConnect
private boolean doFinishConnect() throws java.lang.Exception- Throws:
java.lang.Exception
-
-