congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
HttpSessionHandshakeInterceptor.isCopyAllAttributes
Code IndexAdd Tabnine to your IDE (free)

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

Best Java code snippets using org.springframework.web.socket.server.support.HttpSessionHandshakeInterceptor.isCopyAllAttributes (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.supportHttpSessionHandshakeInterceptorisCopyAllAttributes

Javadoc

Whether to copy all HTTP session attributes.

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).
  • getSession
  • 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

  • Start an intent from android
  • onRequestPermissionsResult (Fragment)
  • getSupportFragmentManager (FragmentActivity)
  • putExtra (Intent)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • Kernel (java.awt.image)
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • Best plugins for Eclipse
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