001 package railo.runtime.functions.gateway; 002 003 import org.opencfml.eventgateway.GatewayException; 004 005 import railo.runtime.PageContext; 006 import railo.runtime.config.ConfigWebImpl; 007 import railo.runtime.exp.PageException; 008 import railo.runtime.ext.function.Function; 009 import railo.runtime.op.Caster; 010 import railo.runtime.type.Struct; 011 012 /** 013 * 014 */ 015 public final class SendGatewayMessage implements Function { 016 017 public static String call(PageContext pc, String gatewayID, Struct data) throws PageException { 018 //GatewayEngineImpl.checkRestriction(); 019 try { 020 return ((ConfigWebImpl)pc.getConfig()).getGatewayEngine().sendMessage(gatewayID,data); 021 } catch (GatewayException e) { 022 throw Caster.toPageException(e); 023 } 024 025 026 } 027 }