Package org.apache.wicket.protocol.ws

Examples of org.apache.wicket.protocol.ws.WebSocketSettings


    };

    IWebSocketSettings webSocketSettings = IWebSocketSettings.Holder.get(application);
    if (webSocketSettings instanceof WebSocketSettings)
    {
      WebSocketSettings wss = (WebSocketSettings) webSocketSettings;
      wss.getSendPayloadExecutor().run(action);
    }
    else
    {
      action.run();
    }
View Full Code Here


    @Override
    public void run()
    {
      Application application = Application.get(applicationName);
      WebSocketSettings webSocketSettings = WebSocketSettings.Holder.get(application);
      IWebSocketConnectionRegistry webSocketConnectionRegistry = webSocketSettings.getConnectionRegistry();
      IWebSocketConnection connection = webSocketConnectionRegistry.getConnection(application, sessionId, key);

      int dataIndex = 0;

      while (dataIndex < data.length)
View Full Code Here

  }

  private void process(final Application application, final Collection<IWebSocketConnection> wsConnections,
                       final IWebSocketPushMessage message)
  {
    WebSocketSettings webSocketSettings = WebSocketSettings.Holder.get(application);
    Executor executor = webSocketSettings.getWebSocketPushMessageExecutor();
    for (final IWebSocketConnection wsConnection : wsConnections)
    {
      executor.run(new Runnable()
      {
        @Override
View Full Code Here

   * @param message
   *          The message to broadcast/push
   */
  public void broadcast(Application application, String sessionId, IKey key, IWebSocketPushMessage message)
  {
    WebSocketSettings webSocketSettings = WebSocketSettings.Holder.get(application);
    WebSocketPushBroadcaster broadcaster = new WebSocketPushBroadcaster(webSocketSettings.getConnectionRegistry());
    ConnectedMessage wsMessage = new ConnectedMessage(application, sessionId, key);
    broadcaster.broadcast(wsMessage, message);
  }
View Full Code Here

   * @param message
   *          The message to broadcast/push
   */
  public void broadcastAll(Application application, IWebSocketPushMessage message)
  {
    WebSocketSettings webSocketSettings = WebSocketSettings.Holder.get(application);
    WebSocketPushBroadcaster broadcaster = new WebSocketPushBroadcaster(webSocketSettings.getConnectionRegistry());
    broadcaster.broadcastAll(application, message);
  }
View Full Code Here

    WicketFilter wicketFilter = application.getWicketFilter();
    this.webRequest = new WebSocketRequest(new ServletRequestCopy(request), wicketFilter.getFilterPath());

    this.application = Args.notNull(application, "application");
    WebSocketSettings webSocketSettings = WebSocketSettings.Holder.get(application);
    this.connectionRegistry = webSocketSettings.getConnectionRegistry();
  }
View Full Code Here

          }
        }
      }
    };

    WebSocketSettings webSocketSettings = WebSocketSettings.Holder.get(application);
    webSocketSettings.getSendPayloadExecutor().run(action);
  }
View Full Code Here

  @Before
  public void before()
  {
    tester = new WicketTester();
    WebSocketSettings webSocketSettings = WebSocketSettings.Holder.get(tester.getApplication());
    webSocketSettings.setSendPayloadExecutor(new WebSocketSettings.SameThreadExecutor() {
      @Override
      public void run(Runnable command)
      {
        context.set(true);
        super.run(command);
View Full Code Here

  @Before
  public void before()
  {
    tester = new WicketTester();
    WebSocketSettings webSocketSettings = (WebSocketSettings) IWebSocketSettings.Holder.get(tester.getApplication());
    webSocketSettings.setSendPayloadExecutor(new WebSocketSettings.SameThreadExecutor() {
      @Override
      public void run(Runnable command)
      {
        context.set(true);
        super.run(command);
View Full Code Here

    WicketFilter wicketFilter = application.getWicketFilter();
    this.webRequest = new WebSocketRequest(new ServletRequestCopy(request), wicketFilter.getFilterPath());

    this.application = Args.notNull(application, "application");
    WebSocketSettings webSocketSettings = WebSocketSettings.Holder.get(application);
    this.connectionRegistry = webSocketSettings.getConnectionRegistry();
  }
View Full Code Here

TOP

Related Classes of org.apache.wicket.protocol.ws.WebSocketSettings

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.