Package org.apache.abdera.protocol.server

Examples of org.apache.abdera.protocol.server.ServiceContext


  @Override
  protected void service(
    HttpServletRequest request,
    HttpServletResponse response)
      throws ServletException, IOException {
    ServiceContext context =
      serviceManager.newServiceContext(
        getProperties(getServletConfig()));
    RequestHandlerManager manager = context.getRequestHandlerManager();
    RequestHandler handler = manager.getRequestHandler();
    try {
      handler.process(context, request, response);
    } catch (Throwable t) {
      logger.error("Error servicing request", t);
View Full Code Here


public class ServiceContextDefinitionParserTest
    extends AbstractDependencyInjectionSpringContextTests {

    public void testParser() throws Exception {
        ServiceContext ctx = (ServiceContext) applicationContext.getBean(ServiceContext.class.getName());
       
        ItemManager<Provider> pm = ctx.getProviderManager();
        assertTrue(pm instanceof SingletonProviderManager);
       
        Provider provider = pm.get(null);
        assertTrue(provider instanceof TestProvider);
       
        Resolver<Target> tresolver = ctx.getTargetResolver("/path");
        assertTrue(tresolver instanceof RegexTargetResolver);
    }
View Full Code Here

            contextName = ServiceContext.class.getName();
        }
       
        WebApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(getServletContext());
       
        ServiceContext sc = (ServiceContext) ctx.getBean(contextName);
        sc.init(getAbdera(), getProperties(getServletConfig()));
        return sc;
    }
View Full Code Here

TOP

Related Classes of org.apache.abdera.protocol.server.ServiceContext

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.