org.apache.wicket.protocol.ws.api
Class WebSocketBehavior

java.lang.Object
  extended by org.apache.wicket.behavior.Behavior
      extended by org.apache.wicket.protocol.ws.api.WebSocketBehavior
All Implemented Interfaces:
Serializable, IComponentAwareEventSink, IComponentAwareHeaderContributor, org.apache.wicket.util.io.IClusterable

public abstract class WebSocketBehavior
extends Behavior

A behavior that contributes WicketWebSocketJQueryResourceReference and provides optional callbacks for the WebSocket messages (connect, message, close)

Since:
6.0
See Also:
Serialized Form

Constructor Summary
WebSocketBehavior()
           
 
Method Summary
 boolean getStatelessHint(Component component)
           
protected  void onClose(ClosedMessage message)
           
protected  void onConnect(ConnectedMessage message)
           
 void onEvent(Component component, IEvent<?> event)
           
protected  void onMessage(WebSocketRequestHandler handler, BinaryMessage binaryMessage)
           
protected  void onMessage(WebSocketRequestHandler handler, TextMessage message)
           
 void renderHead(Component component, IHeaderResponse response)
           
 
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

WebSocketBehavior

public WebSocketBehavior()
Method Detail

onEvent

public void onEvent(Component component,
                    IEvent<?> event)
Specified by:
onEvent in interface IComponentAwareEventSink
Overrides:
onEvent in class Behavior

onConnect

protected void onConnect(ConnectedMessage message)

onClose

protected void onClose(ClosedMessage message)

onMessage

protected void onMessage(WebSocketRequestHandler handler,
                         TextMessage message)

onMessage

protected void onMessage(WebSocketRequestHandler handler,
                         BinaryMessage binaryMessage)

renderHead

public void renderHead(Component component,
                       IHeaderResponse response)
Specified by:
renderHead in interface IComponentAwareHeaderContributor
Overrides:
renderHead in class Behavior

getStatelessHint

public boolean getStatelessHint(Component component)
Overrides:
getStatelessHint in class Behavior


Copyright © 2006–2013 Apache Software Foundation. All rights reserved.