coldbox.system.remote

Class ColdboxProxy

lucee.Component
    extended by coldbox.system.remote.ColdboxProxy

Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp www.ortussolutions.com --- This component is the coldbox remote proxy used for model operation. This will convert the framework into a model framework rather than a HTML MVC framework.

Class Attributes:
  • synchronized : false
  •  
  • accessors : true
  •  
  • persistent : false
  •  
  • serializable : false
  •  
    Property Summary
    type property default serializable required
    any COLDBOX_APP_KEY
          The loaded app key.

    • access = public
    • returntype = any
    true false
    Method Summary
    private boolean announce(any state, [struct data='[runtime expression]'])
         Announce an interception.
    private any announceInterception(any state, [struct interceptData='[runtime expression]'], [boolean async='false'], [boolean asyncAll='false'], [boolean asyncAllJoin='true'], [any asyncPriority='NORMAL'], [numeric asyncJoinTimeout='0'])
    private any getCache([string cacheName='default'])
         Get a CacheBox Cache Provider.
    private any getCacheBox()
         Get the running app CacheBox instance.
    string getCOLDBOX_APP_KEY()
    private any getController()
         Get the running ColdBox Controller instance.
    private any getInstance(any name, [any initArguments], [any dsl])
         Locates, Creates, Injects and Configures an object model instance.
    private any getInterceptor([string interceptorName], [boolean deepSearch='false'])
         Get an interceptor.
    private any getLogBox()
         Get the running app LogBox instance.
    private any getLogger(any category)
         Get a named logger reference.
    private any getModel(any name, [any dsl], [any initArguments])
    private any getRemotingUtil()
         Get a reference to the ColdBox Remoting utility class.
    private any getRootLogger()
         Get the running app root logger instance.
    private any getUtil()
         Create and return a util object.
    private any getWireBox()
         Get the running app WireBox instance.
    private void handleException(any exceptionObject)
         Handle a ColdBox Proxy Exception.
    private void loadColdbox(string appMapping, [string configLocation=''], [boolean reloadApp='false'], string appKey='[runtime expression]')
         Load a coldbox application, and place the coldbox controller in application scope for usage.
    private any process()
         Process a remote call into ColdBox's event model and return data/objects back.
    private any selfAutoWire()
         Autowire the proxy on creation.
    any setCOLDBOX_APP_KEY(any COLDBOX_APP_KEY)
    private boolean verifyColdBox([boolean throwOnNotExist='true'])
         Verify the coldbox app exists in application scope.
     
    Methods inherited from class lucee.Component
    None

    Property Detail

    COLDBOX_APP_KEY

    property any COLDBOX_APP_KEY

    The loaded app key

    Attributes:
    access - public
    required - false
    returntype - any
    serializable - true

    Method Detail

    announce

    private boolean announce(any state, [struct data='[runtime expression]'])

    Announce an interception

    Parameters:
    state - The interception state to announce
    data - A data structure used to pass intercepted information.

    announceInterception Deprecated

    private any announceInterception(any state, [struct interceptData='[runtime expression]'], [boolean async='false'], [boolean asyncAll='false'], [boolean asyncAllJoin='true'], [any asyncPriority='NORMAL'], [numeric asyncJoinTimeout='0'])

    Deprecated:
    Please use the new `emit()` function
    Parameters:
    state
    interceptData
    async
    asyncAll
    asyncAllJoin
    asyncPriority
    asyncJoinTimeout

    getCache

    private any getCache([string cacheName='default'])

    Get a CacheBox Cache Provider

    Parameters:
    cacheName

    getCacheBox

    private any getCacheBox()

    Get the running app CacheBox instance


    getCOLDBOX_APP_KEY

    public string getCOLDBOX_APP_KEY()


    getController

    private any getController()

    Get the running ColdBox Controller instance

    Throws:
    ControllerIllegalState - If app not found

    getInstance

    private any getInstance(any name, [any initArguments], [any dsl])

    Locates, Creates, Injects and Configures an object model instance

    Parameters:
    name - The mapping name or DSL
    initArguments - The constructor structure of arguments to passthrough when initializing the instance
    dsl - The dsl to use

    getInterceptor

    private any getInterceptor([string interceptorName], [boolean deepSearch='false'])

    Get an interceptor

    Parameters:
    interceptorName
    deepSearch

    getLogBox

    private any getLogBox()

    Get the running app LogBox instance


    getLogger

    private any getLogger(any category)

    Get a named logger reference.

    Parameters:
    category - The category name to use in this logger or pass in the target object will log from and we will inspect the object and use its metadata name

    getModel Deprecated

    private any getModel(any name, [any dsl], [any initArguments])

    Deprecated:
    true
    Parameters:
    name
    dsl
    initArguments

    getRemotingUtil

    private any getRemotingUtil()

    Get a reference to the ColdBox Remoting utility class

    Returns:
    coldbox.system.remote.RemotingUtil

    getRootLogger

    private any getRootLogger()

    Get the running app root logger instance


    getUtil

    private any getUtil()

    Create and return a util object

    Returns:
    coldbox.system.core.util.Util

    getWireBox

    private any getWireBox()

    Get the running app WireBox instance


    handleException

    private void handleException(any exceptionObject)

    Handle a ColdBox Proxy Exception

    Parameters:
    exceptionObject - The exception object to handle

    loadColdbox

    private void loadColdbox(string appMapping, [string configLocation=''], [boolean reloadApp='false'], string appKey='[runtime expression]')

    Load a coldbox application, and place the coldbox controller in application scope for usage. If the application is already running, then it will not re-do it, unless you specify the reload argument or the application expired.

    Parameters:
    appMapping - The app to load via mapping
    configLocation - The config cfc to load else use by convention config/Coldboc.cfc
    reloadApp - To reload the app if running
    appKey - The running app key in application scope

    process

    private any process()

    Process a remote call into ColdBox's event model and return data/objects back.

    Returns:
    If no results where found, this method returns null/void
    Throws:
    NoEventDetected - When no passed even is incoming via arguments[ "event" ]

    selfAutoWire

    private any selfAutoWire()

    Autowire the proxy on creation. This references the super class only, we use cgi information to get the actual proxy component path


    setCOLDBOX_APP_KEY

    public any setCOLDBOX_APP_KEY(any COLDBOX_APP_KEY)

    Parameters:
    COLDBOX_APP_KEY

    verifyColdBox

    private boolean verifyColdBox([boolean throwOnNotExist='true'])

    Verify the coldbox app exists in application scope

    Parameters:
    throwOnNotExist
    Throws:
    ControllerIllegalState - If app not found and throwOnNotExist = true