|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | ||||||||
@Retention(value=RUNTIME) @Target(value=METHOD) public @interface WebSocketMessage
This method level annotation can be used to make a Java method receive incoming web socket messages. It must have
parameters of the following types otherwise the container will generate an error at deployment time
String / byte[] / or decodable (as determined by the Decoders configured for the endpoint) parameter
Optional Session parameter
Zero to n String parameters annotated with the @WebSocketPathParam annotation.
 @WebSocketMessage;
public void processGreeting(String message, Session session) {
  System.out.println("Greeting received:" + message);
}
| Optional Element Summary | |
|---|---|
long |
maxMessageSize
Specifies the maximum size of message in bytes that the method this annotates will be able to process, or -1 to indicate that there is no maximum. |
public abstract long maxMessageSize
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | ||||||||