class Session extends AnyRef
Represents a browser session.
Sessions persist between HTTP requests for a single browser session. They are deleted when the browser is closed, or they time-out. Session cookies are used to maintain sessions using a secure UUID.
Sessions can be used to maintain data for a browser session, e.g. a shopping basket.
The context must have first been routed to a io.vertx.scala.ext.web.handler.SessionHandler for sessions to be available.
- Alphabetic
- By Inheritance
- Session
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new Session(_asJava: AnyRef)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- def asJava: AnyRef
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
destroy(): Unit
Destroy the session
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
get[T](key: String)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[T]): T
Get some data from the session * @param key the key of the data
Get some data from the session * @param key the key of the data
- returns
the data
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
id(): String
- returns
The unique ID of the session. This is generated using a random secure UUID.
-
def
isDestroyed(): Boolean
- returns
has the session been destroyed?
-
def
isEmpty(): Boolean
- returns
true if the session has data
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isRegenerated(): Boolean
- returns
has the session been renewed?
-
def
lastAccessed(): Long
- returns
the time the session was last accessed
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
oldId(): String
- returns
old ID if renewed
-
def
put(key: String, obj: AnyRef): Session
Put some data in a session * @param key the key for the data
Put some data in a session * @param key the key for the data
- obj
the data
- returns
a reference to this, so the API can be used fluently
-
def
regenerateId(): Session
- returns
The new unique ID of the session.
-
def
remove[T](key: String)(implicit arg0: scala.reflect.api.JavaUniverse.TypeTag[T]): T
Remove some data from the session * @param key the key of the data
Remove some data from the session * @param key the key of the data
- returns
the data that was there or null if none there
-
def
setAccessed(): Unit
Mark the session as being accessed.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
timeout(): Long
- returns
the amount of time in ms, after which the session will expire, if not accessed.
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
value(): String
The short representation of the session to be added to the session cookie.
The short representation of the session to be added to the session cookie. By default is the session id. * @return short representation string.
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )