Package org.springframework.remoting.httpinvoker

Examples of org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter


        HttpServer server = serverMap.get(addr);
        if (server == null) {
            server = httpBinder.bind(url, new InternalHandler());
            serverMap.put(addr, server);
        }
        final HttpInvokerServiceExporter httpServiceExporter = new HttpInvokerServiceExporter();
        httpServiceExporter.setServiceInterface(type);
        httpServiceExporter.setService(impl);
        try {
            httpServiceExporter.afterPropertiesSet();
        } catch (Exception e) {
            throw new RpcException(e.getMessage(), e);
        }
        final String path = url.getAbsolutePath();
        skeletonMap.put(path, httpServiceExporter);
View Full Code Here


    private class InternalHandler implements HttpHandler {
       
        public void handle(HttpServletRequest request, HttpServletResponse response)
                throws IOException, ServletException {
            String uri = request.getRequestURI();
            HttpInvokerServiceExporter skeleton = skeletonMap.get(uri);
            if (! request.getMethod().equalsIgnoreCase("POST")) {
                response.setStatus(500);
            } else {
                RpcContext.getContext().setRemoteAddress(request.getRemoteAddr(), request.getRemotePort());
                try {
                    skeleton.handleRequest(request, response);
                } catch (Throwable e) {
                    throw new ServletException(e);
                }
            }
        }
View Full Code Here

  public void init(ServletConfig config) throws ServletException {
    super.init(config);
   
    innerSvc = new ClusteredSenseiServiceImpl(senseiConf, loadBalancerFactory, serializer, versionComparator);
    innerSvc.start();
    target = new HttpInvokerServiceExporter();
    target.setService(innerSvc);
    target.setServiceInterface(SenseiService.class);
    target.afterPropertiesSet();
  }
View Full Code Here

TOP

Related Classes of org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter

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.