Top Description Fields Constructors Methods
org.apache.tomcat.websocket.pojo

public abstract Class PojoMessageHandlerWholeBase<T>

extends PojoMessageHandlerBase<T>
implements MessageHandler.Whole<T>
Class Inheritance
All Implemented Interfaces
jakarta.websocket.MessageHandler.Whole, jakarta.websocket.MessageHandler
Known Direct Subclasses
org.apache.tomcat.websocket.pojo.PojoMessageHandlerWholeBinary, org.apache.tomcat.websocket.pojo.PojoMessageHandlerWholePong, org.apache.tomcat.websocket.pojo.PojoMessageHandlerWholeText
Type Parameters
<T>
The type of message to handle
Imports
java.lang.reflect.InvocationTargetException, .Method, java.util.ArrayList, .List, javax.naming.NamingException, jakarta.websocket.DecodeException, .Decoder, .MessageHandler, .Session, org.apache.juli.logging.Log, .LogFactory, org.apache.tomcat.InstanceManager, org.apache.tomcat.util.res.StringManager, org.apache.tomcat.websocket.WsSession

Common implementation code for the POJO whole message handlers. All the real work is done in this class and in the superclass.

Field Summary

Modifier and TypeField and Description
protected final List<Decoder>
private final Log
private static final StringManager
Inherited from org.apache.tomcat.websocket.pojo.PojoMessageHandlerBase:
convertindexPayloadindexSessionmaxMessageSizemethodparamspojosession

Constructor Summary

AccessConstructor and Description
public
PojoMessageHandlerWholeBase(Object pojo, Method method, Session session, Object[] params, int indexPayload, boolean convert, int indexSession, long maxMessageSize)

Method Summary

Modifier and TypeMethod and Description
protected Object
convert(T message)

protected Decoder
protected abstract Object
decode(T message)

protected void
public final void
onMessage(T
The message
message
)

Implements jakarta.websocket.MessageHandler.Whole.onMessage.

Called when a whole message is available to be processed.

Inherited from org.apache.tomcat.websocket.pojo.PojoMessageHandlerBase:
getMaxMessageSizegetWrappedHandlerhandlePojoMethodExceptionprocessResult

Field Detail

decodersback to summary
protected final List<Decoder> decoders
logback to summary
private final Log log
smback to summary
private static final StringManager sm

Constructor Detail

PojoMessageHandlerWholeBaseback to summary
public PojoMessageHandlerWholeBase(Object pojo, Method method, Session session, Object[] params, int indexPayload, boolean convert, int indexSession, long maxMessageSize)

Method Detail

convertback to summary
protected Object convert(T message)
createDecoderInstanceback to summary
protected Decoder createDecoderInstance(Class<? extends Decoder> clazz) throws ReflectiveOperationException, NamingException
decodeback to summary
protected abstract Object decode(T message) throws DecodeException
onCloseback to summary
protected void onClose()
onMessageback to summary
public final void onMessage(T message)

Implements jakarta.websocket.MessageHandler.Whole.onMessage.

Doc from jakarta.websocket.MessageHandler.Whole.onMessage.

Called when a whole message is available to be processed.

Parameters
message:T

The message

Annotations
@Override