public abstract class AbstractServerChannel extends AbstractChannel implements ServerChannel
AbstractChannel.GracefulChannelCloseable, AbstractChannel.GracefulState, AbstractChannel.PacketValidatorAbstractCloseable.StateAttributeRepository.AttributeKey<T>| Modifier and Type | Field and Description |
|---|---|
protected AtomicBoolean |
exitStatusSent |
channelListenerProxy, channelListeners, closeSignaled, DEFAULT_PACKET_VALIDATOR, eofReceived, eofSent, gracefulFuture, gracefulState, initialized, RESPONSE_BUFFER_GROWTH_FACTOR, service, unregisterSignaledcloseFuture, futureLock, statelogCHANNEL_EXEC, CHANNEL_SHELL, CHANNEL_SUBSYSTEMEMPTYNONE| Modifier | Constructor and Description |
|---|---|
protected |
AbstractServerChannel(CloseableExecutorService executor) |
protected |
AbstractServerChannel(String discriminator,
Collection<? extends RequestHandler<Channel>> handlers,
CloseableExecutorService executor) |
| Modifier and Type | Method and Description |
|---|---|
protected OpenFuture |
doInit(Buffer buffer) |
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(long 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(long 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, attributeKeys, clearAttributes, computeAttributeIfAbsent, configureWindow, doWriteData, doWriteExtendedData, getAttribute, getAttributesCount, getChannelId, getChannelListenerProxy, getChannelStreamWriterResolver, getExecutorService, getInnerCloseable, getLocalWindow, getPacketValidator, getParentPropertyResolver, getProperties, getRecipient, getRemoteWindow, getRequestHandlers, getSession, handleChannelRegistrationResult, handleChannelRequest, handleChannelUnregistration, handleClose, handleData, handleEof, handleExtendedData, handleFailure, handleInternalRequest, handleRequest, handleSuccess, handleUnknownChannelRequest, handleWindowAdjust, init, invokeChannelSignaller, isEofSent, isEofSignalled, isInitialized, mayWrite, notifyStateChanged, notifyStateChanged, preClose, removeAttribute, removeChannelListener, removePendingRequest, removeRequestHandler, resolveChannelStreamWriterResolver, sendEof, sendResponse, sendWindowAdjust, setAttribute, setChannelStreamWriterResolver, setPacketValidator, setRecipient, signalChannelClosed, signalChannelClosed, signalChannelInitialized, signalChannelInitialized, signalChannelOpenFailure, signalChannelOpenFailure, signalChannelOpenSuccess, signalChannelOpenSuccess, toString, validateIncomingDataSize, writePacketdoCloseGracefully, doCloseImmediatelyaddCloseFutureListener, builder, close, getFutureLock, isClosed, isClosing, removeCloseFutureListenerdebug, debug, debug, debug, debug, error, error, error, error, error, getSimplifiedLogger, info, info, warn, warn, warn, warn, warn, warn, warn, warnclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetServerSessionaddRequestHandler, addRequestHandlers, getLocalWindow, getRecipient, getRemoteWindow, getRequestHandlers, handleChannelRegistrationResult, handleChannelUnregistration, handleClose, handleData, handleEof, handleExtendedData, handleFailure, handleRequest, handleSuccess, handleWindowAdjust, init, isEofSignalled, isInitialized, removeRequestHandler, removeRequestHandlers, resolveAttribute, resolveAttribute, writePacketgetSession, getSessionContextgetChannelIdaddChannelListener, getChannelListenerProxy, removeChannelListenergetBoolean, getBooleanProperty, getCharset, getInteger, getIntProperty, getLong, getLongProperty, getObject, getParentPropertyResolver, getProperties, getString, getStringProperty, isEmpty, isEmptyclearAttributes, computeAttributeIfAbsent, removeAttribute, setAttributeattributeKeys, getAttribute, getAttributesCount, ofAttributesMap, ofKeyValuePairgetChannelStreamWriterResolver, resolveChannelStreamWriter, resolveChannelStreamWriterResolver, setChannelStreamWriterResolveraddCloseFutureListener, close, close, close, getMaxCloseWaitTime, isClosed, isClosing, isOpen, removeCloseFutureListenerprotected final AtomicBoolean exitStatusSent
protected AbstractServerChannel(CloseableExecutorService executor)
protected AbstractServerChannel(String discriminator, Collection<? extends RequestHandler<Channel>> handlers, CloseableExecutorService executor)
public OpenFuture open(long recipient, long rwSize, long packetSize, Buffer buffer)
Channelrecipient - Recipient identifier (UINT32 represented as a long)rwSize - 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(long recipient,
long rwSize,
long packetSize,
Buffer buffer)
throws IOException
Channelrecipient - Recipient identifier (UINT32 represented as a long)rwSize - 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–2024 The Apache Software Foundation. All rights reserved.