railo.runtime.type.scope
Class ScopeContext

java.lang.Object
  extended by railo.runtime.type.scope.ScopeContext

public final class ScopeContext
extends Object

Scope Context handle Apllication and Session Scopes


Constructor Summary
ScopeContext(CFMLFactoryImpl factory)
           
 
Method Summary
 void clear()
          remove all scope objects
static void clearClusterScope()
           
 void clearUnused()
          remove all unused scope objects
static void error(Log log, String msg)
           
static void error(Log log, Throwable t)
           
 void error(String msg)
           
 void error(Throwable t)
           
 Struct getAllApplicationScopes()
           
 Struct getAllCFSessionScopes()
           
 Struct getAllSessionScopes(PageContext pc)
          return all session context of this application context
 Struct getAllSessionScopes(PageContext pc, String appName)
          Deprecated. use instead getAllSessionScopes(String appName)
 Struct getAllSessionScopes(String appName)
          get all session contexts of given applicaton name
 int getAppContextSessionCount(PageContext pc)
          return the session count of this application context
 Application getApplicationScope(PageContext pc, RefBoolean isNew)
          return the application Scope for this context (cfid,cftoken,contextname)
 ClientPlus getClientScope(PageContext pc)
           
 ClientPlus getClientScopeEL(PageContext pc)
           
static Cluster getClusterScope(Config config, boolean create)
          Returns the current Cluster Scope, if there is no current Cluster Scope and create is true, returns a new Cluster Scope.
static String getNewCFId()
           
static String getNewCFToken()
           
 long getScopesSize(int scope)
          return the size in bytes of all session contextes
static Server getServerScope(PageContext pc)
          return the server Scope for this context
 int getSessionCount(PageContext pc)
          return the session count of all application contextes
 SessionPlus getSessionScope(PageContext pc, RefBoolean isNew)
          return the session Scope for this context (cfid,cftoken,contextname)
 boolean hasExistingSessionScope(PageContext pc)
           
static void info(Log log, String msg)
           
 void info(String msg)
           
 boolean remove(int type, String appName, String cfid)
           
 void removeApplicationScope(PageContext pc)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScopeContext

public ScopeContext(CFMLFactoryImpl factory)
Method Detail

info

public void info(String msg)

error

public void error(String msg)

error

public void error(Throwable t)

info

public static void info(Log log,
                        String msg)

error

public static void error(Log log,
                         String msg)

error

public static void error(Log log,
                         Throwable t)

getServerScope

public static Server getServerScope(PageContext pc)
return the server Scope for this context

Parameters:
pc -
Returns:
server scope

getClusterScope

public static Cluster getClusterScope(Config config,
                                      boolean create)
                               throws PageException
Returns the current Cluster Scope, if there is no current Cluster Scope and create is true, returns a new Cluster Scope. If create is false and the request has no valid Cluster Scope, this method returns null.

Parameters:
pc -
create -
Returns:
Throws:
PageException

clearClusterScope

public static void clearClusterScope()

getClientScope

public ClientPlus getClientScope(PageContext pc)
                          throws PageException
Throws:
PageException

getClientScopeEL

public ClientPlus getClientScopeEL(PageContext pc)

getSessionCount

public int getSessionCount(PageContext pc)
return the session count of all application contextes

Returns:

getAppContextSessionCount

public int getAppContextSessionCount(PageContext pc)
return the session count of this application context

Returns:

getAllSessionScopes

public Struct getAllSessionScopes(PageContext pc)
return all session context of this application context

Parameters:
pc -
Returns:

getAllApplicationScopes

public Struct getAllApplicationScopes()

getAllCFSessionScopes

public Struct getAllCFSessionScopes()

getScopesSize

public long getScopesSize(int scope)
                   throws ExpressionException
return the size in bytes of all session contextes

Returns:
size in bytes
Throws:
ExpressionException

getAllSessionScopes

public Struct getAllSessionScopes(PageContext pc,
                                  String appName)
Deprecated. use instead getAllSessionScopes(String appName)

get all session contexts of given applicaton name

Parameters:
pc -
appName -
Returns:

getAllSessionScopes

public Struct getAllSessionScopes(String appName)
get all session contexts of given applicaton name

Parameters:
pc -
appName -
Returns:

getSessionScope

public SessionPlus getSessionScope(PageContext pc,
                                   RefBoolean isNew)
                            throws PageException
return the session Scope for this context (cfid,cftoken,contextname)

Parameters:
pc - PageContext
Returns:
session matching the context
Throws:
PageException

hasExistingSessionScope

public boolean hasExistingSessionScope(PageContext pc)

remove

public boolean remove(int type,
                      String appName,
                      String cfid)

getApplicationScope

public Application getApplicationScope(PageContext pc,
                                       RefBoolean isNew)
return the application Scope for this context (cfid,cftoken,contextname)

Parameters:
pc - PageContext
listener -
isNew -
Returns:
session matching the context
Throws:
PageException

removeApplicationScope

public void removeApplicationScope(PageContext pc)

clearUnused

public void clearUnused()
remove all unused scope objects


clear

public void clear()
remove all scope objects


getNewCFId

public static String getNewCFId()
Returns:
returns a new CFIs

getNewCFToken

public static String getNewCFToken()
Returns:
returns a new CFToken


Copyright © 2012 Railo