Package railo.runtime.type

Examples of railo.runtime.type.Struct


   * @param fieldname Name of the Field to get
   * @return matching Fields as Array
   */
  public synchronized Field[] getFields(Class clazz,String fieldname) {
    Object o=map.get(clazz);
    Struct fieldMap;
    if(o==null) {
      fieldMap=store(clazz);
    }
    else fieldMap=(Struct) o;
   
    o=fieldMap.get(fieldname,null);
    if(o==null) return null;
    return (Field[]) o;
   
  }
View Full Code Here


  public void init(GatewayEnginePro engine,String id, String cfcPath, Map config) throws GatewayException {
    this.engine=GatewayProFactory.toGatewayEngineImpl(engine);
    this.id=id;
   
    //requestURI=engine.toRequestURI(cfcPath);
    Struct args=new StructImpl(StructImpl.TYPE_LINKED);
    args.setEL("id", id);
    args.setEL("config", Caster.toStruct(config,null,false));
    if(!StringUtil.isEmpty(cfcPath)){
      try {
        args.setEL("listener", this.engine.getComponent(cfcPath,id));
      } catch (PageException e) {
        engine.log(this,GatewayEnginePro.LOGLEVEL_ERROR, e.getMessage());
      }
    }
   
View Full Code Here

  @Override
  public void doRestart() throws GatewayException {

    engine.log(this,GatewayEnginePro.LOGLEVEL_INFO,"restart");
    Struct args=new StructImpl();
    try{
      boolean has=callOneWay("restart",args);
      if(!has){
        if(callOneWay("stop",args)){
          //engine.clear(cfcPath,id);
View Full Code Here

  }

  @Override
  public void doStart() throws GatewayException {
    engine.log(this,GatewayEnginePro.LOGLEVEL_INFO,"start");
    Struct args=new StructImpl();
    state=STARTING;
    try{
      callOneWay("start",args);
      engine.log(this,GatewayEnginePro.LOGLEVEL_INFO,"running");
      state=RUNNING;
View Full Code Here

  @Override
  public void doStop() throws GatewayException {

    engine.log(this,GatewayEnginePro.LOGLEVEL_INFO,"stop");
    Struct args=new StructImpl();
    state=STOPPING;
    try{
      callOneWay("stop",args);
      //engine.clear(cfcPath,id);
      state=STOPPED;
View Full Code Here

    }
  }

  @Override
  public Object getHelper() {
    Struct args=new StructImpl(StructImpl.TYPE_LINKED);
    return callEL("getHelper",args,null);
  }
View Full Code Here

    return id;
  }

  @Override
  public int getState() {
    Struct args=new StructImpl();
    Integer state=Integer.valueOf(this.state);
    try {
      return GatewayEngineImpl.toIntState(Caster.toString(call("getState",args,state)),this.state);
    }
    catch (PageException pe) {
View Full Code Here



  @Override
  public String sendMessage(Map data) throws GatewayException {
    Struct args=new StructImpl(StructImpl.TYPE_LINKED);
    args.setEL("data", Caster.toStruct(data, null, false));
    try {
      return Caster.toString(call("sendMessage",args,""));
    } catch (PageException pe) {
      throw new PageGatewayException(pe);
    }
View Full Code Here

  /**
   * @see railo.runtime.spooler.SpoolerTask#detail()
   */
  public Struct detail() {
    Struct sct=new StructImpl();
    sct.setEL(KeyConstants._label, client.getLabel());
    sct.setEL(KeyConstants._url, client.getUrl());
   
    return sct;
  }
View Full Code Here

  }
 
 

  public Object getMetaData() {
    Struct sct=new StructImpl();
   
    // meta
    if(metadata!=null)
      StructUtil.copy(metadata, sct, true);
   
    sct.setEL(KeyConstants._name,name);
    if(!StringUtil.isEmpty(hint,true))sct.setEL(KeyConstants._hint,hint);
    if(!StringUtil.isEmpty(displayname,true))sct.setEL(KeyConstants._displayname,displayname);
    if(!StringUtil.isEmpty(type,true))sct.setEL(KeyConstants._type,type);
   
    // dyn attributes

    StructUtil.copy(dynAttrs, sct, true);
   
View Full Code Here

TOP

Related Classes of railo.runtime.type.Struct

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.