railo.runtime.type.scope
Class JSession

java.lang.Object
  extended by railo.runtime.type.util.StructSupport
      extended by railo.runtime.type.StructImpl
          extended by railo.runtime.type.scope.ScopeSupport
              extended by railo.runtime.type.scope.JSession
All Implemented Interfaces:
Serializable, Cloneable, EventListener, Map, javax.servlet.http.HttpSessionBindingListener, Dumpable, Castable, Collection, ForEachIteratorable, Iteratorable, Objects, Scope, Session, SharedScope, MemoryScope, UserScope, Sizeable, Struct

public final class JSession
extends ScopeSupport
implements Session, javax.servlet.http.HttpSessionBindingListener, MemoryScope

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface railo.runtime.type.Collection
Collection.Key
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Field Summary
static Collection.Key SESSION_ID
           
 
Fields inherited from interface railo.runtime.type.scope.Scope
SCOPE_APPLICATION, SCOPE_ARGUMENTS, SCOPE_CALLER, SCOPE_CGI, SCOPE_CLIENT, SCOPE_CLUSTER, SCOPE_COOKIE, SCOPE_COUNT, SCOPE_FORM, SCOPE_LOCAL, SCOPE_REQUEST, SCOPE_SERVER, SCOPE_SESSION, SCOPE_UNDEFINED, SCOPE_URL, SCOPE_VAR, SCOPE_VARIABLES
 
Fields inherited from interface railo.runtime.type.Struct
TYPE_LINKED, TYPE_REGULAR, TYPE_SOFT, TYPE_SYNC, TYPE_WEAKED
 
Constructor Summary
JSession()
          constructor of the class
 
Method Summary
 long getCreated()
           
 long getLastAccess()
           
 long getTimeSpan()
           
 boolean isExpired()
          is the scope expired?
 Collection.Key[] pureKeys()
           
 void release()
          release scope for reuse
 void release(PageContext pc)
          release scope for reuse
 void resetEnv(PageContext pc)
           
 void touch()
          sets the last access timestamp to now
 void touchAfterRequest(PageContext pc)
          release scope only for current request, scope will be used again
 void touchBeforeRequest(PageContext pc)
          Initalize Scope only for this request, scope was already used
 void valueBound(javax.servlet.http.HttpSessionBindingEvent event)
           
 void valueUnbound(javax.servlet.http.HttpSessionBindingEvent event)
           
 
Methods inherited from class railo.runtime.type.scope.ScopeSupport
_getId, getType, getTypeAsString, initialize, isInitalized, sizeOf, toDumpData, toDumpData
 
Methods inherited from class railo.runtime.type.StructImpl
clear, containsKey, containsValue, copy, duplicate, entryIterator, equals, g, g, get, get, hashCode, keyIterator, keys, keysAsStringIterator, remove, removeEL, set, setEL, size, valueIterator, values
 
Methods inherited from class railo.runtime.type.util.StructSupport
call, callWithNamedValues, castToBoolean, castToBooleanValue, castToDateTime, castToDateTime, castToDoubleValue, castToDoubleValue, castToString, castToString, clone, compareTo, compareTo, compareTo, compareTo, containsKey, containsKey, entrySet, get, get, get, get, get, getIterator, invalidKey, isEmpty, keySet, put, putAll, remove, set, set, setEL, setEL, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface railo.runtime.type.scope.Session
_getId
 
Methods inherited from interface railo.runtime.type.scope.Scope
getType, getTypeAsString, initialize, isInitalized
 
Methods inherited from interface railo.runtime.type.Collection
clear, clone, containsKey, containsKey, duplicate, get, get, get, get, keys, remove, removeEL, set, set, setEL, setEL, size
 
Methods inherited from interface railo.runtime.type.Iteratorable
entryIterator, keyIterator, keysAsStringIterator, valueIterator
 
Methods inherited from interface railo.runtime.type.ForEachIteratorable
getIterator
 
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from interface railo.runtime.type.Sizeable
sizeOf
 
Methods inherited from interface railo.runtime.type.Objects
call, callWithNamedValues, get, get, set, setEL
 
Methods inherited from interface railo.runtime.dump.Dumpable
toDumpData
 
Methods inherited from interface railo.runtime.op.Castable
castToBoolean, castToBooleanValue, castToDateTime, castToDateTime, castToDoubleValue, castToDoubleValue, castToString, castToString, compareTo, compareTo, compareTo, compareTo
 

Field Detail

SESSION_ID

public static final Collection.Key SESSION_ID
Constructor Detail

JSession

public JSession()
constructor of the class

Method Detail

touchBeforeRequest

public void touchBeforeRequest(PageContext pc)
Description copied from interface: SharedScope
Initalize Scope only for this request, scope was already used

Specified by:
touchBeforeRequest in interface SharedScope
Parameters:
pc - Page Context

touchAfterRequest

public void touchAfterRequest(PageContext pc)
Description copied from interface: SharedScope
release scope only for current request, scope will be used again

Specified by:
touchAfterRequest in interface SharedScope

release

public void release()
Description copied from interface: Scope
release scope for reuse

Specified by:
release in interface Scope
Overrides:
release in class ScopeSupport

release

public void release(PageContext pc)
Description copied from interface: Scope
release scope for reuse

Specified by:
release in interface Scope
Overrides:
release in class ScopeSupport

getLastAccess

public long getLastAccess()
Specified by:
getLastAccess in interface Session
Returns:
returns the last acces to this session scope

getTimeSpan

public long getTimeSpan()
Specified by:
getTimeSpan in interface Session
Returns:
returns the actuell timespan of the session

isExpired

public boolean isExpired()
Description copied from interface: MemoryScope
is the scope expired?

Specified by:
isExpired in interface Session
Specified by:
isExpired in interface MemoryScope
Returns:
is the scope expired or not

valueBound

public void valueBound(javax.servlet.http.HttpSessionBindingEvent event)
Specified by:
valueBound in interface javax.servlet.http.HttpSessionBindingListener

valueUnbound

public void valueUnbound(javax.servlet.http.HttpSessionBindingEvent event)
Specified by:
valueUnbound in interface javax.servlet.http.HttpSessionBindingListener

touch

public void touch()
Description copied from interface: Session
sets the last access timestamp to now

Specified by:
touch in interface Session
Specified by:
touch in interface MemoryScope

getCreated

public long getCreated()
Specified by:
getCreated in interface Session

pureKeys

public Collection.Key[] pureKeys()
Specified by:
pureKeys in interface Session
Returns:
all keys except the readpnly ones (cfid,cftoken,hitcount,lastvisit ...)

resetEnv

public void resetEnv(PageContext pc)
Specified by:
resetEnv in interface UserScope


Copyright © 2012 Railo