/** * This callback will be invoked when a binary message has been received. * * @param frame the binary data received from the remote endpoint. */ public void onMessage(BinaryFrame frame) { awaitOnConnect(); if (endpointWrapper != null) { endpointWrapper.onMessage(this, ByteBuffer.wrap(frame.getPayloadData())); messageEventListener.onFrameReceived(frame.getFrameType(), frame.getPayloadLength()); } }
/** * This callback will be invoked when the remote endpoint has sent a ping frame. * * @param frame the ping frame from the remote endpoint. */ public void onPing(PingFrame frame) { awaitOnConnect(); if (endpointWrapper != null) { endpointWrapper.onPing(this, ByteBuffer.wrap(frame.getPayloadData())); messageEventListener.onFrameReceived(frame.getFrameType(), frame.getPayloadLength()); } }
/** * This callback will be invoked when a binary message has been received. * * @param frame the binary data received from the remote endpoint. */ public void onMessage(BinaryFrame frame) { awaitOnConnect(); if (endpointWrapper != null) { endpointWrapper.onMessage(this, ByteBuffer.wrap(frame.getPayloadData())); messageEventListener.onFrameReceived(frame.getFrameType(), frame.getPayloadLength()); } }
/** * This callback will be invoked when the remote endpoint has sent a ping frame. * * @param frame the ping frame from the remote endpoint. */ public void onPing(PingFrame frame) { awaitOnConnect(); if (endpointWrapper != null) { endpointWrapper.onPing(this, ByteBuffer.wrap(frame.getPayloadData())); messageEventListener.onFrameReceived(frame.getFrameType(), frame.getPayloadLength()); } }
/** * This callback will be invoked when the remote endpoint has sent a pong * frame. * * @param frame the pong frame from the remote endpoint. */ public void onPong(PongFrame frame) { awaitOnConnect(); if (endpointWrapper != null) { endpointWrapper.onPong(this, ByteBuffer.wrap(frame.getPayloadData())); messageEventListener.onFrameReceived(frame.getFrameType(), frame.getPayloadLength()); } }
/** * This callback will be invoked when a fragmented binary message has * been received. * * @param frame the binary data received from the remote endpoint. * @param last flag indicating whether or not the payload received is the final fragment of a message. */ public void onFragment(BinaryFrame frame, boolean last) { awaitOnConnect(); if (endpointWrapper != null) { endpointWrapper.onPartialMessage(this, ByteBuffer.wrap(frame.getPayloadData()), last); messageEventListener.onFrameReceived(frame.getFrameType(), frame.getPayloadLength()); } }
/** * This callback will be invoked when a fragmented binary message has * been received. * * @param frame the binary data received from the remote endpoint. * @param last flag indicating whether or not the payload received is the final fragment of a message. */ public void onFragment(BinaryFrame frame, boolean last) { awaitOnConnect(); if (endpointWrapper != null) { endpointWrapper.onPartialMessage(this, ByteBuffer.wrap(frame.getPayloadData()), last); messageEventListener.onFrameReceived(frame.getFrameType(), frame.getPayloadLength()); } }
/** * This callback will be invoked when the remote endpoint has sent a pong * frame. * * @param frame the pong frame from the remote endpoint. */ public void onPong(PongFrame frame) { awaitOnConnect(); if (endpointWrapper != null) { endpointWrapper.onPong(this, ByteBuffer.wrap(frame.getPayloadData())); messageEventListener.onFrameReceived(frame.getFrameType(), frame.getPayloadLength()); } }
/** * This callback will be invoked when a text message has been received. * * @param frame the text received from the remote endpoint. */ public void onMessage(TextFrame frame) { awaitOnConnect(); if (endpointWrapper != null) { endpointWrapper.onMessage(this, frame.getTextPayload()); messageEventListener.onFrameReceived(frame.getFrameType(), frame.getPayloadLength()); } }
/** * This callback will be invoked when a text message has been received. * * @param frame the text received from the remote endpoint. */ public void onMessage(TextFrame frame) { awaitOnConnect(); if (endpointWrapper != null) { endpointWrapper.onMessage(this, frame.getTextPayload()); messageEventListener.onFrameReceived(frame.getFrameType(), frame.getPayloadLength()); } }
/** * This callback will be invoked when a fragmented textual message has * been received. * * @param frame the text received from the remote endpoint. * @param last flag indicating whether or not the payload received is the final fragment of a message. */ public void onFragment(TextFrame frame, boolean last) { awaitOnConnect(); if (endpointWrapper != null) { endpointWrapper.onPartialMessage(this, frame.getTextPayload(), last); messageEventListener.onFrameReceived(frame.getFrameType(), frame.getPayloadLength()); } }
/** * This callback will be invoked when a fragmented textual message has * been received. * * @param frame the text received from the remote endpoint. * @param last flag indicating whether or not the payload received is the final fragment of a message. */ public void onFragment(TextFrame frame, boolean last) { awaitOnConnect(); if (endpointWrapper != null) { endpointWrapper.onPartialMessage(this, frame.getTextPayload(), last); messageEventListener.onFrameReceived(frame.getFrameType(), frame.getPayloadLength()); } }