railo.runtime.gateway
Class GatewayEngineImpl

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

public class GatewayEngineImpl
extends Object
implements GatewayEnginePro


Field Summary
 
Fields inherited from interface railo.runtime.gateway.GatewayEnginePro
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(GatewayPro gateway, String method, Map data)
          invoke given method on cfc listener
 boolean invokeListener(String gatewayId, String method, Map data)
           
 void log(GatewayPro gateway, int level, String message)
          logs message with defined logger for gateways
 void log(String gatewayId, int level, String message)
           
 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,
                       IOException
Throws:
ClassException
PageException
IOException

addEntry

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

getEntries

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

remove

public void remove(GatewayEntry ge)

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,
                          IOException
send the message to the gateway

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

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()

clear

public void clear()

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(GatewayPro gateway,
                              String method,
                              Map data)
Description copied from interface: GatewayEnginePro
invoke given method on cfc listener

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

invokeListener

public boolean invokeListener(String gatewayId,
                              String method,
                              Map data)

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)

log

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

Specified by:
log in interface GatewayEnginePro

log

public void log(String gatewayId,
                int level,
                String message)

getPersistentRemoteCFC

public Component getPersistentRemoteCFC(String id)

setPersistentRemoteCFC

public Component setPersistentRemoteCFC(String id,
                                        Component cfc)


Copyright © 2012 Railo