jaxrs/src/main/java/de/taimos/dvalin/jaxrs/websocket/ClientSocketAdapter.java
/**
     * reads the received string into the given class by parsing JSON
     *
     * @param <T>     the expected type
     * @param message the JSON string
     * @param clazz   the target class of type T
     * @return the parsed object or null if parsing was not possible or message is null
     */
reads the received string into the given class by parsing JSON
@param      the expected type
@param message the JSON string
@param clazz   the target class of type T
@return the parsed object or null if parsing was not possible or message is null
reads the received string into the given class by parsing JSON @param the expected type @param message the JSON string @param clazz the target class of type T @return the parsed object or null if parsing was not possible or message is null
protected final <T> T readMessage(String message, Class<T> clazz) {
        if ((message == null) || message.isEmpty()) {
            ClientSocketAdapter.LOGGER.info("Got empty session data");
            return null;
        }
        try {
            return this.mapper.readValue(message, clazz);
        } catch (IOException e1) {
            ClientSocketAdapter.LOGGER.info("Got invalid session data", e1);
            return null;
        }
    }
protected final < T > T readMessage ( String message , Class < T > clazz ) { if ( ( message == null ) || message . isEmpty ( ) ) { ClientSocketAdapter . LOGGER . info ( "Got empty session data" ) ; return null ; } try { return this . mapper . readValue ( message , clazz ) ; } catch ( IOException e1 ) { ClientSocketAdapter . LOGGER . info ( "Got invalid session data" , e1 ) ; return null ; } }
reads the received string into the given class by parsing JSON
 @param <T>     the expected type
 @param message the JSON string
 @param clazz   the target class of type T
 @return the parsed object or null if parsing was not possible or message is null
reads the received string into the given class by parsing JSON @param <T > the expected type @param message the JSON string @param clazz the target class of type T @return the parsed object or null if parsing was not possible or message is null