Package com.changestuffs.server.servlets.impl

Examples of com.changestuffs.server.servlets.impl.IServletManager


  }

  @Override
  protected void doPost(HttpServletRequest req, HttpServletResponse resp)
      throws ServletException, IOException {
    IServletManager manager = getManager(req);
    log.info("Instance: " + manager);
    manager.manage(req, resp);
  }
View Full Code Here


    log.info("Instance: " + manager);
    manager.manage(req, resp);
  }

  IServletManager getManager(HttpServletRequest req) {
    IServletManager manager = injector.getInstance(Key.get(IServletManager.class, Names.named(req.getServletPath())));

    return manager;
  }
View Full Code Here

  }
 
  @Test
  public void downloadClass(){
    when(request.getServletPath()).thenReturn(DOWNLOAD_PATH);
    IServletManager manager = fileManager.getManager(request);
    assertEquals(DownloadImageImpl.class, manager.getClass());
  }
View Full Code Here

  }
 
  @Test
  public void uploadClass(){
    when(request.getServletPath()).thenReturn(UPLOAD_PATH);
    IServletManager manager = fileManager.getManager(request);
    // Class is enhanced by Guice, because it has AOP
    assertTrue(manager.getClass().getName().contains(FileUploadImpl.class.getName()));
  }
View Full Code Here

TOP

Related Classes of com.changestuffs.server.servlets.impl.IServletManager

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.