java.io.Closeable, java.lang.AutoCloseable, java.nio.channels.Channel, java.nio.channels.InterruptibleChannel, org.xnio.channels.BoundChannel, org.xnio.channels.CloseableChannel, org.xnio.channels.Configurable, org.xnio.channels.ConnectedChannelpublic class AjpClientChannel extends AbstractFramedChannel<AjpClientChannel,AbstractAjpClientStreamSourceChannel,AbstractAjpClientStreamSinkChannel>
| Constructor | Description |
|---|---|
AjpClientChannel(org.xnio.StreamConnection connectedStreamChannel,
ByteBufferPool bufferPool,
org.xnio.OptionMap settings) |
Create a new
AbstractFramedChannel
8 |
| Modifier and Type | Method | 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 java.util.Collection<AbstractFramedStreamSourceChannel<AjpClientChannel,AbstractAjpClientStreamSourceChannel,AbstractAjpClientStreamSinkChannel>> |
getReceivers() |
|
protected org.xnio.OptionMap |
getSettings() |
|
protected void |
handleBrokenSinkChannel(java.lang.Throwable e) |
Method that is invoked when then write side of a channel is broken.
|
protected void |
handleBrokenSourceChannel(java.lang.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(java.nio.ByteBuffer data) |
Attempts to parse an incoming frame header from the data in the buffer.
|
protected void |
recalculateHeldFrames() |
|
AjpClientRequestClientStreamSinkChannel |
sendRequest(HttpString method,
java.lang.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, writeExceptionHandlerpublic 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 java.io.IOException
AbstractFramedChannelcreateChannel 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 contentsjava.io.IOExceptionprotected FrameHeaderData parseFrame(java.nio.ByteBuffer data) throws java.io.IOException
AbstractFramedChannelparseFrame in class AbstractFramedChannel<AjpClientChannel,AbstractAjpClientStreamSourceChannel,AbstractAjpClientStreamSinkChannel>data - The data that has been read from the channelnull if the data was incompletejava.io.IOException - If the data could not be parsed.public AjpClientRequestClientStreamSinkChannel sendRequest(HttpString method, java.lang.String path, HttpString protocol, HeaderMap headers, Attachable attachable, org.xnio.ChannelListener<AjpClientRequestClientStreamSinkChannel> finishListener)
protected boolean isLastFrameReceived()
AbstractFramedChannelisLastFrameReceived 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()
AbstractFramedChannelprotected void handleBrokenSourceChannel(java.lang.Throwable e)
AbstractFramedChannelprotected void handleBrokenSinkChannel(java.lang.Throwable e)
AbstractFramedChannelprotected void closeSubChannels()
AbstractFramedChannelprotected java.util.Collection<AbstractFramedStreamSourceChannel<AjpClientChannel,AbstractAjpClientStreamSourceChannel,AbstractAjpClientStreamSinkChannel>> getReceivers()
protected org.xnio.OptionMap getSettings()
public boolean isOpen()
isOpen in interface java.nio.channels.ChannelisOpen in class AbstractFramedChannel<AjpClientChannel,AbstractAjpClientStreamSourceChannel,AbstractAjpClientStreamSinkChannel>protected void recalculateHeldFrames()
throws java.io.IOException
recalculateHeldFrames in class AbstractFramedChannel<AjpClientChannel,AbstractAjpClientStreamSourceChannel,AbstractAjpClientStreamSinkChannel>java.io.IOExceptionCopyright © 2018. All rights reserved.