Tabnine Logo
HttpSessionHandshakeInterceptor.getSession
Code IndexAdd Tabnine to your IDE (free)

How to use
getSession
method
in
org.springframework.web.socket.server.support.HttpSessionHandshakeInterceptor

Best Java code snippets using org.springframework.web.socket.server.support.HttpSessionHandshakeInterceptor.getSession (Showing top 3 results out of 315)

origin: spring-projects/spring-framework

@Override
public boolean beforeHandshake(ServerHttpRequest request, ServerHttpResponse response,
    WebSocketHandler wsHandler, Map<String, Object> attributes) throws Exception {
  HttpSession session = getSession(request);
  if (session != null) {
    if (isCopyHttpSessionId()) {
      attributes.put(HTTP_SESSION_ID_ATTR_NAME, session.getId());
    }
    Enumeration<String> names = session.getAttributeNames();
    while (names.hasMoreElements()) {
      String name = names.nextElement();
      if (isCopyAllAttributes() || getAttributeNames().contains(name)) {
        attributes.put(name, session.getAttribute(name));
      }
    }
  }
  return true;
}
origin: org.springframework/spring-websocket

@Override
public boolean beforeHandshake(ServerHttpRequest request, ServerHttpResponse response,
    WebSocketHandler wsHandler, Map<String, Object> attributes) throws Exception {
  HttpSession session = getSession(request);
  if (session != null) {
    if (isCopyHttpSessionId()) {
      attributes.put(HTTP_SESSION_ID_ATTR_NAME, session.getId());
    }
    Enumeration<String> names = session.getAttributeNames();
    while (names.hasMoreElements()) {
      String name = names.nextElement();
      if (isCopyAllAttributes() || getAttributeNames().contains(name)) {
        attributes.put(name, session.getAttribute(name));
      }
    }
  }
  return true;
}
origin: apache/servicemix-bundles

@Override
public boolean beforeHandshake(ServerHttpRequest request, ServerHttpResponse response,
    WebSocketHandler wsHandler, Map<String, Object> attributes) throws Exception {
  HttpSession session = getSession(request);
  if (session != null) {
    if (isCopyHttpSessionId()) {
      attributes.put(HTTP_SESSION_ID_ATTR_NAME, session.getId());
    }
    Enumeration<String> names = session.getAttributeNames();
    while (names.hasMoreElements()) {
      String name = names.nextElement();
      if (isCopyAllAttributes() || getAttributeNames().contains(name)) {
        attributes.put(name, session.getAttribute(name));
      }
    }
  }
  return true;
}
org.springframework.web.socket.server.supportHttpSessionHandshakeInterceptorgetSession

Popular methods of HttpSessionHandshakeInterceptor

  • beforeHandshake
  • <init>
    Constructor for copying specific HTTP session attributes and the HTTP session id.
  • afterHandshake
  • getAttributeNames
    Return the configured attribute names to copy (read-only).
  • isCopyAllAttributes
    Whether to copy all HTTP session attributes.
  • isCopyHttpSessionId
    Whether to copy the HTTP session id to the handshake attributes.
  • isCreateSession
    Whether the HTTP session is allowed to be created.
  • setCopyAllAttributes
    Whether to copy all attributes from the HTTP session. If set to "true", any explicitly configured at
  • setCopyHttpSessionId
    Whether the HTTP session id should be copied to the handshake attributes under the key #HTTP_SESSION

Popular in Java

  • Updating database using SQL prepared statement
  • getSharedPreferences (Context)
  • getSystemService (Context)
  • setContentView (Activity)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • JFileChooser (javax.swing)
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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