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

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

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

Javadoc

Return the configured attribute names to copy (read-only).

Popular methods of HttpSessionHandshakeInterceptor

  • beforeHandshake
  • <init>
    Constructor for copying specific HTTP session attributes and the HTTP session id.
  • afterHandshake
  • getSession
  • 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

  • Start an intent from android
  • getResourceAsStream (ClassLoader)
  • notifyDataSetChanged (ArrayAdapter)
  • onCreateOptionsMenu (Activity)
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • Top plugins for Android Studio
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