public abstract class AbstractServerChannel extends AbstractChannel implements ServerChannel
AbstractChannel.GracefulChannelCloseable, AbstractChannel.GracefulStateAbstractCloseable.StateAttributeStore.AttributeKey<T>| Modifier and Type | Field and Description |
|---|---|
protected AtomicBoolean |
exitStatusSent |
channelListenerProxy, channelListeners, eofReceived, eofSent, gracefulFuture, gracefulState, initialized, RESPONSE_BUFFER_GROWTH_FACTOR, servicecloseFuture, lock, statelogCHANNEL_EXEC, CHANNEL_SHELL, CHANNEL_SUBSYSTEMEMPTYCLOSE_WAIT_TIMEOUT, DEFAULT_CLOSE_WAIT_TIMEOUT| Modifier | Constructor and Description |
|---|---|
protected |
AbstractServerChannel() |
protected |
AbstractServerChannel(Collection<? extends RequestHandler<Channel>> handlers) |
protected |
AbstractServerChannel(String discriminator,
Collection<? extends RequestHandler<Channel>> handlers) |
| Modifier and Type | Method and Description |
|---|---|
protected OpenFuture |
doInit(Buffer buffer) |
ServerSession |
getServerSession() |
void |
handleOpenFailure(Buffer buffer)
For a client channel, this method will be called internally by the
session when the server has rejected this channel opening.
|
void |
handleOpenSuccess(int recipient,
long rwSize,
long packetSize,
Buffer buffer)
For a client channel, this method will be called internally by the
session when the confirmation has been received.
|
OpenFuture |
open(int recipient,
long rwSize,
long packetSize,
Buffer buffer)
For a server channel, this method will actually open the channel
|
protected void |
sendExitStatus(int v) |
addChannelListener, addPendingRequest, addRequestHandler, close, configureWindow, doCloseImmediately, doWriteData, doWriteExtendedData, getAttribute, getChannelListenerProxy, getExecutorService, getId, getInnerCloseable, getLocalWindow, getParentPropertyResolver, getProperties, getRecipient, getRemoteWindow, getRequestHandlers, getSession, handleChannelRequest, handleClose, handleData, handleEof, handleExtendedData, handleFailure, handleInternalRequest, handleRequest, handleSuccess, handleUnknownChannelRequest, handleWindowAdjust, init, invokeChannelSignaller, isEofSent, isEofSignalled, isInitialized, isShutdownOnExit, notifyStateChanged, notifyStateChanged, preClose, removeAttribute, removeChannelListener, removePendingRequest, removeRequestHandler, resolveAttribute, sendEof, sendResponse, sendWindowAdjust, setAttribute, setExecutorService, setRecipient, setShutdownOnExit, signalChannelClosed, signalChannelClosed, signalChannelInitialized, signalChannelInitialized, signalChannelOpenFailure, signalChannelOpenFailure, signalChannelOpenSuccess, signalChannelOpenSuccess, toString, validateIncomingDataSize, writePacketdoCloseGracefullyaddCloseFutureListener, builder, isClosed, isClosing, removeCloseFutureListenergetSimplifiedLoggerclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddRequestHandler, addRequestHandlers, getId, getLocalWindow, getRecipient, getRemoteWindow, getRequestHandlers, getSession, handleClose, handleData, handleEof, handleExtendedData, handleFailure, handleRequest, handleSuccess, handleWindowAdjust, init, isEofSignalled, isInitialized, removeRequestHandler, removeRequestHandlersaddChannelListener, getChannelListenerProxy, removeChannelListenergetBoolean, getBooleanProperty, getInteger, getIntProperty, getLong, getLongProperty, getObject, getParentPropertyResolver, getProperties, getString, getStringPropertygetAttribute, removeAttribute, resolveAttribute, resolveAttribute, resolveAttribute, resolveAttribute, setAttributeaddCloseFutureListener, close, close, close, getMaxCloseWaitTime, isClosed, isClosing, isOpen, removeCloseFutureListenerprotected final AtomicBoolean exitStatusSent
protected AbstractServerChannel()
protected AbstractServerChannel(Collection<? extends RequestHandler<Channel>> handlers)
protected AbstractServerChannel(String discriminator, Collection<? extends RequestHandler<Channel>> handlers)
public ServerSession getServerSession()
getServerSession in interface ServerSessionHolderServerSession usedpublic OpenFuture open(int recipient, long rwSize, long packetSize, Buffer buffer)
Channelrecipient - Recipient identifierrwSize - Read/Write window size (uint32)packetSize - Preferred maximum packet size (uint32)buffer - Incoming Buffer that triggered the call.
Note: the buffer's read position is exactly
after the information that read to this call
was decodedOpenFuture for the channel open requestpublic void handleOpenSuccess(int recipient,
long rwSize,
long packetSize,
Buffer buffer)
throws IOException
Channelrecipient - Recipient identifierrwSize - Read/Write window size (uint32)packetSize - Preferred maximum packet size (uint32)buffer - Incoming Buffer that triggered the call.
Note: the buffer's read position is exactly
after the information that read to this call
was decodedIOException - If failed to handle the successpublic void handleOpenFailure(Buffer buffer)
Channelbuffer - Incoming Buffer that triggered the call.
Note: the buffer's read position is exactly
after the information that read to this call
was decodedprotected OpenFuture doInit(Buffer buffer)
protected void sendExitStatus(int v)
throws IOException
IOExceptionCopyright © 2008–2017 The Apache Software Foundation. All rights reserved.