Class BaseWebSocketBehavior
- java.lang.Object
-
- org.apache.wicket.behavior.Behavior
-
- org.apache.wicket.protocol.ws.api.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.BehaviorA behavior that contributesWicketWebSocketJQueryResourceReference- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedBaseWebSocketBehavior()Constructor.BaseWebSocketBehavior(java.lang.String resourceName)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.CharSequencegetBaseUrl(WebSocketSettings webSocketSettings)protected java.lang.CharSequencegetContextPath(WebSocketSettings webSocketSettings)protected java.lang.CharSequencegetFilterPrefix(WebSocketSettings webSocketSettings)protected java.lang.IntegergetPort(WebSocketSettings webSocketSettings)protected java.lang.IntegergetSecurePort(WebSocketSettings webSocketSettings)protected java.lang.CharSequencegetSessionId(org.apache.wicket.Component component)booleangetStatelessHint(org.apache.wicket.Component component)voidrenderHead(org.apache.wicket.Component component, org.apache.wicket.markup.head.IHeaderResponse response)
-
-
-
Constructor Detail
-
BaseWebSocketBehavior
protected BaseWebSocketBehavior()
Constructor. Contributes WebSocket initialization code that will work withWebSocketBehavior
-
BaseWebSocketBehavior
public BaseWebSocketBehavior(java.lang.String resourceName)
Constructor. Contributes WebSocket initialization code that will work withWebSocketResourceTo use WebSocketResource the application have to setup the resource as a shared one in itsApplication.init()method:getSharedResources().add(resourceName, new MyWebSocketResource())- Parameters:
resourceName- the name of the sharedWebSocketResource
-
-
Method Detail
-
renderHead
public void renderHead(org.apache.wicket.Component component, org.apache.wicket.markup.head.IHeaderResponse response)- Specified by:
renderHeadin interfaceorg.apache.wicket.markup.html.IComponentAwareHeaderContributor- Overrides:
renderHeadin classorg.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:
getStatelessHintin classorg.apache.wicket.behavior.Behavior
-
-