Search in sources :

Example 1 with HessianServlet

use of com.caucho.hessian.server.HessianServlet in project onebusaway-application-modules by camsys.

the class DynamicFederatedServiceCollectionImplTest method addServiceServlet.

private SimpleFederatedServiceImpl addServiceServlet(Server server, String agencyId, CoordinateBounds bounds) {
    Map<String, List<CoordinateBounds>> agenciesA = new HashMap<String, List<CoordinateBounds>>();
    agenciesA.put(agencyId, Arrays.asList(bounds));
    SimpleFederatedServiceImpl serviceA = new SimpleFederatedServiceImpl(agenciesA, agencyId);
    HessianServlet servletA = new HessianServlet();
    servletA.setHome(serviceA);
    servletA.setHomeAPI(SimpleFederatedService.class);
    Context contextA = new Context(server, "/service-" + agencyId, Context.SESSIONS);
    contextA.addServlet(new ServletHolder(servletA), "/*");
    return serviceA;
}
Also used : Context(org.mortbay.jetty.servlet.Context) HashMap(java.util.HashMap) ServletHolder(org.mortbay.jetty.servlet.ServletHolder) List(java.util.List) HessianServlet(com.caucho.hessian.server.HessianServlet) CoordinateBounds(org.onebusaway.geospatial.model.CoordinateBounds)

Aggregations

HessianServlet (com.caucho.hessian.server.HessianServlet)1 HashMap (java.util.HashMap)1 List (java.util.List)1 Context (org.mortbay.jetty.servlet.Context)1 ServletHolder (org.mortbay.jetty.servlet.ServletHolder)1 CoordinateBounds (org.onebusaway.geospatial.model.CoordinateBounds)1