Package com.cisco.oss.foundation.tools.simulator.rest.container

Examples of com.cisco.oss.foundation.tools.simulator.rest.container.SimulatorResponse


    if (!simulatorService.simulatorExists(port)) {
      String msg = "can not update simulator. simulator on port " + port +  " doesn't exist";
      logger.error(msg);
      return Response.status(Status.BAD_REQUEST).entity(msg).build();
    }
    SimulatorResponse simulatorResponse;
    boolean added = false;;
    
    if (StringUtils.isEmpty(simulatorResponseStr)) {
      String msg = "When adding a response to an existing simulator you need to specify the response json in the body." +
          " if you want to load the simulator from a file just write 'file' in the body and we'll take it from the default location which is at: " +
View Full Code Here


    if (!simulatorService.simulatorExists(port)) {
      String msg = "can not update simulator. simulator on port " + port +  " doesn't exist";
      logger.error(msg);
      return Response.status(Status.BAD_REQUEST).entity(msg).build();
    }
    SimulatorResponse simulatorResponse;
     boolean added = false;;
    
    if (StringUtils.isEmpty(simulatorResponseStr)) {
      String msg = "When adding a response to an existing simulator you need to specify the response json in the body." +
          " if you want to load the simulator from a file just write 'file' in the body and we'll take it from the default location which is at: " +
View Full Code Here

    if (!simulatorService.simulatorExists(port)) {
      String msg = "can not set next response for simulator. simulator on port " + port +  " doesn't exist";
      logger.error(msg);
      return Response.status(Status.BAD_REQUEST).entity(msg).build();
    }
    SimulatorResponse simulatorNextResponse;
    try {
      simulatorNextResponse = objectMapper.readValue(simulatorResponseStr, SimulatorResponse.class);
    } catch (Exception e) {
      logger.error("failed parsing json request", e);
      return Response.status(Status.INTERNAL_SERVER_ERROR).build();
View Full Code Here

      String msg = "can not retrieve simulator. simulator on port " + port +  " doesn't exist";
      logger.error(msg);
      return Response.status(Status.BAD_REQUEST).entity(msg).build();
    }

    SimulatorResponse simulatorNextResponse = simulatorService.getSimulator(port).getSimulatorNextResponse();
   
    String simulatorNextResponseStr = "";
   
    if (simulatorNextResponse != null) { 
      Writer strWriter = new StringWriter();
View Full Code Here

    if (!simulatorService.simulatorExists(port)) {
      String msg = "can not update simulator. simulator on port " + port +  " doesn't exist";
      logger.error(msg);
      return Response.status(Status.BAD_REQUEST).entity(msg).build();
    }
    SimulatorResponse simulatorResponse;
     boolean added = false;;
    
    if (StringUtils.isEmpty(simulatorResponseStr)) {
      String msg = "it's the last time we're saying it - when adding a response to an existing simulator you need to specify the response json in the body." +
          " if you want to load the simulator from a file just write 'file' in the body and we'll take it from the default location which is at: " +
View Full Code Here

TOP

Related Classes of com.cisco.oss.foundation.tools.simulator.rest.container.SimulatorResponse

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.