Package cu.repsystestbed.exceptions

Examples of cu.repsystestbed.exceptions.SimulationException


    super(sender, receiver);
    if(assessee==null)
    {
      String msg = "Assessee is null.";
      logger.error(msg);
      throw new SimulationException(msg);
    }
    this.setAssessee(assessee);
  }
View Full Code Here


  {
    if(sender==null || receiver==null)
    {
      String msg = "Sender or receiver is null.";
      logger.error(msg);
      throw new SimulationException(msg);
    }
    if(sender.equals(receiver))
    {
      String msg = "Cannot send a message to self.";
      logger.error(msg);
      throw new SimulationException(msg);
    }
   
    messageId = this.messageIdCounter++;
    this.sender = sender;
    this.receiver = receiver;
View Full Code Here

     
    }else
    {
      String error = "Unknown message received.";
      logger.error(error);
      throw new SimulationException(error);
    }
    
  }
View Full Code Here

  {
    if(simulationEngine==null)
    {
      String error = "Simulation engine is null.";
      logger.error(error);
      throw new SimulationException(error);
    }
    this.simulationEngine = simulationEngine;
    this.simulationEngine.registerAgent(this);
  }
View Full Code Here

  {
    if(agent==null)
    {
      String error = "Cannot register a null agent.";
      logger.error(error);
      throw new SimulationException(error);
    }
    if(this.registeredAgents.containsKey(agent.id))
    {
      String error = "Agent " + agent.id + " already added.";
      logger.error(error);
      throw new SimulationException(error);
    }
    this.registeredAgents.put(agent.id, agent);
  }
View Full Code Here

  {
    if(msg==null)
    {
      String error = "Cannot send a null message.";
      logger.error(error);
      throw new SimulationException(error);
    }
    //add the message to message queue
    synchronized(this.messages)
    {
      this.messages.put(msg.getMessageId(), msg);
View Full Code Here

TOP

Related Classes of cu.repsystestbed.exceptions.SimulationException

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.