@Override public void onWebSocketText(String message){
  log.info("Received unsupported text message from peer {}",peerID);
  Session session=getSession();
  if (session != null && session.isOpen()) {
    session.close(StatusCode.BAD_DATA,"This endpoint only accepts binary messages");
  }
}

@ Override public void onWebSocketText ( String message ) { log . info ( "Received unsupported text message from peer {}" , peerID ) ; Session session = getSession ( ) ; if ( session != null && session . isOpen ( ) ) { session . close ( StatusCode . BAD_DATA , "This endpoint only accepts binary messages" ) ; } }
called by jetty when a text frame is received from the websocket client .
