public class AjpClientChannel extends AbstractFramedChannel<AjpClientChannel,AbstractAjpClientStreamSourceChannel,AbstractAjpClientStreamSinkChannel>
Constructor and Description |
---|
AjpClientChannel(org.xnio.StreamConnection connectedStreamChannel, ByteBufferPool bufferPool, org.xnio.OptionMap settings) Create a new AbstractFramedChannel 8 |
Modifier and Type | Method and Description |
---|---|
protected void | closeSubChannels() Method that is called when the channel is being forcibly closed, and all sub stream sink/source channels should also be forcibly closed. |
protected AbstractAjpClientStreamSourceChannel | createChannel(FrameHeaderData frameHeaderData, PooledByteBuffer frameData) Method that creates the actual stream source channel implementation that is in use. |
protected Collection<AbstractFramedStreamSourceChannel<AjpClientChannel,AbstractAjpClientStreamSourceChannel,AbstractAjpClientStreamSinkChannel>> | getReceivers() |
protected org.xnio.OptionMap | getSettings() |
protected void | handleBrokenSinkChannel(Throwable e) Method that is invoked when then write side of a channel is broken. |
protected void | handleBrokenSourceChannel(Throwable e) Method that is invoked when the read side of the channel is broken. |
protected boolean | isLastFrameReceived() Returns true if the protocol specific final frame has been received. |
protected boolean | isLastFrameSent() |
boolean | isOpen() |
protected void | lastDataRead() Method than is invoked when read() returns -1. |
protected FrameHeaderData | parseFrame(ByteBuffer data) Attempts to parse an incoming frame header from the data in the buffer. |
protected void | recalculateHeldFrames() |
void | sendPing(ClientConnection.PingListener pingListener, long timeout, TimeUnit timeUnit) |
AjpClientRequestClientStreamSinkChannel | sendRequest(HttpString method, String path, HttpString protocol, HeaderMap headers, Attachable attachable, org.xnio.ChannelListener<AjpClientRequestClientStreamSinkChannel> finishListener) |
addCloseTask, close, createIdleTimeoutChannel, flush, flushSenders, getBufferPool, getCloseSetter, getDestinationAddress, getFramePriority, getIdleTimeout, getIoThread, getLocalAddress, getLocalAddress, getOption, getPeerAddress, getPeerAddress, getReceiveSetter, getSourceAddress, getUnderlyingConnection, getWorker, isReadsBroken, isReceivesResumed, isRequireExplicitFlush, isWritesBroken, markReadsBroken, markWritesBroken, queueFrame, receive, resumeReceives, setIdleTimeout, setOption, setRequireExplicitFlush, supportsOption, suspendReceives, toString, writeExceptionHandler
public AjpClientChannel(org.xnio.StreamConnection connectedStreamChannel, ByteBufferPool bufferPool, org.xnio.OptionMap settings)
AbstractFramedChannel
8connectedStreamChannel
- The ConnectedStreamChannel
over which the WebSocket Frames should get send and received. Be aware that it already must be "upgraded".bufferPool
- The Pool
which will be used to acquire ByteBuffer
's from.protected AbstractAjpClientStreamSourceChannel createChannel(FrameHeaderData frameHeaderData, PooledByteBuffer frameData) throws IOException
AbstractFramedChannel
createChannel
in class AbstractFramedChannel<AjpClientChannel,AbstractAjpClientStreamSourceChannel,AbstractAjpClientStreamSinkChannel>
frameHeaderData
- The header data, as returned by AbstractFramedChannel.parseFrame(java.nio.ByteBuffer)
frameData
- Any additional data for the frame that has already been read. This may not be the complete frame contentsIOException
protected FrameHeaderData parseFrame(ByteBuffer data) throws IOException
AbstractFramedChannel
parseFrame
in class AbstractFramedChannel<AjpClientChannel,AbstractAjpClientStreamSourceChannel,AbstractAjpClientStreamSinkChannel>
data
- The data that has been read from the channelnull
if the data was incompleteIOException
- If the data could not be parsed.public AjpClientRequestClientStreamSinkChannel sendRequest(HttpString method, String path, HttpString protocol, HeaderMap headers, Attachable attachable, org.xnio.ChannelListener<AjpClientRequestClientStreamSinkChannel> finishListener)
protected boolean isLastFrameReceived()
AbstractFramedChannel
isLastFrameReceived
in class AbstractFramedChannel<AjpClientChannel,AbstractAjpClientStreamSourceChannel,AbstractAjpClientStreamSinkChannel>
true
If the last frame has been receivedprotected boolean isLastFrameSent()
isLastFrameSent
in class AbstractFramedChannel<AjpClientChannel,AbstractAjpClientStreamSourceChannel,AbstractAjpClientStreamSinkChannel>
true
If the last frame has been sentprotected void lastDataRead()
AbstractFramedChannel
protected void handleBrokenSourceChannel(Throwable e)
AbstractFramedChannel
protected void handleBrokenSinkChannel(Throwable e)
AbstractFramedChannel
protected void closeSubChannels()
AbstractFramedChannel
protected Collection<AbstractFramedStreamSourceChannel<AjpClientChannel,AbstractAjpClientStreamSourceChannel,AbstractAjpClientStreamSinkChannel>> getReceivers()
protected org.xnio.OptionMap getSettings()
public boolean isOpen()
isOpen
in interface Channel
isOpen
in class AbstractFramedChannel<AjpClientChannel,AbstractAjpClientStreamSourceChannel,AbstractAjpClientStreamSinkChannel>
protected void recalculateHeldFrames() throws IOException
public void sendPing(ClientConnection.PingListener pingListener, long timeout, TimeUnit timeUnit)
Copyright © 2020 JBoss by Red Hat. All rights reserved.