HashExchange he = null;
try {
he = this.decoder.fromJson(s, HashExchange.class);
} catch (JsonSyntaxException jse) {
System.err.printf(">> Cannot decode JSON representation provided: %s%n", jse.getMessage());
throw new DecodeException(s, "Cannot decode JSON representation provided !", jse);
//If an DecodeException is throw by this method then the endpoint handler is not called even the 'error' method...
//It's strange because, according to Javadoc of the error method, for a WebSocket Endpoint it must be the case:
//http://docs.oracle.com/javaee/7/api/javax/websocket/Endpoint.html
//"... conversion errors encoding incoming messages before any message handler has been called. These are modeled as DecodeExceptions"
//http://docs.oracle.com/javaee/7/tutorial/doc/websocket009.htm