Package com.elibom.jogger.middleware.router

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


  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

  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

    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

Related Classes of com.elibom.jogger.middleware.router.RoutesException

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.