Top Description Inners Fields Constructors Methods
io.undertow.protocols.ajp

public Class AjpClientChannel

extends AbstractFramedChannel<AjpClientChannel, AbstractAjpClientStreamSourceChannel, AbstractAjpClientStreamSinkChannel>
Class Inheritance
Imports
io.undertow.UndertowLogger, .UndertowMessages, io.undertow.client.ClientConnection, io.undertow.connector.ByteBufferPool, .PooledByteBuffer, io.undertow.server.protocol.framed.AbstractFramedChannel, .AbstractFramedStreamSourceChannel, .FrameHeaderData, io.undertow.util.Attachable, .HeaderMap, .HttpString, org.xnio.ChannelExceptionHandler, .ChannelListener, .ChannelListeners, .IoUtils, .OptionMap, .StreamConnection, java.io.IOException, java.nio.ByteBuffer, java.nio.channels.ClosedChannelException, java.util.ArrayList, .Collection, .Collections, .List, java.util.concurrent.TimeUnit

AJP client side channel.
Author
Stuart Douglas

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv class
pack-priv class
pack-priv class
pack-priv class
pack-priv class

Field Summary

Modifier and TypeField and Description
private final AjpResponseParser
private boolean
private boolean
private final List<ClientConnection.PingListener>
private AjpClientRequestClientStreamSinkChannel
pack-priv boolean
private AjpClientResponseStreamSourceChannel
pack-priv boolean

Constructor Summary

AccessConstructor and Description
public
AjpClientChannel(StreamConnection
The org.xnio.channels.ConnectedStreamChannel over which the WebSocket Frames should get send and received. Be aware that it already must be "upgraded".
connectedStreamChannel
,
ByteBufferPool
The org.xnio.Pool which will be used to acquire java.nio.ByteBuffer's from.
bufferPool
,
OptionMap settings)

Create a new io.undertow.server.protocol.framed.AbstractFramedChannel 8

Method Summary

Modifier and TypeMethod and Description
protected void
closeSubChannels()

Implements abstract io.undertow.server.protocol.framed.AbstractFramedChannel.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
The header data, as returned by parseFrame(java.nio.ByteBuffer)
frameHeaderData
,
PooledByteBuffer
Any additional data for the frame that has already been read. This may not be the complete frame contents
frameData
)

Implements abstract io.undertow.server.protocol.framed.AbstractFramedChannel.createChannel.

Method that creates the actual stream source channel implementation that is in use.

protected Collection<AbstractFramedStreamSourceChannel<AjpClientChannel, AbstractAjpClientStreamSourceChannel, AbstractAjpClientStreamSinkChannel>>
protected OptionMap
protected void
handleBrokenSinkChannel(Throwable e)

Implements abstract io.undertow.server.protocol.framed.AbstractFramedChannel.handleBrokenSinkChannel.

Method that is invoked when then write side of a channel is broken.

protected void
handleBrokenSourceChannel(Throwable e)

Implements abstract io.undertow.server.protocol.framed.AbstractFramedChannel.handleBrokenSourceChannel.

Method that is invoked when the read side of the channel is broken.

protected boolean
isLastFrameReceived()

Implements abstract io.undertow.server.protocol.framed.AbstractFramedChannel.isLastFrameReceived.

Returns true if the protocol specific final frame has been received.

protected boolean
public boolean
isOpen()

Overrides io.undertow.server.protocol.framed.AbstractFramedChannel.isOpen.

Implements java.nio.channels.Channel.isOpen.

Tells whether or not this channel is open.

protected void
lastDataRead()

Overrides io.undertow.server.protocol.framed.AbstractFramedChannel.lastDataRead.

Method than is invoked when read() returns -1.

protected FrameHeaderData
parseFrame(ByteBuffer
The data that has been read from the channel
data
)

Implements abstract io.undertow.server.protocol.framed.AbstractFramedChannel.parseFrame.

Attempts to parse an incoming frame header from the data in the buffer.

protected synchronized void
public void
sendPing(ClientConnection.PingListener pingListener, long timeout, TimeUnit timeUnit)

public AjpClientRequestClientStreamSinkChannel
sendRequest(final HttpString method, final String path, final HttpString protocol, final HeaderMap headers, final Attachable attachable, ChannelListener<AjpClientRequestClientStreamSinkChannel> finishListener)

pack-priv void
pack-priv void
Inherited from io.undertow.server.protocol.framed.AbstractFramedChannel:
addCloseTaskclosecreateIdleTimeoutChannelflushflushSendersgetBufferPoolgetCloseSettergetDestinationAddressgetFramePrioritygetIdleTimeoutgetIoThreadgetLocalAddressgetLocalAddressgetOptiongetPeerAddressgetPeerAddressgetReceiveSettergetSourceAddressgetUnderlyingConnectiongetWorkerisReadsBrokenisReceivesResumedisRequireExplicitFlushisWritesBrokenmarkReadsBrokenmarkWritesBrokenqueueFramereceiveresumeReceivessetIdleTimeoutsetOptionsetRequireExplicitFlushsupportsOptionsuspendReceivestoStringwriteExceptionHandler

Field Detail

ajpParserback to summary
private final AjpResponseParser ajpParser
lastFrameReceivedback to summary
private boolean lastFrameReceived
lastFrameSentback to summary
private boolean lastFrameSent
pingListenersback to summary
private final List<ClientConnection.PingListener> pingListeners
sinkback to summary
private AjpClientRequestClientStreamSinkChannel sink
sinkDoneback to summary
pack-priv boolean sinkDone
sourceback to summary
private AjpClientResponseStreamSourceChannel source
sourceDoneback to summary
pack-priv boolean sourceDone

Constructor Detail

AjpClientChannelback to summary
public AjpClientChannel(StreamConnection connectedStreamChannel, ByteBufferPool bufferPool, OptionMap settings)

Create a new io.undertow.server.protocol.framed.AbstractFramedChannel 8

Parameters
connectedStreamChannel:StreamConnection

The org.xnio.channels.ConnectedStreamChannel over which the WebSocket Frames should get send and received. Be aware that it already must be "upgraded".

bufferPool:ByteBufferPool

The org.xnio.Pool which will be used to acquire java.nio.ByteBuffer's from.

Method Detail

closeSubChannelsback to summary
protected void closeSubChannels()

Implements abstract io.undertow.server.protocol.framed.AbstractFramedChannel.closeSubChannels.

Doc from io.undertow.server.protocol.framed.AbstractFramedChannel.closeSubChannels.

Method that is called when the channel is being forcibly closed, and all sub stream sink/source channels should also be forcibly closed.

Annotations
@Override
createChannelback to summary
protected AbstractAjpClientStreamSourceChannel createChannel(FrameHeaderData frameHeaderData, PooledByteBuffer frameData) throws IOException

Implements abstract io.undertow.server.protocol.framed.AbstractFramedChannel.createChannel.

Doc from io.undertow.server.protocol.framed.AbstractFramedChannel.createChannel.

Method that creates the actual stream source channel implementation that is in use.

Parameters
frameHeaderData:FrameHeaderData

The header data, as returned by parseFrame(java.nio.ByteBuffer)

frameData:PooledByteBuffer

Any additional data for the frame that has already been read. This may not be the complete frame contents

Returns:AbstractAjpClientStreamSourceChannel

A new stream source channel

Annotations
@Override
getReceiversback to summary
protected Collection<AbstractFramedStreamSourceChannel<AjpClientChannel, AbstractAjpClientStreamSourceChannel, AbstractAjpClientStreamSinkChannel>> getReceivers()

Implements abstract io.undertow.server.protocol.framed.AbstractFramedChannel.getReceivers.

Annotations
@Override
getSettingsback to summary
protected OptionMap getSettings()

Overrides io.undertow.server.protocol.framed.AbstractFramedChannel.getSettings.

handleBrokenSinkChannelback to summary
protected void handleBrokenSinkChannel(Throwable e)

Implements abstract io.undertow.server.protocol.framed.AbstractFramedChannel.handleBrokenSinkChannel.

Doc from io.undertow.server.protocol.framed.AbstractFramedChannel.handleBrokenSinkChannel.

Method that is invoked when then write side of a channel is broken. This generally happens on a protocol error.

Annotations
@Override
handleBrokenSourceChannelback to summary
protected void handleBrokenSourceChannel(Throwable e)

Implements abstract io.undertow.server.protocol.framed.AbstractFramedChannel.handleBrokenSourceChannel.

Doc from io.undertow.server.protocol.framed.AbstractFramedChannel.handleBrokenSourceChannel.

Method that is invoked when the read side of the channel is broken. This generally happens on a protocol error.

Annotations
@Override
isLastFrameReceivedback to summary
protected boolean isLastFrameReceived()

Implements abstract io.undertow.server.protocol.framed.AbstractFramedChannel.isLastFrameReceived.

Doc from io.undertow.server.protocol.framed.AbstractFramedChannel.isLastFrameReceived.

Returns true if the protocol specific final frame has been received.

Returns:boolean

true If the last frame has been received

Annotations
@Override
isLastFrameSentback to summary
protected boolean isLastFrameSent()

Implements abstract io.undertow.server.protocol.framed.AbstractFramedChannel.isLastFrameSent.

Returns:boolean

Doc from io.undertow.server.protocol.framed.AbstractFramedChannel.isLastFrameSent.

true If the last frame has been sent

Annotations
@Override
isOpenback to summary
public boolean isOpen()

Overrides io.undertow.server.protocol.framed.AbstractFramedChannel.isOpen.

Implements java.nio.channels.Channel.isOpen.

Doc from java.nio.channels.Channel.isOpen.

Tells whether or not this channel is open.

Returns:boolean

true if, and only if, this channel is open

Annotations
@Override
lastDataReadback to summary
protected void lastDataRead()

Overrides io.undertow.server.protocol.framed.AbstractFramedChannel.lastDataRead.

Doc from io.undertow.server.protocol.framed.AbstractFramedChannel.lastDataRead.

Method than is invoked when read() returns -1.

parseFrameback to summary
protected FrameHeaderData parseFrame(ByteBuffer data) throws IOException

Implements abstract io.undertow.server.protocol.framed.AbstractFramedChannel.parseFrame.

Doc from io.undertow.server.protocol.framed.AbstractFramedChannel.parseFrame.

Attempts to parse an incoming frame header from the data in the buffer.

Parameters
data:ByteBuffer

The data that has been read from the channel

Returns:FrameHeaderData

The frame header data, or null if the data was incomplete

Annotations
@Override
Exceptions
IOException:
If the data could not be parsed.
recalculateHeldFramesback to summary
protected synchronized void recalculateHeldFrames() throws IOException

Overrides io.undertow.server.protocol.framed.AbstractFramedChannel.recalculateHeldFrames.

Annotations
@Override
sendPingback to summary
public void sendPing(ClientConnection.PingListener pingListener, long timeout, TimeUnit timeUnit)
sendRequestback to summary
public AjpClientRequestClientStreamSinkChannel sendRequest(final HttpString method, final String path, final HttpString protocol, final HeaderMap headers, final Attachable attachable, ChannelListener<AjpClientRequestClientStreamSinkChannel> finishListener)
sinkDoneback to summary
pack-priv void sinkDone()
sourceDoneback to summary
pack-priv void sourceDone()
io.undertow.protocols.ajp back to summary

pack-priv Class AjpClientChannel.CpongResponse

extends Object
implements FrameHeaderData
Class Inheritance
All Implemented Interfaces
io.undertow.server.protocol.framed.FrameHeaderData

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public AbstractFramedStreamSourceChannel<?, ?, ?>
public long
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

CpongResponseback to summary
pack-priv CpongResponse()

Method Detail

getExistingChannelback to summary
public AbstractFramedStreamSourceChannel<?, ?, ?> getExistingChannel()

Implements io.undertow.server.protocol.framed.FrameHeaderData.getExistingChannel.

Annotations
@Override
getFrameLengthback to summary
public long getFrameLength()

Implements io.undertow.server.protocol.framed.FrameHeaderData.getFrameLength.

Annotations
@Override
io.undertow.protocols.ajp back to summary

pack-priv Class AjpClientChannel.EndResponse

extends Object
implements FrameHeaderData
Class Inheritance
All Implemented Interfaces
io.undertow.server.protocol.framed.FrameHeaderData

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public AbstractFramedStreamSourceChannel<?, ?, ?>
public long
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

EndResponseback to summary
pack-priv EndResponse()

Method Detail

getExistingChannelback to summary
public AbstractFramedStreamSourceChannel<?, ?, ?> getExistingChannel()

Implements io.undertow.server.protocol.framed.FrameHeaderData.getExistingChannel.

Annotations
@Override
getFrameLengthback to summary
public long getFrameLength()

Implements io.undertow.server.protocol.framed.FrameHeaderData.getFrameLength.

Annotations
@Override
io.undertow.protocols.ajp back to summary

pack-priv Class AjpClientChannel.RequestBodyChunk

extends Object
implements FrameHeaderData
Class Inheritance
All Implemented Interfaces
io.undertow.server.protocol.framed.FrameHeaderData

Field Summary

Modifier and TypeField and Description
private final int

Constructor Summary

AccessConstructor and Description
pack-priv
RequestBodyChunk(int length)

Method Summary

Modifier and TypeMethod and Description
public AbstractFramedStreamSourceChannel<?, ?, ?>
public long
public int
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

lengthback to summary
private final int length

Constructor Detail

RequestBodyChunkback to summary
pack-priv RequestBodyChunk(int length)

Method Detail

getExistingChannelback to summary
public AbstractFramedStreamSourceChannel<?, ?, ?> getExistingChannel()

Implements io.undertow.server.protocol.framed.FrameHeaderData.getExistingChannel.

Annotations
@Override
getFrameLengthback to summary
public long getFrameLength()

Implements io.undertow.server.protocol.framed.FrameHeaderData.getFrameLength.

Annotations
@Override
getLengthback to summary
public int getLength()
io.undertow.protocols.ajp back to summary

pack-priv Class AjpClientChannel.SendBodyChunk

extends Object
implements FrameHeaderData
Class Inheritance
All Implemented Interfaces
io.undertow.server.protocol.framed.FrameHeaderData

Field Summary

Modifier and TypeField and Description
private final int

Constructor Summary

AccessConstructor and Description
pack-priv
SendBodyChunk(int length)

Method Summary

Modifier and TypeMethod and Description
public AbstractFramedStreamSourceChannel<?, ?, ?>
public long
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

lengthback to summary
private final int length

Constructor Detail

SendBodyChunkback to summary
pack-priv SendBodyChunk(int length)

Method Detail

getExistingChannelback to summary
public AbstractFramedStreamSourceChannel<?, ?, ?> getExistingChannel()

Implements io.undertow.server.protocol.framed.FrameHeaderData.getExistingChannel.

Annotations
@Override
getFrameLengthback to summary
public long getFrameLength()

Implements io.undertow.server.protocol.framed.FrameHeaderData.getFrameLength.

Annotations
@Override
io.undertow.protocols.ajp back to summary

pack-priv Class AjpClientChannel.SendHeadersResponse

extends Object
implements FrameHeaderData
Class Inheritance
  • java.lang.Object
  • io.undertow.protocols.ajp.AjpClientChannel.SendHeadersResponse
All Implemented Interfaces
io.undertow.server.protocol.framed.FrameHeaderData

Field Summary

Modifier and TypeField and Description
private final HeaderMap
private final String
private final int

Constructor Summary

AccessConstructor and Description
pack-priv
SendHeadersResponse(int statusCode, String reasonPhrase, HeaderMap headers)

Method Summary

Modifier and TypeMethod and Description
public AbstractFramedStreamSourceChannel<?, ?, ?>
public long
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

headersback to summary
private final HeaderMap headers
reasonPhraseback to summary
private final String reasonPhrase
statusCodeback to summary
private final int statusCode

Constructor Detail

SendHeadersResponseback to summary
pack-priv SendHeadersResponse(int statusCode, String reasonPhrase, HeaderMap headers)

Method Detail

getExistingChannelback to summary
public AbstractFramedStreamSourceChannel<?, ?, ?> getExistingChannel()

Implements io.undertow.server.protocol.framed.FrameHeaderData.getExistingChannel.

Annotations
@Override
getFrameLengthback to summary
public long getFrameLength()

Implements io.undertow.server.protocol.framed.FrameHeaderData.getFrameLength.

Annotations
@Override