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