congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
IWebSocketConnectionRegistry.setConnection
Code IndexAdd Tabnine to your IDE (free)

How to use
setConnection
method
in
org.apache.wicket.protocol.ws.api.registry.IWebSocketConnectionRegistry

Best Java code snippets using org.apache.wicket.protocol.ws.api.registry.IWebSocketConnectionRegistry.setConnection (Showing top 3 results out of 315)

origin: apache/wicket

/**
 * A helper that registers the opened connection in the application-level registry.
 *
 * @param connection
 *            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);
  if (connectionFilter != null)
  {
    ConnectionRejected connectionRejected = connectionFilter.doFilter(servletRequest);
    if (connectionRejected != null)
    {
      broadcastMessage(new AbortedMessage(getApplication(), getSessionId(), key));
      connectionRegistry.removeConnection(getApplication(), getSessionId(), key);
      connection.close(connectionRejected.getCode(), connectionRejected.getReason());
      return;
    }
  }
  broadcastMessage(new ConnectedMessage(getApplication(), getSessionId(), key));
}
origin: org.apache.wicket/wicket-native-websocket-core

/**
 * A helper that registers the opened connection in the application-level registry.
 *
 * @param connection
 *            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);
  if (connectionFilter != null)
  {
    ConnectionRejected connectionRejected = connectionFilter.doFilter(servletRequest);
    if (connectionRejected != null)
    {
      broadcastMessage(new AbortedMessage(getApplication(), getSessionId(), key));
      connectionRegistry.removeConnection(getApplication(), getSessionId(), key);
      connection.close(connectionRejected.getCode(), connectionRejected.getReason());
      return;
    }
  }
  broadcastMessage(new ConnectedMessage(getApplication(), getSessionId(), key));
}
origin: theonedev/onedev

/**
 * A helper that registers the opened connection in the application-level registry.
 *
 * @param connection
 *            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);
  if (connectionFilter != null)
  {
    ConnectionRejected connectionRejected = connectionFilter.doFilter(servletRequest);
    if (connectionRejected != null)
    {
      broadcastMessage(new AbortedMessage(getApplication(), getSessionId(), key));
      connectionRegistry.removeConnection(getApplication(), getSessionId(), key);
      connection.close(connectionRejected.getCode(), connectionRejected.getReason());
      return;
    }
  }
  broadcastMessage(new ConnectedMessage(getApplication(), getSessionId(), key));
}
org.apache.wicket.protocol.ws.api.registryIWebSocketConnectionRegistrysetConnection

Javadoc

Adds a new connection into the registry at the specified coordinates (application+session+page)

Popular methods of IWebSocketConnectionRegistry

  • getConnections
  • getConnection
  • removeConnection
    Removes a web socket connection from the registry at the specified coordinates (application+session+

Popular in Java

  • Creating JSON documents from java classes using gson
  • setContentView (Activity)
  • onRequestPermissionsResult (Fragment)
  • getResourceAsStream (ClassLoader)
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • JOptionPane (javax.swing)
  • Top 17 Free Sublime Text Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now