Package jmt.common.exception

Examples of jmt.common.exception.NetException


          //have redirecting queue behaviour turned on
          NodeSection input = innerNode.getSection(NodeSection.INPUT);
          if (input instanceof Queue) {
            ((Queue) input).redirectionTurnON(br);
          } else {
            throw new NetException("Error in creating blocking region: " + "inner station " + innerNode.getName()
                + " has a not compliant input section.");
          }

          //nodes which sends jobs outside the region must have border router behaviour
          NodeSection output = innerNode.getSection(NodeSection.OUTPUT);
          if (output instanceof Router) {
            ((Router) output).borderRouterTurnON(br);
          } else {
            throw new NetException("Error in creating blocking region: " + "inner station " + innerNode.getName()
                + " has a not compliant output section.");
          }
        }
        if (regionMeasures.size() > 0) {
          //adds measures in blocking region input station
View Full Code Here


      //end NEW

      NetSystem.terminate();
    } else {
      throw new NetException("Simulation has not been initialized");
    }
  }
View Full Code Here

   * @throws jmt.common.exception.NetException if network il null
   */
  public static double checkProgress(QueueNetwork network) throws jmt.common.exception.NetException {

    if (network == null) {
      throw new NetException("Can't measure progress of a network which does not exist.");
    }
    // We extimate on the slowest not completed measure
    ListIterator<Measure> measures;
    double slowest = 1;
    Measure measure;
View Full Code Here

  }

  public static double getTempMeasures(QueueNetwork network) throws jmt.common.exception.NetException {

    if (network == null) {
      throw new NetException("Can't get measures of a network which does not exist.");
    }

    ListIterator<Measure> measures;
    int count = 0;
    Measure measure;
View Full Code Here

        default:
          return MSG_NOT_PROCESSED;
      }
      return MSG_PROCESSED;
    } catch (IOException ex) {
      throw new NetException("Error while writing to the log file: " + ex.getMessage());
    }
  }
View Full Code Here

      }

      return item.distribution.nextRand(item.parameter);

    } catch (NetException e) {
      throw new NetException("Error in LoadDependentStrategy: Cannot get number of jobs into current station");
    } catch (IncorrectDistributionParameterException ex) {
      throw new NetException(ex.getMessage());
    }
  }
View Full Code Here

        // in the constructor
      }

    } catch (IncorrectDistributionParameterException idpe) {
      // re-thrown as NetException to not modify the method declaration
      throw new NetException("Incorrect distribution parameter: " + idpe.getMessage());
    }

  }
View Full Code Here

TOP

Related Classes of jmt.common.exception.NetException

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.