PojoMessageHandlerWholeBase (Apache Tomcat 10.1.54 API Documentation)
Description: declaration: package: org.apache.tomcat.websocket.pojo, class: PojoMessageHandlerWholeBase

# Class PojoMessageHandlerWholeBase<T>

java.lang.Object
org.apache.tomcat.websocket.pojo.PojoMessageHandlerBase<T>
org.apache.tomcat.websocket.pojo.PojoMessageHandlerWholeBase<T>

Type Parameters:
  `T` - The type of message to handle

All Implemented Interfaces:
  `MessageHandler, MessageHandler.Whole<T>, WrappedMessageHandler`

Direct Known Subclasses:
  `PojoMessageHandlerWholeBinary, PojoMessageHandlerWholePong, PojoMessageHandlerWholeText`

public abstract class PojoMessageHandlerWholeBase<T> extends PojoMessageHandlerBase<T> implements MessageHandler.Whole<T>
Common implementation code for the POJO whole message handlers. All the real work is done in this class and in the superclass.

- ## Nested Class Summary

  ### Nested classes/interfaces inherited from interface MessageHandler

  `MessageHandler.Partial<T>, MessageHandler.Whole<T>`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected final List<Decoder>`
  `decoders`

  ### Fields inherited from class PojoMessageHandlerBase

  `convert, indexPayload, indexSession, maxMessageSize, method, params, pojo, session`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `PojoMessageHandlerWholeBase(Object pojo, Method method, Session session, Object[] params, int indexPayload, boolean convert, int indexSession, long maxMessageSize)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected Object`
  `convert(T message)`
  `protected Decoder`
  `createDecoderInstance(Class<? extends Decoder> clazz)`
  `protected abstract Object`
  `decode(T message)`
  `protected void`
  `onClose()`
  `final void`
  `onMessage(T message)`
  Called when a whole message is available to be processed.

  ### Methods inherited from class PojoMessageHandlerBase

  `getMaxMessageSize, getWrappedHandler, handlePojoMethodException, processResult`

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### decoders

    protected final List<Decoder> decoders

- ## Constructor Details

  - ### PojoMessageHandlerWholeBase

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

- ## Method Details

  - ### createDecoderInstance

    protected Decoder createDecoderInstance(Class<? extends Decoder> clazz) throws ReflectiveOperationException, NamingException
    Throws:
      `ReflectiveOperationException`
      `NamingException`

  - ### onMessage

    public final void onMessage(T message)
    Description copied from interface: `jakarta.websocket.MessageHandler.Whole`
    Called when a whole message is available to be processed.
    Specified by:
      `onMessage` in interface `MessageHandler.Whole<T>`
    Parameters:
      `message` - The message

  - ### onClose

    protected void onClose()

  - ### convert

    protected Object convert(T message)

  - ### decode

    protected abstract Object decode(T message) throws DecodeException
    Throws:
      `DecodeException`