Class BaseWebSocketBehavior

  • All Implemented Interfaces:
    java.io.Serializable, org.apache.wicket.IComponentAwareEventSink, org.apache.wicket.markup.html.IComponentAwareHeaderContributor, org.apache.wicket.util.io.IClusterable
    Direct Known Subclasses:
    WebSocketBehavior

    public class BaseWebSocketBehavior
    extends org.apache.wicket.behavior.Behavior
    A behavior that contributes WicketWebSocketJQueryResourceReference
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.lang.CharSequence getBaseUrl​(WebSocketSettings webSocketSettings)  
      protected java.lang.CharSequence getContextPath​(WebSocketSettings webSocketSettings)  
      protected java.lang.CharSequence getFilterPrefix​(WebSocketSettings webSocketSettings)  
      protected java.lang.Integer getPort​(WebSocketSettings webSocketSettings)  
      protected java.lang.Integer getSecurePort​(WebSocketSettings webSocketSettings)  
      protected java.lang.CharSequence getSessionId​(org.apache.wicket.Component component)  
      boolean getStatelessHint​(org.apache.wicket.Component component)  
      void renderHead​(org.apache.wicket.Component component, org.apache.wicket.markup.head.IHeaderResponse response)  
      • Methods inherited from class org.apache.wicket.behavior.Behavior

        afterRender, beforeRender, bind, canCallListener, detach, isEnabled, isTemporary, onAttribute, onComponentTag, onConfigure, onEvent, onException, onRemove, onTag, unbind
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BaseWebSocketBehavior

        protected BaseWebSocketBehavior()
        Constructor. Contributes WebSocket initialization code that will work with WebSocketBehavior
      • BaseWebSocketBehavior

        public BaseWebSocketBehavior​(java.lang.String resourceName)
        Constructor. Contributes WebSocket initialization code that will work with WebSocketResource To use WebSocketResource the application have to setup the resource as a shared one in its Application.init() method:
             getSharedResources().add(resourceName, new MyWebSocketResource())
         
        Parameters:
        resourceName - the name of the shared WebSocketResource
    • Method Detail

      • renderHead

        public void renderHead​(org.apache.wicket.Component component,
                               org.apache.wicket.markup.head.IHeaderResponse response)
        Specified by:
        renderHead in interface org.apache.wicket.markup.html.IComponentAwareHeaderContributor
        Overrides:
        renderHead in class org.apache.wicket.behavior.Behavior
      • getPort

        protected java.lang.Integer getPort​(WebSocketSettings webSocketSettings)
      • getSecurePort

        protected java.lang.Integer getSecurePort​(WebSocketSettings webSocketSettings)
      • getFilterPrefix

        protected java.lang.CharSequence getFilterPrefix​(WebSocketSettings webSocketSettings)
      • getContextPath

        protected java.lang.CharSequence getContextPath​(WebSocketSettings webSocketSettings)
      • getBaseUrl

        protected java.lang.CharSequence getBaseUrl​(WebSocketSettings webSocketSettings)
      • getSessionId

        protected java.lang.CharSequence getSessionId​(org.apache.wicket.Component component)
        Parameters:
        component - The component this behavior is bound to
        Returns:
        The http session id if it is tracked in the url, otherwise empty string
      • getStatelessHint

        public boolean getStatelessHint​(org.apache.wicket.Component component)
        Overrides:
        getStatelessHint in class org.apache.wicket.behavior.Behavior