public abstract class AbstractServerChannel extends AbstractChannel implements ServerChannel
AbstractChannel.GracefulChannelCloseable, AbstractChannel.GracefulState
AbstractCloseable.State
Modifier and Type | Field and Description |
---|---|
protected boolean |
exitStatusSent |
channelListenerProxy, channelListeners, eof, executor, gracefulFuture, gracefulState, handlers, localWindow, remoteWindow, RESPONSE_BUFFER_GROWTH_FACTOR, service, shutdownExecutor
closeFuture, lock, state
log
CHANNEL_EXEC, CHANNEL_SHELL, CHANNEL_SUBSYSTEM
Modifier | Constructor and Description |
---|---|
protected |
AbstractServerChannel() |
protected |
AbstractServerChannel(String discriminator) |
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,
int rwSize,
int 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,
int rwSize,
int packetSize,
Buffer buffer)
For a server channel, this method will actually open the channel
|
protected void |
sendExitStatus(int v) |
addChannelListener, addPendingRequest, addRequestHandler, configureWindow, doCloseImmediately, doWriteData, doWriteExtendedData, getChannelListenerProxy, getExecutorService, getId, getInnerCloseable, getLocalWindow, getParentPropertyResolver, getProperties, getRecipient, getRemoteWindow, getSession, handleChannelRequest, handleClose, handleData, handleEof, handleExtendedData, handleFailure, handleInternalRequest, handleRequest, handleSuccess, handleUnknownChannelRequest, handleWindowAdjust, init, isEofSignalled, isShutdownOnExit, notifyStateChanged, preClose, removeChannelListener, removePendingRequest, sendEof, sendResponse, sendWindowAdjust, setEofSignalled, setExecutorService, setRecipient, setShutdownOnExit, toString, writePacket
doCloseGracefully
builder, close, isClosed, isClosing
close, isOpen
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getId, getLocalWindow, getRecipient, getRemoteWindow, getSession, handleClose, handleData, handleEof, handleExtendedData, handleFailure, handleRequest, handleSuccess, handleWindowAdjust, init
addChannelListener, getChannelListenerProxy, removeChannelListener
getParentPropertyResolver, getProperties
protected AbstractServerChannel()
protected AbstractServerChannel(String discriminator)
public ServerSession getServerSession()
getServerSession
in interface ServerSessionHolder
ServerSession
usedpublic OpenFuture open(int recipient, int rwSize, int packetSize, Buffer buffer)
Channel
recipient
- Recipient identifierrwSize
- Read/Write window sizepacketSize
- Preferred maximum packet sizebuffer
- 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, int rwSize, int packetSize, Buffer buffer) throws IOException
Channel
recipient
- Recipient identifierrwSize
- Read/Write window sizepacketSize
- Preferred maximum packet sizebuffer
- 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)
Channel
buffer
- 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
IOException
Copyright © 2008–2016 The Apache Software Foundation. All rights reserved.