Package org.apache.wicket.protocol.ws.api.registry

Examples of org.apache.wicket.protocol.ws.api.registry.IKey


   *      the web socket connection to use to communicate with the client
   * @see #onOpen(Object)
   */
  protected final void onConnect(final IWebSocketConnection connection)
  {
    IKey key = getRegistryKey();
    connectionRegistry.setConnection(getApplication(), getSessionId(), key, connection);
    broadcastMessage(new ConnectedMessage(getApplication(), getSessionId(), key));
  }
View Full Code Here


  }

  @Override
  public void onClose(int closeCode, String message)
  {
    IKey key = getRegistryKey();
    broadcastMessage(new ClosedMessage(getApplication(), getSessionId(), key));
    connectionRegistry.removeConnection(getApplication(), getSessionId(), key);
  }
View Full Code Here

   * @param message
   *      the message to broadcast
   */
  public final void broadcastMessage(final IWebSocketMessage message)
  {
    IKey key = getRegistryKey();
    IWebSocketConnection connection = connectionRegistry.getConnection(application, sessionId, key);

    if (connection != null && connection.isOpen())
    {
      Application oldApplication = ThreadContext.getApplication();
View Full Code Here

    return payload;
  }

  private IKey getRegistryKey()
  {
    IKey key;
    if (Strings.isEmpty(resourceName))
    {
      key = new PageIdKey(pageId);
    }
    else
View Full Code Here

   *      the web socket connection to use to communicate with the client
   * @see #onOpen(Object)
   */
  protected final void onConnect(final IWebSocketConnection connection)
  {
    IKey key = getRegistryKey();
    connectionRegistry.setConnection(getApplication(), getSessionId(), key, connection);
    broadcastMessage(new ConnectedMessage(getApplication(), getSessionId(), key));
  }
View Full Code Here

  }

  @Override
  public void onClose(int closeCode, String message)
  {
    IKey key = getRegistryKey();
    broadcastMessage(new ClosedMessage(getApplication(), getSessionId(), key));
    connectionRegistry.removeConnection(getApplication(), getSessionId(), key);
  }
View Full Code Here

   * @param message
   *      the message to broadcast
   */
  public final void broadcastMessage(final IWebSocketMessage message)
  {
    IKey key = getRegistryKey();
    IWebSocketConnection connection = connectionRegistry.getConnection(application, sessionId, key);

    if (connection != null && connection.isOpen())
    {
      Application oldApplication = ThreadContext.getApplication();
View Full Code Here

    return payload;
  }

  private IKey getRegistryKey()
  {
    IKey key;
    if (Strings.isEmpty(resourceName))
    {
      key = new PageIdKey(pageId);
    }
    else
View Full Code Here

   *      the web socket connection to use to communicate with the client
   * @see #onOpen(Object)
   */
  protected final void onConnect(final IWebSocketConnection connection)
  {
    IKey key = getRegistryKey();
    connectionRegistry.setConnection(getApplication(), getSessionId(), key, connection);
    broadcastMessage(new ConnectedMessage(getApplication(), getSessionId(), key));
  }
View Full Code Here

  }

  @Override
  public void onClose(int closeCode, String message)
  {
    IKey key = getRegistryKey();
    broadcastMessage(new ClosedMessage(getApplication(), getSessionId(), key));
    connectionRegistry.removeConnection(getApplication(), getSessionId(), key);
  }
View Full Code Here

TOP

Related Classes of org.apache.wicket.protocol.ws.api.registry.IKey

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.