public class BaseWebSocketBehavior extends Behavior
WicketWebSocketJQueryResourceReference
Modifier | Constructor and Description |
---|---|
protected |
BaseWebSocketBehavior()
Constructor.
|
|
BaseWebSocketBehavior(String resourceName)
Constructor.
|
|
BaseWebSocketBehavior(String resourceName,
String connectionToken)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected CharSequence |
getBaseUrl(WebSocketSettings webSocketSettings) |
protected CharSequence |
getContextPath(WebSocketSettings webSocketSettings) |
protected CharSequence |
getFilterPrefix(WebSocketSettings webSocketSettings) |
protected Integer |
getPort(WebSocketSettings webSocketSettings) |
protected Integer |
getSecurePort(WebSocketSettings webSocketSettings) |
protected CharSequence |
getSessionId(Component component) |
boolean |
getStatelessHint(Component component)
This method returns false if the behavior generates a callback url (for example ajax
behaviors)
|
protected String |
getWebSocketSetupScript(Map<String,Object> parameters) |
void |
renderHead(Component component,
IHeaderResponse response)
Render to the web response whatever the component wants to contribute to the head section.
|
afterRender, beforeRender, bind, canCallListener, detach, isEnabled, isTemporary, onAttribute, onComponentTag, onConfigure, onEvent, onException, onRemove, onTag, unbind
protected BaseWebSocketBehavior()
WebSocketBehavior
public BaseWebSocketBehavior(String resourceName)
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())
resourceName
- the name of the shared WebSocketResource
public BaseWebSocketBehavior(String resourceName, String connectionToken)
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())
resourceName
- the name of the shared WebSocketResource
connectionToken
- an optional token to support connections to the same resource from multiple browser tabspublic void renderHead(Component component, IHeaderResponse response)
Behavior
renderHead
in interface IComponentAwareHeaderContributor
renderHead
in class Behavior
component
- component which is contributing to the response. This parameter is here to give
the component as the context for component-awares implementing this interfaceresponse
- Response objectprotected Integer getPort(WebSocketSettings webSocketSettings)
protected Integer getSecurePort(WebSocketSettings webSocketSettings)
protected CharSequence getFilterPrefix(WebSocketSettings webSocketSettings)
protected CharSequence getContextPath(WebSocketSettings webSocketSettings)
protected CharSequence getBaseUrl(WebSocketSettings webSocketSettings)
protected CharSequence getSessionId(Component component)
component
- The component this behavior is bound topublic boolean getStatelessHint(Component component)
Behavior
getStatelessHint
in class Behavior
component
- the component that has this behavior coupled.Copyright © 2006–2022 Apache Software Foundation. All rights reserved.