Package railo.runtime.type.scope

Examples of railo.runtime.type.scope.Threads


   
    if(((PageContextImpl)pc).getParentPageContext()!=null)
      throw new ApplicationException("could not create a thread within a child thread");
   
    try {
      Threads ts = pc.getThreadScope(lcName);
     
      if(type==TYPE_DEAMON){
        if(ts!=null)
          throw new ApplicationException("could not create a thread with the name ["+name+"]. name must be unique within a request");
        ChildThreadImpl ct = new ChildThreadImpl((PageContextImpl) pc,currentPage,name,threadIndex,attrs,false);
View Full Code Here


        names=mpc.getThreadScopeNames();
      }
      else names=ListUtil.listToStringArray(lcName, ',');
     
      ChildThread ct;
      Threads ts;
      long start=System.currentTimeMillis(),_timeout=timeout>0?timeout:-1;
     
      for(int i=0;i<names.length;i++) {
        if(StringUtil.isEmpty(names[i],true))continue;
        //PageContextImpl mpc=(PageContextImpl)getMainPageContext(pc);
        ts = mpc.getThreadScope(names[i]);
        if(ts==null)
          throw new ApplicationException("there is no thread running with the name ["+names[i]+"], only the following threads existing ["+ListUtil.arrayToList(mpc.getThreadScopeNames(),", ")+"]");
        ct=ts.getChildThread();
       
        if(ct.isAlive()) {
          try {
          if(_timeout!=-1)ct.join(_timeout);
          else ct.join();
View Full Code Here

     
    }
  private void doTerminate() throws ApplicationException {
    PageContextImpl mpc=(PageContextImpl)getMainPageContext(pc);
   
    Threads ts = mpc.getThreadScope(lcName);
   
    if(ts==null)
      throw new ApplicationException("there is no thread running with the name ["+name+"]");
    ChildThread ct = ts.getChildThread();
   
    if(ct.isAlive()){
      ct.terminated();
      ct.stop();
    }
View Full Code Here

TOP

Related Classes of railo.runtime.type.scope.Threads

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.