Class PojoMessageHandlerWholeBinary

    • Constructor Detail

      • PojoMessageHandlerWholeBinary

        public PojoMessageHandlerWholeBinary​(java.lang.Object pojo,
                                             java.lang.reflect.Method method,
                                             Session session,
                                             EndpointConfig config,
                                             java.util.List<java.lang.Class<? extends Decoder>> decoderClazzes,
                                             java.lang.Object[] params,
                                             int indexPayload,
                                             boolean convert,
                                             int indexSession,
                                             boolean isForInputStream,
                                             long maxMessageSize)
        Create a whole binary message handler.
        Parameters:
        pojo - POJO instance
        method - Method to invoke
        session - WebSocket session
        config - Endpoint configuration
        decoderClazzes - List of decoder classes
        params - Pre-populated parameter array
        indexPayload - Index of the payload parameter
        convert - Convert the message before passing to the method
        indexSession - Index of the session parameter
        isForInputStream - True if the payload is an InputStream
        maxMessageSize - Maximum message size
    • Method Detail

      • decode

        protected java.lang.Object decode​(java.nio.ByteBuffer message)
                                   throws DecodeException
        Description copied from class: PojoMessageHandlerWholeBase
        Decode the message using the registered decoders.
        Specified by:
        decode in class PojoMessageHandlerWholeBase<java.nio.ByteBuffer>
        Parameters:
        message - Message to decode
        Returns:
        Decoded message or null if no decoder could decode it
        Throws:
        DecodeException - If the message cannot be decoded
      • convert

        protected java.lang.Object convert​(java.nio.ByteBuffer message)
        Description copied from class: PojoMessageHandlerWholeBase
        Convert the message to the type expected by the target method.
        Overrides:
        convert in class PojoMessageHandlerWholeBase<java.nio.ByteBuffer>
        Parameters:
        message - Message to convert
        Returns:
        Converted message