javax.net.websocket
Interface MessageHandler.DecodedObject<T>

All Superinterfaces:
MessageHandler
All Known Subinterfaces:
DecodedObjectMessageHandler
Enclosing interface:
MessageHandler

public static interface MessageHandler.DecodedObject<T>
extends MessageHandler

This kind of listener listens for messages that the container knows how to decode into an object of type T. This will involve providing the endpoint configuration a decoder for objects of type T.

Since:
DRAFT 002

Nested Class Summary
 
Nested classes/interfaces inherited from interface javax.net.websocket.MessageHandler
MessageHandler.AsyncBinary, MessageHandler.AsyncText, MessageHandler.Binary, MessageHandler.BinaryStream, MessageHandler.CharacterStream, MessageHandler.DecodedObject<T>, MessageHandler.Pong, MessageHandler.Text
 
Method Summary
 void onMessage(T customObject)
          Called when the container receives a message that it has been able to decode into an object of type T.
 

Method Detail

onMessage

void onMessage(T customObject)
Called when the container receives a message that it has been able to decode into an object of type T. Containers will by default be able to encode java primitive types, their object equivalents, and arrays or collections thereof.

Parameters:
customObject - the message being sent.


Copyright © 2012. All Rights Reserved.