Package de.desy.tine.client

Examples of de.desy.tine.client.TLink.execute()


    }
    query.insert(0,"N" + tagtype);
    try
    {
      tl = new TLink(host.toString(),query.toString(),numoutData,din,TAccess.CA_READ);
      cc = tl.execute(timeout,true);
      srvAddr = tl.srvAddr;
      tl.close();
    }
    catch (Exception e)
    { // if the host name cannot be resolved -> runtime exception
View Full Code Here


    for (i=0; i<n; i++) taglist32[i] = new NAME32();
    if (taglist32.length == 0) return null;
    if (numout[0] > taglist32.length) numout[0] = (short)taglist32.length; 
    dout = new TDataType(taglist32);
    tl = new TLink(host.toString(),query.toString(),dout,din,TAccess.CA_READ);
    cc = tl.execute(TLink.defaultTimeout,true);
    if (dout.getCompletionLength() < n) n = dout.getCompletionLength();
    tl.close();
    if (cc == 0)
    { // this worked, so we're finished
      strlist = new String[n];
View Full Code Here

      for (i=0; i<n; i++) taglist16[i] = new NAME16();
      if (taglist16.length == 0) return null;
      if (numout[0] > taglist16.length) numout[0] = (short)taglist16.length; 
      dout = new TDataType(taglist16);
      tl = new TLink(host.toString(),query.toString(),dout,din,TAccess.CA_READ);
      cc = tl.execute(TLink.defaultTimeout,true);
      tl.close();
      if (cc != 0) return null;
      strlist = new String[n];
      for (i=0; i<n; i++) strlist[i] = taglist16[i].name;
      return strlist;     
View Full Code Here

    dout = new TDataType(n);
    propertyq = new String("N" + property);
    try
    {
      tl = new TLink(target,propertyq,dout,null,TAccess.CA_READ);
      cc = tl.execute(timeout,true);
      srvAddr = tl.srvAddr;
      tl.close();
    }
    catch (Exception e)
    {
View Full Code Here

      taglist32 = new NAME32[niceContextsQuerySize];
      for (i=0; i<niceContextsQuerySize; i++) taglist32[i] = new NAME32();
      if (taglist32.length == 0) return null;
      dout = new TDataType(taglist32);
      tl = new TLink("/SITE/ENS","CONTEXTS",dout,din,TAccess.CA_READ);
      cc = tl.execute(TLink.defaultTimeout,true);
      tl.close();
      n = dout.getCompletionLength();
      if (cc == 0)
      { // this worked, so we're finished
        strlist = new String[n];
View Full Code Here

    @Override
    public <T> Map.Entry<T, Timestamp> readAttribute(final String attrName) throws ClientException {
        Future<TLink> futureLink = getFutureLink(attrName);
        try {
            TLink tLink = futureLink.get();
            int rc = tLink.execute();
            if (rc != TErrorList.success) {
                throw new RuntimeException("TLink has failed: " + TErrorList.getErrorString(rc));
            }
            TDataType dout = tLink.dOutput;
            long time = tLink.getLastTimeStamp();
View Full Code Here

        pname = pname + ".HIST"; // meta extension not given, try this ...
    }
    try
    {
      TLink tl = new TLink(dname,pname,dout,din,TAccess.CA_READ);
      cc = tl.execute(timeout, true);
      tl.close();
    }
    catch (UnresolvedAddressException e)
    {
      cc = TErrorList.address_unresolved;
View Full Code Here

      }
    }
    for (int i=0; i<ntries; i++)
    {
      TLink tl = new TLink(dname,pname[i],dout,din,TAccess.CA_READ);
      cc = tl.execute(2000, true);
      targetTime[0] = tl.getLastDataTimeStamp();
      tl.close();
      if (cc == 0 && dout.getCompletionLength() > 0) break;
    }
    return cc;
View Full Code Here

      }
    }
    for (int i=0; i<ntries; i++)
    {
      TLink tl = new TLink(dname,pname[i],dout,din,TAccess.CA_READ);
      cc = tl.execute(2000, true);
      targetTime[0] = tl.getLastDataTimeStamp();
      tl.close();
      if (cc == 0 && dout.getCompletionLength() > 0) break;
    }
    return cc;
View Full Code Here

    tagsString = isCentral ? "TAGS" : "HISTORIES";
    ntagsString = "N" + tagsString;
   
    String dname = "/" + context + "/" + server;
    TLink tl = new TLink(dname,ntagsString,dtnprps,dtsubs,TAccess.CA_READ);
    int cc = tl.execute(800, true);
    tl.close();
    if (cc != 0)
    { // TODO: throw an exception here
      return null;
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.