vertx-lang-scala-docs_2.12 3.9.1 API < Back
 

# Packages

-  package root
  Definition Classes
    root
-  package io
  Definition Classes
    root
-  package vertx
  Definition Classes
    io
-  package scala
  Definition Classes
    vertx
-  package ext
  Definition Classes
    scala
-  package web
  Definition Classes
    ext
-  package handler
  Definition Classes
    web
-  package sockjs
  Definition Classes
    handler
- AuthHandler
- BasicAuthHandler
- BodyHandler
- CSRFHandler
- ChainAuthHandler
- CookieHandler
- CorsHandler
- DigestAuthHandler
- ErrorHandler
- FaviconHandler
- FormLoginHandler
- JWTAuthHandler
- LoggerHandler
- MultiTenantHandler
- OAuth2AuthHandler
- RedirectAuthHandler
- ResponseContentTypeHandler
- ResponseTimeHandler
- SessionHandler
- StaticHandler
- TemplateHandler
- TimeoutHandler
- UserSessionHandler
- VirtualHostHandler

c

io.vertx.scala.ext.web.handler

# SessionHandler 

###
Companion object SessionHandler

#### class SessionHandler extends Handler[RoutingContext]

A handler that maintains a io.vertx.scala.ext.web.Session for each browser session.

It looks up the session for each request based on a session cookie which contains a session ID. It stores the session when the response is ended in the session store.

The session is available on the routing context with .

Linear Supertypes
Handler[RoutingContext], AnyRef, Any
 
Ordering

1. Alphabetic
2. By Inheritance

Inherited

1. SessionHandler
2. Handler
3. AnyRef
4. Any

1. Hide All
2. Show All

Visibility

1. Public
2. All

### Instance Constructors

1.  new SessionHandler(_asJava: AnyRef)

### Value Members

1.  final def !=(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
2.  final def ##(): Int
   Definition Classes
     AnyRef → Any
3.  final def ==(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
4.  final def asInstanceOf[T0]: T0
   Definition Classes
     Any
5.  def asJava: AnyRef
6.  def clone(): AnyRef
   Attributes
     protected[java.lang]
   Definition Classes
     AnyRef
   Annotations
     @native() @throws( ... )
7.  final def eq(arg0: AnyRef): Boolean
   Definition Classes
     AnyRef
8.  def equals(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
9.  def finalize(): Unit
   Attributes
     protected[java.lang]
   Definition Classes
     AnyRef
   Annotations
     @throws( classOf[java.lang.Throwable] )
10.  def flush(ctx: RoutingContext, handler: Handler[AsyncResult[Unit]]): SessionHandler

    Flush a context session earlier to the store, this will allow the end user to have full control on the event of a failure at the store level.

    Flush a context session earlier to the store, this will allow the end user to have full control on the event of a failure at the store level. Once a session is flushed no automatic save will be performed at end of request. * @param ctx the current context

    handler

      the event handler to signal a asynchronous response.

    returns

      fluent self

11.  def flushFuture(ctx: RoutingContext): Future[Unit]

    Like flush but returns a scala.concurrent.Future instead of taking an AsyncResultHandler.

12.  final def getClass(): Class[_]
    Definition Classes
      AnyRef → Any
    Annotations
      @native()
13.  def handle(arg0: RoutingContext): Unit
    Definition Classes
      SessionHandler → Handler
14.  def hashCode(): Int
    Definition Classes
      AnyRef → Any
    Annotations
      @native()
15.  final def isInstanceOf[T0]: Boolean
    Definition Classes
      Any
16.  final def ne(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
17.  final def notify(): Unit
    Definition Classes
      AnyRef
    Annotations
      @native()
18.  final def notifyAll(): Unit
    Definition Classes
      AnyRef
    Annotations
      @native()
19.  def setAuthProvider(authProvider: AuthProvider): SessionHandler

    Set an auth provider that will allow retrieving the User object from the session to the current routing context.

    Set an auth provider that will allow retrieving the User object from the session to the current routing context. * @param authProvider any auth provider.

    returns

      a reference to this, so the API can be used fluently

20.  def setCookieHttpOnlyFlag(httpOnly: Boolean): SessionHandler

    Sets whether the 'HttpOnly' flag should be set for the session cookie.

    Sets whether the 'HttpOnly' flag should be set for the session cookie. When set this flag instructs browsers to prevent Javascript access to the the cookie. Used as a line of defence against the most common XSS attacks. * @param httpOnly true to set the HttpOnly flag on the cookie

    returns

      a reference to this, so the API can be used fluently

21.  def setCookieSameSite(policy: CookieSameSite): SessionHandler

    Set the session cookie SameSite policy to use.

    Set the session cookie SameSite policy to use. * @param policy to use, `null` for no policy.

    returns

      a reference to this, so the API can be used fluently

22.  def setCookieSecureFlag(secure: Boolean): SessionHandler

    Sets whether the 'secure' flag should be set for the session cookie.

    Sets whether the 'secure' flag should be set for the session cookie. When set this flag instructs browsers to only send the cookie over HTTPS. Note that this will probably stop your sessions working if used without HTTPS (e.g. in development). * @param secure true to set the secure flag on the cookie

    returns

      a reference to this, so the API can be used fluently

23.  def setLazySession(lazySession: Boolean): SessionHandler

    Use a lazy session creation mechanism.

    Use a lazy session creation mechanism. The session will only be created when accessed from the context. Thus the session cookie is set only if the session was accessed. * @param lazySession true to have a lazy session creation.

    returns

      a reference to this, so the API can be used fluently

24.  def setMinLength(minLength: Int): SessionHandler

    Set expected session id minimum length.

    Set expected session id minimum length. * @param minLength the session id minimal length

    returns

      a reference to this, so the API can be used fluently

25.  def setNagHttps(nag: Boolean): SessionHandler

    Set whether a nagging log warning should be written if the session handler is accessed over HTTP, not HTTPS * @param nag true to nag

    Set whether a nagging log warning should be written if the session handler is accessed over HTTP, not HTTPS * @param nag true to nag

    returns

      a reference to this, so the API can be used fluently

26.  def setSessionCookieName(sessionCookieName: String): SessionHandler

    Set the session cookie name * @param sessionCookieName the session cookie name

    Set the session cookie name * @param sessionCookieName the session cookie name

    returns

      a reference to this, so the API can be used fluently

27.  def setSessionCookiePath(sessionCookiePath: String): SessionHandler

    Set the session cookie path * @param sessionCookiePath the session cookie path

    Set the session cookie path * @param sessionCookiePath the session cookie path

    returns

      a reference to this, so the API can be used fluently

28.  def setSessionTimeout(timeout: Long): SessionHandler

    Set the session timeout * @param timeout the timeout, in ms.

    Set the session timeout * @param timeout the timeout, in ms.

    returns

      a reference to this, so the API can be used fluently

29.  final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
      AnyRef
30.  def toString(): String
    Definition Classes
      AnyRef → Any
31.  final def wait(): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )
32.  final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )
33.  final def wait(arg0: Long): Unit
    Definition Classes
      AnyRef
    Annotations
      @native() @throws( ... )

### Inherited from Handler[RoutingContext]

### Inherited from AnyRef

### Inherited from Any

### Ungrouped