Examples of RoutesException


Examples of com.elibom.jogger.middleware.router.RoutesException

  @Override
  public Object load(String controllerName) throws RoutesException {
    Object bean = applicationContext.getBean(controllerName);
    if (bean == null) {
      throw new RoutesException("Bean '" + controllerName + "' was not found.");
    }

    return bean;
  }
View Full Code Here

Examples of com.elibom.jogger.middleware.router.RoutesException

  public List<Route> load() throws ParseException, RoutesException {
    InputStream inputStream = null;
    try {
      inputStream = getInputStream();
    } catch (Exception e) {
      throw new RoutesException("Problem loading the routes.config file: " + e.getMessage(), e);
    }

    try {
      return load(inputStream);
    } catch (IOException e) {
      throw new RoutesException("Problem loading the routes.config file: " + e.getMessage(), e);
    }
  }
View Full Code Here

Examples of com.elibom.jogger.middleware.router.RoutesException

  private Method getMethod(Object controller, String methodName) throws RoutesException {
    try {
      // try to retrieve the method and check if an exception is thrown
      return controller.getClass().getMethod(methodName, Request.class, Response.class);
    } catch (Exception e) {
      throw new RoutesException(e);
    }
  }
View Full Code Here

Examples of com.elibom.jogger.middleware.router.RoutesException

    try {
      // load the controller class and instantiate it
      Class<?> controllerClass = classLoader.loadClass(className);
      return controllerClass.newInstance();
    } catch (Exception e) {
      throw new RoutesException(e);
    }
  }
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.