net.liftweb.http.SessionVar

class SessionVar

abstract class SessionVar[T](dflt : => T)

 extends AnyVar[T, SessionVar[T]] with LazyLoggable


A typesafe container for data with a lifetime nominally equivalent to the lifetime of HttpSession attributes. object MySnippetCompanion { object mySessionVar extends SessionVar[String]("hello") } The standard pattern is to create a singleton object extending SessionVar instead of creating an instance variable of a concrete SessionVar subclass. This is preferred because SessionVar will use the name of its instantiating class for part of its state maintenance mechanism. If you find it necessary to create a SessionVar subclass of which there may be more than one instance, it is necessary to override the __nameSalt() method to return a unique salt value for each instance to prevent name collisions. Note: SessionVars can be used within CometActors
param
dflt - - the default value to be returned if none was set prior to requesting a value to be returned from the container


Source: Vars.scala(49)

Direct Known Subclasses

ContinuationsStore, ShowAll, MsgsNoticeMeta, MsgErrorMeta, MsgNoticeMeta, MsgWarningMeta, MsgsWarningMeta, MsgsErrorMeta,

 Constructors

def this(dflt : => T)

 Fields

__nameSalt.. protected def __nameSalt String AnyVarTrait
calcDefaultValue.. protected def calcDefaultValue T AnyVar
get.. def get T AnyVarTrait
is.. def is T AnyVarTrait
logger.. protected lazy val logger Logger LazyLoggable
name.. protected lazy val name String AnyVarTrait
set_?.. def set_? Boolean AnyVarTrait
showWarningWhenAccessedOutOfSessionScope_?.. def showWarningWhenAccessedOutOfSessionScope_? Boolean

 Methods

!=.. final def !=(arg0 : Object) Boolean AnyRef
!=.. final def !=(arg0 : Any) Boolean Any
==.. final def ==(arg0 : Any) Boolean Any
==.. final def ==(arg0 : Object) Boolean AnyRef
apply.. def apply(arg0 : T) T AnyVarTrait
asInstanceOf.. final def asInstanceOf[T0] T0 Any
clearFunc.. protected override def clearFunc(name : String) Unit
clone.. protected def clone Object AnyRef
doSync.. def doSync[F](f : => F)
Different Vars require different mechanisms for synchronization [details]
This method implements the Var specific synchronization mechanism
F
doWith.. def doWith[F](arg0 : T) F AnyVarTrait
eq.. final def eq(arg0 : Object) Boolean AnyRef
equals.. def equals(arg0 : Any) Boolean AnyRef
finalize.. protected def finalize Unit AnyRef
findFunc.. protected override def findFunc(name : String) Box[T]
getClass.. final def getClass Class[Any] AnyRef
hashCode.. def hashCode Int AnyRef
isInstanceOf.. final def isInstanceOf[T0] Boolean Any
ne.. final def ne(arg0 : Object) Boolean AnyRef
notify.. final def notify Unit AnyRef
notifyAll.. final def notifyAll Unit AnyRef
onShutdown.. protected def onShutdown(arg0 : CleanUpParam) Unit AnyVarTrait
registerCleanupFunc.. protected override def registerCleanupFunc(in : (LiftSession) => Unit) Unit
registerGlobalCleanupFunc.. protected final def registerGlobalCleanupFunc(arg0 : (CleanUpParam) => Unit) Unit AnyVarTrait
remove.. def remove Unit AnyVarTrait
set.. def set(arg0 : T) T AnyVarTrait
setFunc.. protected override def setFunc(name : String, value : T) Unit
setIsUnset.. def setIsUnset(arg0 : => T) T AnyVarTrait
synchronized.. final def synchronized[T0](arg0 : T0) T0 AnyRef
testWasSet.. protected override def testWasSet(name : String) Boolean
toString.. override def toString String AnyVarTrait
update.. def update(arg0 : (T) => T) T AnyVarTrait
wait.. final def wait(arg0 : Long, arg1 : Int) Unit AnyRef
wait.. final def wait(arg0 : Long) Unit AnyRef
wait.. final def wait Unit AnyRef
wasInitialized.. protected override def wasInitialized(name : String) Boolean
Copyright (c) 2006-2010 WorldWide Conferencing, LLC. All Rights Reserved.