Top Inners Fields Constructors Methods
org.apache.tomcat.websocket

public Class WsFrameClient

extends WsFrameBase
Class Inheritance
Imports
java.io.EOFException, .IOException, java.nio.ByteBuffer, java.nio.channels.CompletionHandler, jakarta.websocket.CloseReason, .CloseReason.CloseCodes, org.apache.juli.logging.Log, .LogFactory, org.apache.tomcat.util.res.StringManager

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class

Field Summary

Modifier and TypeField and Description
private final AsyncChannelWrapper
private final CompletionHandler<Integer, Void>
private final Log
private volatile ByteBuffer
private static final StringManager
Inherited from org.apache.tomcat.websocket.WsFrameBase:
inputBufferwsSession

Constructor Summary

AccessConstructor and Description
public
WsFrameClient(ByteBuffer response, AsyncChannelWrapper channel, WsSession wsSession, Transformation transformation)

Method Summary

Modifier and TypeMethod and Description
private void
protected Log
protected boolean
private void
protected void
resumeProcessing()

Implements abstract org.apache.tomcat.websocket.WsFrameBase.resumeProcessing.

This method will be invoked when the read operation is resumed.

private void
resumeProcessing(boolean checkOpenOnError)

pack-priv void
Inherited from org.apache.tomcat.websocket.WsFrameBase:
byteArrayToLongchangeReadStatechangeReadStategetReadStategetTransformationisOpenisSuspendedprocessInputBufferresumesendMessageBinarysendMessageTextsuspendupdateStats

Field Detail

channelback to summary
private final AsyncChannelWrapper channel
handlerback to summary
private final CompletionHandler<Integer, Void> handler
logback to summary
private final Log log
responseback to summary
private volatile ByteBuffer response
smback to summary
private static final StringManager sm

Hides org.apache.tomcat.websocket.WsFrameBase.sm.

Constructor Detail

WsFrameClientback to summary
public WsFrameClient(ByteBuffer response, AsyncChannelWrapper channel, WsSession wsSession, Transformation transformation)

Method Detail

closeback to summary
private void close(Throwable t)
getLogback to summary
protected Log getLog()

Implements abstract org.apache.tomcat.websocket.WsFrameBase.getLog.

Annotations
@Override
isMaskedback to summary
protected boolean isMasked()

Implements abstract org.apache.tomcat.websocket.WsFrameBase.isMasked.

Annotations
@Override
processSocketReadback to summary
private void processSocketRead() throws IOException
resumeProcessingback to summary
protected void resumeProcessing()

Implements abstract org.apache.tomcat.websocket.WsFrameBase.resumeProcessing.

Doc from org.apache.tomcat.websocket.WsFrameBase.resumeProcessing.

This method will be invoked when the read operation is resumed. As the suspend of the read operation can be invoked at any time, when implementing this method one should consider that there might still be data remaining into the internal buffers that needs to be processed before reading again from the socket.

Annotations
@Override
resumeProcessingback to summary
private void resumeProcessing(boolean checkOpenOnError)
startInputProcessingback to summary
pack-priv void startInputProcessing()
org.apache.tomcat.websocket back to summary

private Class WsFrameClient.WsFrameClientCompletionHandler

extends Object
implements CompletionHandler<Integer, Void>
Class Inheritance
  • java.lang.Object
  • org.apache.tomcat.websocket.WsFrameClient.WsFrameClientCompletionHandler
All Implemented Interfaces
java.nio.channels.CompletionHandler

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
completed(Integer
The result of the I/O operation.
result
,
Void
The object attached to the I/O operation when it was initiated.
attachment
)

Implements java.nio.channels.CompletionHandler.completed.

Invoked when an operation has completed.

private void
doResumeProcessing(boolean checkOpenOnError)

public void
failed(Throwable
The exception to indicate why the I/O operation failed
exc
,
Void
The object attached to the I/O operation when it was initiated.
attachment
)

Implements java.nio.channels.CompletionHandler.failed.

Invoked when an operation fails.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

WsFrameClientCompletionHandlerback to summary
private WsFrameClientCompletionHandler()

Method Detail

completedback to summary
public void completed(Integer result, Void attachment)

Implements java.nio.channels.CompletionHandler.completed.

Doc from java.nio.channels.CompletionHandler.completed.

Invoked when an operation has completed.

Parameters
result:Integer

The result of the I/O operation.

attachment:Void

The object attached to the I/O operation when it was initiated.

Annotations
@Override
doResumeProcessingback to summary
private void doResumeProcessing(boolean checkOpenOnError)
failedback to summary
public void failed(Throwable exc, Void attachment)

Implements java.nio.channels.CompletionHandler.failed.

Doc from java.nio.channels.CompletionHandler.failed.

Invoked when an operation fails.

Parameters
exc:Throwable

The exception to indicate why the I/O operation failed

attachment:Void

The object attached to the I/O operation when it was initiated.

Annotations
@Override