Package de.desy.tine.client

Examples of de.desy.tine.client.TLink


    if (context == null) return null;
    NAME64[] nlist = null;   
    double[] ststp = new double[]{start,stop};
    String dname = "/"+context+"/HISTORY";
    nlist = new NAME64[100];
    TLink tl = new TLink(dname,"RECORDS.WITH.CMTS",new TDataType(nlist),new TDataType(ststp),TAccess.CA_READ);
    int cc = tl.executeAndClose(800);
    if (cc != 0)
    { // TODO: throw an exception here
      return null;
    }
    return NameToString.nameArrayToString(nlist,tl.getOutputDataObject().getCompletionLength());
  }
View Full Code Here


    String ntagsString, tagsString;
    tagsString = isCentral ? "TAGS" : "HISTORIES";
    ntagsString = "N" + tagsString;
   
    String dname = "/" + context + "/" + server;
    TLink tl = new TLink(dname,ntagsString,new TDataType(nprps),dtsubs,TAccess.CA_READ);
    int cc = tl.executeAndClose(800);
    if (cc != 0)
    { // TODO: throw an exception here
      return null;
    }
    if (nprps[0] > 0)
    { // get OFFICIAL list of archived elements
      nlist = new NAME64[nprps[0]];
      tl = new TLink(dname,tagsString, new TDataType(nlist),dtsubs,TAccess.CA_READ);
      cc = tl.executeAndClose(800);
      if (cc != 0)
      { // TODO: throw an exception here
        return null;
      }
    }
    if (nlist == null) return null;
    String ucnam, nam;
    Vector<String> nv = new Vector<String>(nlist.length);
    Vector<String> ev = new Vector<String>(25);
    Vector<String> sav = new Vector<String>(nlist.length);
    Vector<String> dv = new Vector<String>(25);
    Hashtable<String,HstPrp> pl = new Hashtable<String,HstPrp>();
    for (int i=0; i<nlist.length; i++)
    {
      nam = nlist[i].getName();
      if (nam.trim().length() == 0) continue;
      ucnam = nam.toUpperCase();
      if (ucnam.endsWith(".NAM"))
      {
        nv.add(ucnam.substring(0, ucnam.indexOf(".NAM"))); continue;
      }
      if (ucnam.endsWith(".ENUM"))
      {
        ev.add(ucnam.substring(0, ucnam.indexOf(".ENUM"))); continue;
      }
      if (ucnam.endsWith(".SRCADDR"))
      {
        sav.add(ucnam.substring(0, ucnam.indexOf(".SRCADDR"))); continue;
      }
      if (ucnam.endsWith(".DESC"))
      {
        int idx = ucnam.indexOf(".NAM.DESC");
        if (idx < 0) idx = ucnam.indexOf(".DESC");
        dv.add(ucnam.substring(0, idx)); continue;
      }
      pl.put(ucnam, new HstPrp(nam));
    }
    if (pl.isEmpty()) return new HstPrp[0];
    if (isCentral)
    { // take care of other contingencies at the Central Archive Server
      NAME64[] plist = new NAME64[nlist.length*2];
      TDataType tdt = new TDataType(plist);
      tl = new TLink(dname,"PROPERTIES",tdt,null,TAccess.CA_READ);
      if (tl.executeAndClose(800) == 0)
      {
        fillinHstPrpVectors(plist,tdt.getCompletionLength(),nv,ev,sav,dv);
      }
      tl = new TLink(dname,"SRVALIASLIST",tdt,null,TAccess.CA_READ);
      if (tl.executeAndClose(800) == 0)
      {
        fillinHstPrpVectors(plist,tdt.getCompletionLength(),nv,ev,sav,dv);
      }     
    }   
    HstPrp hp;
View Full Code Here

    if (server == null) server = "HISTORY";
    NAME64[] nlist = new NAME64[1000];
    TDataType dtprps = new TDataType(nlist);
   
    String dname = "/" + context + "/" + server;
    TLink tl = new TLink(dname,"*.SRCADDR",dtprps,null,TAccess.CA_READ);
    int cc = tl.executeAndClose(800);
    if (cc != 0)
    { // TODO: throw an exception here
      return null;
    }
    int listsize = dtprps.getCompletionLength();
View Full Code Here

    TDataType dtsubs;
    tagsString = "SUBSYSTEMS";
    ntagsString = "N" + tagsString;
   
    String dname = "/" + context + "/" + server;
    TLink tl = new TLink(dname,ntagsString,dtnsubs,null,TAccess.CA_READ);
    cc = tl.execute(800, true);
    tl.close();
    if (cc != 0)
    { // TODO: throw an exception here
      return null;
    }
    if (nsubs[0] > 0)
    {
      nlist = new NAME32[nsubs[0]];
      dtsubs = new TDataType(nlist);
      tl = new TLink(dname,tagsString,dtsubs,null,TAccess.CA_READ);
      cc = tl.execute(800, true);
      tl.close();
      if (cc != 0)
      { // TODO: throw an exception here
        return null;
      }
    }
View Full Code Here

    String prp = "CONFIGURATION";
    if (group != null) prp += "." + group;
    prp += ".NAM";
    TDataType dout = new TDataType(views);
    String dname = "/" + context + "/HISTORY";
    TLink tl = new TLink(dname,prp,dout,null,TAccess.CA_READ);
    if (tl.executeAndClose(1000) != 0) return null;
    int len = dout.getCompletionLength();
    if (len == 0) return null;
    HstView[] list = new HstView[len];
    for (int i=0; i<len; i++) list[i] = new HstView(views[i]);
    return list;
View Full Code Here

    String prp = "CONFIGURATION";
    if (group != null) prp += "." + group;
    prp += ".NAM";
    TDataType din = new TDataType(list);
    String dname = "/" + context + "/HISTORY";
    TLink tl = new TLink(dname,prp,null,din,TAccess.CA_WRITE);
    return tl.executeAndClose(800);
  }
View Full Code Here

    if (context == null) return null;
    NAME64[] prps = new NAME64[100];
    TDataType dtprps = new TDataType(prps);
    String dname = "/" + context + "/HISTORY";
    String dprop = "CONFIGURATION.*";
    TLink tl = new TLink(dname,dprop,dtprps,null,TAccess.CA_READ);
    int cc = tl.execute(800, true);
    tl.close();
    if (cc != 0)
    { // TODO: throw an exception here
      return null;
    }
    int len = dtprps.getCompletionLength();
View Full Code Here

    if (!isInitialized) initCfgs();
    TDataType dtcfg = new TDataType(cfgs);
    String dname = "/" + context + "/HISTORY/" + name;
    String dprop = "CONFIGURATION";
    if (group != null && group.length() > 0) dprop += "." + group;
    TLink tl = new TLink(dname,dprop,dtcfg,null,TAccess.CA_READ);
    int cc = tl.execute(800, true);
    tl.close();
    if (cc != 0)
    { // TODO: throw an exception here
      DbgLog.log("getViewerConfiguration",TErrorList.getErrorString(cc));
      return null;
    }
View Full Code Here

    if (!isInitialized) initCfgs();
    TDataType dtcfg = new TDataType(hstCfgs);
    String dname = "/" + context + "/HISTORY/" + name;
    String dprop = "CONFIGURATION";
    if (group != null && group.length() > 0) dprop += "." + group;
    TLink tl = new TLink(dname,dprop,null,dtcfg,TAccess.CA_WRITE);
    return tl.executeAndClose(800);
  }
View Full Code Here

    if (context == null || name == null) return TErrorList.argument_list_error;
    if (!isInitialized) initCfgs();
    TDataType dtcfg = new TDataType(hstCfgs);
    String dname = "/" + context + "/HISTORY/" + name;
    String dprop = "CONFIGURATION.TRACE";
    TLink tl = new TLink(dname,dprop,null,dtcfg,TAccess.CA_WRITE);
    return tl.executeAndClose(800);
  }
View Full Code Here

TOP

Related Classes of de.desy.tine.client.TLink

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.