Class AbstractWebSocketConnection
- java.lang.Object
-
- org.apache.wicket.protocol.ws.api.AbstractWebSocketConnection
-
- All Implemented Interfaces:
IWebSocketConnection
- Direct Known Subclasses:
JavaxWebSocketConnection
public abstract class AbstractWebSocketConnection extends Object implements IWebSocketConnection
Abstract class handling the Web Socket broadcast messages.
-
-
Constructor Summary
Constructors Constructor Description AbstractWebSocketConnection(AbstractWebSocketProcessor webSocketProcessor)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Application
getApplication()
IKey
getKey()
String
getSessionId()
void
sendMessage(IWebSocketPushMessage message)
Broadcasts a push message to the wicket page (and it's components) associated with this connection.void
sendMessageAsync(IWebSocketPushMessage message)
Broadcasts a push message to the wicket page (and it's components) associated with this connection.void
sendMessageAsync(IWebSocketPushMessage message, long timeout)
Broadcasts a push message to the wicket page (and it's components) associated with this connection.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.wicket.protocol.ws.api.IWebSocketConnection
close, isOpen, sendMessage, sendMessage, sendMessageAsync, sendMessageAsync, sendMessageAsync, sendMessageAsync
-
-
-
-
Constructor Detail
-
AbstractWebSocketConnection
public AbstractWebSocketConnection(AbstractWebSocketProcessor webSocketProcessor)
Constructor.- Parameters:
webSocketProcessor
- the web socket processor to delegate to
-
-
Method Detail
-
sendMessage
public void sendMessage(IWebSocketPushMessage message)
Description copied from interface:IWebSocketConnection
Broadcasts a push message to the wicket page (and it's components) associated with this connection. The components can then send messages or component updates to client by adding them to the target.- Specified by:
sendMessage
in interfaceIWebSocketConnection
- Parameters:
message
- the push message to send
-
sendMessageAsync
public void sendMessageAsync(IWebSocketPushMessage message)
Description copied from interface:IWebSocketConnection
Broadcasts a push message to the wicket page (and it's components) associated with this connection. The components can then send messages or component updates to client by adding them to the target. Pushing to client is done asynchronously.- Specified by:
sendMessageAsync
in interfaceIWebSocketConnection
- Parameters:
message
- the push message to send
-
sendMessageAsync
public void sendMessageAsync(IWebSocketPushMessage message, long timeout)
Description copied from interface:IWebSocketConnection
Broadcasts a push message to the wicket page (and it's components) associated with this connection. The components can then send messages or component updates to client by adding them to the target. Pushing to client is done asynchronously.- Specified by:
sendMessageAsync
in interfaceIWebSocketConnection
- Parameters:
message
- the push message to sendtimeout
- the timeout in milliseconds
-
getApplication
public Application getApplication()
- Specified by:
getApplication
in interfaceIWebSocketConnection
- Returns:
- The application for which this WebSocket connection is registered
-
getSessionId
public String getSessionId()
- Specified by:
getSessionId
in interfaceIWebSocketConnection
- Returns:
- The id of the session for which this WebSocket connection is registered
-
getKey
public IKey getKey()
- Specified by:
getKey
in interfaceIWebSocketConnection
- Returns:
- The registry key for which this WebSocket connection is registered
-
-