|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.wicket.behavior.Behavior
org.apache.wicket.protocol.ws.api.BaseWebSocketBehavior
org.apache.wicket.protocol.ws.api.WebSocketBehavior
public abstract class WebSocketBehavior
A behavior that provides optional callbacks for the WebSocket messages (connect, message, close)
| Constructor Summary | |
|---|---|
WebSocketBehavior()
|
|
| Method Summary | |
|---|---|
protected void |
onClose(ClosedMessage message)
A callback method called when a WebSocket client has closed the connection to the endpoint handled by this WebSocketBehavior |
protected void |
onConnect(ConnectedMessage message)
A callback method called when a WebSocket client has connected to the endpoint handled by this WebSocketBehavior |
void |
onEvent(Component component,
IEvent<?> event)
|
protected void |
onMessage(WebSocketRequestHandler handler,
BinaryMessage binaryMessage)
A callback method called when there is a binary message sent by the client |
protected void |
onMessage(WebSocketRequestHandler handler,
TextMessage message)
A callback method called when there is a text message sent by the client |
protected void |
onPush(WebSocketRequestHandler handler,
IWebSocketPushMessage message)
A callback method called when there is a message pushed/broadcasted by the server, e.g. |
| Methods inherited from class org.apache.wicket.protocol.ws.api.BaseWebSocketBehavior |
|---|
getStatelessHint, renderHead |
| Methods inherited from class org.apache.wicket.behavior.Behavior |
|---|
afterRender, beforeRender, bind, canCallListenerInterface, detach, isEnabled, isTemporary, onComponentTag, onConfigure, onException, onRemove, unbind |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WebSocketBehavior()
| Method Detail |
|---|
public void onEvent(Component component,
IEvent<?> event)
onEvent in interface IComponentAwareEventSinkonEvent in class Behavior
protected void onPush(WebSocketRequestHandler handler,
IWebSocketPushMessage message)
handler - The request handler that can be used to send messages to the clientmessage - The message pushed/broadcasted by the serverprotected void onConnect(ConnectedMessage message)
message - the connect message with the info about the clientprotected void onClose(ClosedMessage message)
message - the close message with the info about the client
protected void onMessage(WebSocketRequestHandler handler,
TextMessage message)
handler - The request handler that can be used to send messages back to the clientmessage - The text message sent by the client
protected void onMessage(WebSocketRequestHandler handler,
BinaryMessage binaryMessage)
handler - The request handler that can be used to send messages back to the clientbinaryMessage - The binary message sent by the client
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||