T
- The type of the message object that this MessageHandler will consume.public static interface MessageHandler.Whole<T> extends MessageHandler
For handling incoming text messages, the allowed types for T are
String
Reader
Decoder.Text
or
Decoder.TextStream
configuredFor handling incoming binary messages, the allowed types for T are
ByteBuffer
InputStream
Decoder.Binary
or
Decoder.BinaryStream
configured
For handling incoming pong messages, the type of T is PongMessage
Developers should not continue to reference message objects of type Reader
, ByteBuffer
or InputStream
after the completion of the onMessage() call, since they
may be recycled by the implementation.
MessageHandler.Partial<T>, MessageHandler.Whole<T>
void onMessage(T message)
message
- the message data.Copyright © 1996-2013, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.