railo.runtime.gateway
Class GatewayEngineImpl

java.lang.Object
  extended by railo.runtime.gateway.GatewayEngineImpl
All Implemented Interfaces:
GatewayEngine

public class GatewayEngineImpl
extends Object
implements GatewayEngine


Field Summary
 
Fields inherited from interface org.opencfml.eventgateway.GatewayEngine
LOGLEVEL_DEBUG, LOGLEVEL_ERROR, LOGLEVEL_FATAL, LOGLEVEL_INFO, LOGLEVEL_WARN
 
Constructor Summary
GatewayEngineImpl(ConfigWeb config)
           
 
Method Summary
 void addEntries(Config config, Map<String,GatewayEntry> entries)
           
 void addEntry(Config config, GatewayEntry ge)
           
 Object call(String cfcPath, String id, String functionName, Struct arguments, boolean cfcPeristent, Object defaultValue)
           
 Object callEL(String cfcPath, String id, String functionName, Struct arguments, boolean cfcPeristent, Object defaultValue)
           
 boolean callOneWay(String cfcPath, String id, String functionName, Struct arguments, boolean cfcPeristent)
           
 void clear()
           
 Object getComponent(String cfcPath, String id)
           
 Map<String,GatewayEntry> getEntries()
           
 Object getHelper(String gatewayId)
          get helper object
 Component getPersistentRemoteCFC(String id)
           
 int getState(String gatewayId)
          get the state of gateway
 boolean invokeListener(Gateway gateway, String method, Map data)
          invoke given method on cfc listener
 void log(Gateway gateway, int level, String message)
          logs message with defined logger for gateways
 void remove(GatewayEntry ge)
           
 void reset()
           
 void restart(String gatewayId)
          restart the gateway
 String sendMessage(String gatewayId, Struct data)
          send the message to the gateway
 Component setPersistentRemoteCFC(String id, Component cfc)
           
 void start(String gatewayId)
          start the gateway
 void stop(String gatewayId)
          stop the gateway
static int toIntState(String state, int defaultValue)
           
 String toRequestURI(String cfcPath)
           
static String toStringState(int state, String defaultValue)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GatewayEngineImpl

public GatewayEngineImpl(ConfigWeb config)
Method Detail

addEntries

public void addEntries(Config config,
                       Map<String,GatewayEntry> entries)
                throws ClassException,
                       PageException,
                       GatewayException
Throws:
ClassException
PageException
GatewayException

addEntry

public void addEntry(Config config,
                     GatewayEntry ge)
              throws ClassException,
                     PageException,
                     GatewayException
Throws:
ClassException
PageException
GatewayException

getEntries

public Map<String,GatewayEntry> getEntries()
Returns:
the entries

remove

public void remove(GatewayEntry ge)
            throws GatewayException
Throws:
GatewayException

getState

public int getState(String gatewayId)
             throws PageException
get the state of gateway

Parameters:
gatewayId -
Returns:
Throws:
PageException

getHelper

public Object getHelper(String gatewayId)
                 throws PageException
get helper object

Parameters:
gatewayId -
Returns:
Throws:
PageException

sendMessage

public String sendMessage(String gatewayId,
                          Struct data)
                   throws PageException,
                          GatewayException
send the message to the gateway

Parameters:
gatewayId -
data -
Returns:
Throws:
PageException
GatewayException

start

public void start(String gatewayId)
           throws PageException
start the gateway

Parameters:
gatewayId -
Throws:
PageException

stop

public void stop(String gatewayId)
          throws PageException
stop the gateway

Parameters:
gatewayId -
Throws:
PageException

reset

public void reset()
           throws PageException
Throws:
PageException

clear

public void clear()
           throws GatewayException,
                  PageException
Throws:
GatewayException
PageException

restart

public void restart(String gatewayId)
             throws PageException
restart the gateway

Parameters:
gatewayId -
Throws:
PageException

toIntState

public static int toIntState(String state,
                             int defaultValue)

toStringState

public static String toStringState(int state,
                                   String defaultValue)

invokeListener

public boolean invokeListener(Gateway gateway,
                              String method,
                              Map data)
Description copied from interface: GatewayEngine
invoke given method on cfc listener

Specified by:
invokeListener in interface GatewayEngine
method - method to invoke
data - arguments
Returns:
returns if invocation was successfull

callEL

public Object callEL(String cfcPath,
                     String id,
                     String functionName,
                     Struct arguments,
                     boolean cfcPeristent,
                     Object defaultValue)

callOneWay

public boolean callOneWay(String cfcPath,
                          String id,
                          String functionName,
                          Struct arguments,
                          boolean cfcPeristent)
                   throws PageException
Throws:
PageException

getComponent

public Object getComponent(String cfcPath,
                           String id)
                    throws PageException
Throws:
PageException

call

public Object call(String cfcPath,
                   String id,
                   String functionName,
                   Struct arguments,
                   boolean cfcPeristent,
                   Object defaultValue)
            throws PageException
Throws:
PageException

toRequestURI

public String toRequestURI(String cfcPath)
See Also:
org.opencfml.eventgateway.GatewayEngine#toRequestURI(java.lang.String)

log

public void log(Gateway gateway,
                int level,
                String message)
Description copied from interface: GatewayEngine
logs message with defined logger for gateways

Specified by:
log in interface GatewayEngine

getPersistentRemoteCFC

public Component getPersistentRemoteCFC(String id)

setPersistentRemoteCFC

public Component setPersistentRemoteCFC(String id,
                                        Component cfc)


Copyright © 2012 Railo