当前位置: 首页>>代码示例>>Java>>正文


Java HessianSkeleton类代码示例

本文整理汇总了Java中com.caucho.hessian.server.HessianSkeleton的典型用法代码示例。如果您正苦于以下问题:Java HessianSkeleton类的具体用法?Java HessianSkeleton怎么用?Java HessianSkeleton使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


HessianSkeleton类属于com.caucho.hessian.server包,在下文中一共展示了HessianSkeleton类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: doExport

import com.caucho.hessian.server.HessianSkeleton; //导入依赖的package包/类
protected <T> Runnable doExport(T impl, Class<T> type, URL url) throws RpcException {
    String addr = url.getIp() + ":" + url.getPort();
    HttpServer server = serverMap.get(addr);
    if (server == null) {
        server = httpBinder.bind(url, new HessianHandler());
        serverMap.put(addr, server);
    }
    final String path = url.getAbsolutePath();
    HessianSkeleton skeleton = new HessianSkeleton(impl, type);
    skeletonMap.put(path, skeleton);
    return new Runnable() {
        public void run() {
            skeletonMap.remove(path);
        }
    };
}
 
开发者ID:dachengxi,项目名称:EatDubbo,代码行数:17,代码来源:HessianProtocol.java

示例2: handle

import com.caucho.hessian.server.HessianSkeleton; //导入依赖的package包/类
public void handle(HttpServletRequest request, HttpServletResponse response)
        throws IOException, ServletException {

    globalDataTranster(request);



    String uri = request.getRequestURI();
    HessianSkeleton skeleton = skeletonMap.get(uri);
    if (! request.getMethod().equalsIgnoreCase("POST")) {
        response.setStatus(500);
    } else {
        RpcContext.getContext().setRemoteAddress(request.getRemoteAddr(), request.getRemotePort());
        try {
            skeleton.invoke(request.getInputStream(), response.getOutputStream());
        } catch (Throwable e) {
            throw new ServletException(e);
        }
    }
}
 
开发者ID:flychao88,项目名称:dubbocloud,代码行数:21,代码来源:HessianProtocol.java

示例3: HessianFilter

import com.caucho.hessian.server.HessianSkeleton; //导入依赖的package包/类
public HessianFilter(ServletContext context) {
    WebApplicationContext webApplicationContext = WebApplicationContextUtils.findWebApplicationContext(context);
    String[] strarr = BeanFactoryUtils.beanNamesForTypeIncludingAncestors(webApplicationContext, Object.class);
    for (String s : strarr) {
        Object target = webApplicationContext.getBean(s);
        HessianEndpoint hessianEndpointAnnotation = target.getClass().getAnnotation(HessianEndpoint.class);
        if (hessianEndpointAnnotation != null) {
            try {
                Class apiClz = null;
                Class[] interfacesClass = target.getClass().getInterfaces();
                if (interfacesClass != null && interfacesClass.length > 0) {
                    apiClz = interfacesClass[0];
                } else {
                    apiClz = target.getClass();
                }
                HessianSkeleton hessianSkeleton = new HessianSkeleton(target, apiClz);
                hessianSkeletonMap.put(HessianConstant.HESSIAN_PATH + hessianEndpointAnnotation.servicePattern(), hessianSkeleton);
            } catch (Exception e) {
                logger.error("registerProcessor error : " + e.getMessage(), e);
            }
        }

    }
}
 
开发者ID:paullyphang,项目名称:nebo,代码行数:25,代码来源:HessianFilter.java

示例4: doFilter

import com.caucho.hessian.server.HessianSkeleton; //导入依赖的package包/类
@Override
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
    HttpServletRequest httpServletRequest = (HttpServletRequest) request;
    String urlPattern = httpServletRequest.getRequestURI();
    HessianSkeleton hessianSkeleton = hessianSkeletonMap.get(urlPattern);
    try {
        if (hessianSkeleton != null) {
            hessianSkeleton.invoke(request.getInputStream(), response.getOutputStream());
        } else {
            chain.doFilter(request,response);
        }

    } catch (Exception e) {
        e.printStackTrace();
    }
}
 
开发者ID:paullyphang,项目名称:nebo,代码行数:17,代码来源:HessianFilter.java

示例5: doExport

import com.caucho.hessian.server.HessianSkeleton; //导入依赖的package包/类
protected <T> Runnable doExport(T impl, Class<T> type, URL url) throws JahhanException {
    String addr = url.getIp() + ":" + url.getPort();
    HttpServer server = serverMap.get(addr);
    if (server == null) {
        server = httpBinder.bind(url, new HessianHandler());
        serverMap.put(addr, server);
    }
    final String path = url.getAbsolutePath();
    HessianSkeleton skeleton = new HessianSkeleton(impl, type);
    skeletonMap.put(path, skeleton);
    return new Runnable() {
        public void run() {
            skeletonMap.remove(path);
        }
    };
}
 
开发者ID:nince-wyj,项目名称:jahhan,代码行数:17,代码来源:HessianProtocol.java

示例6: doExport

import com.caucho.hessian.server.HessianSkeleton; //导入依赖的package包/类
protected <T> Runnable doExport(T impl, Class<T> type, URL url) throws RpcException {
    String addr = getAddr(url);
    HttpServer server = serverMap.get(addr);
    if (server == null) {
        server = httpBinder.bind(url, new HessianHandler());
        serverMap.put(addr, server);
    }
    final String path = url.getAbsolutePath();
    HessianSkeleton skeleton = new HessianSkeleton(impl, type);
    skeletonMap.put(path, skeleton);
    return new Runnable() {
        public void run() {
            skeletonMap.remove(path);
        }
    };
}
 
开发者ID:hufeng,项目名称:dubbo2.js,代码行数:17,代码来源:HessianProtocol.java

示例7: handle

import com.caucho.hessian.server.HessianSkeleton; //导入依赖的package包/类
public void handle(HttpServletRequest request, HttpServletResponse response)
        throws IOException, ServletException {
    String uri = request.getRequestURI();
    HessianSkeleton skeleton = skeletonMap.get(uri);
    if (! request.getMethod().equalsIgnoreCase("POST")) {
        response.setStatus(500);
    } else {
        RpcContext.getContext().setRemoteAddress(request.getRemoteAddr(), request.getRemotePort());
        try {
            skeleton.invoke(request.getInputStream(), response.getOutputStream());
        } catch (Throwable e) {
            throw new ServletException(e);
        }
    }
}
 
开发者ID:dachengxi,项目名称:EatDubbo,代码行数:16,代码来源:HessianProtocol.java

示例8: handle

import com.caucho.hessian.server.HessianSkeleton; //导入依赖的package包/类
public void handle(HttpServletRequest request, HttpServletResponse response)
        throws IOException, ServletException {
    String uri = request.getRequestURI();
    HessianSkeleton skeleton = skeletonMap.get(uri);
    if (!request.getMethod().equalsIgnoreCase("POST")) {
        response.setStatus(500);
    } else {
        RpcContext.getContext().setRemoteAddress(request.getRemoteAddr(), request.getRemotePort());
        try {
            skeleton.invoke(request.getInputStream(), response.getOutputStream());
        } catch (Throwable e) {
            throw new ServletException(e);
        }
    }
}
 
开发者ID:hufeng,项目名称:dubbo2.js,代码行数:16,代码来源:HessianProtocol.java

示例9: prepare

import com.caucho.hessian.server.HessianSkeleton; //导入依赖的package包/类
/**
 * Initialize this exporter.
 */
public void prepare() {
	checkService();
	checkServiceInterface();
	this.skeleton = new HessianSkeleton(getProxyForService(), getServiceInterface());
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:9,代码来源:HessianExporter.java


注:本文中的com.caucho.hessian.server.HessianSkeleton类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。