• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java OperationResourceInfo类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: performInvocation

import org.apache.cxf.jaxrs.model.OperationResourceInfo; //导入依赖的package包/类
protected Object performInvocation(Exchange cxfExchange, final Object serviceObject, Method method,
                                   Object[] paramArray) throws Exception {
    Object response = null;
    if (endpoint.isPerformInvocation()) {
        response = super.performInvocation(cxfExchange, serviceObject, method, paramArray);
    }
    paramArray = insertExchange(method, paramArray, cxfExchange);
    OperationResourceInfo ori = cxfExchange.get(OperationResourceInfo.class);        
    if (ori.isSubResourceLocator()) {
        // don't delegate the sub resource locator call to camel processor
        return method.invoke(serviceObject, paramArray);
    }
    Continuation continuation;
    if (!endpoint.isSynchronous() && (continuation = getContinuation(cxfExchange)) != null) {
        LOG.trace("Calling the Camel async processors.");
        return asyncInvoke(cxfExchange, serviceObject, method, paramArray, continuation, response);
    } else {
        LOG.trace("Calling the Camel sync processors.");
        return syncInvoke(cxfExchange, serviceObject, method, paramArray, response);
    }
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:22,代码来源:CxfRsInvoker.java


示例2: bind

import org.apache.cxf.jaxrs.model.OperationResourceInfo; //导入依赖的package包/类
@SuppressWarnings("UnusedDeclaration")
public static void bind(final Exchange exchange) {
    if (exchange == null) {
        return;
    }

    final ClassResourceInfo cri = exchange.get(OperationResourceInfo.class).getClassResourceInfo();

    // binding context fields
    final Set<Class<?>> types = new HashSet<>();
    for (final Field field : cri.getContextFields()) {
        types.add(field.getType());
    }

    bind(exchange, types);
}
 
开发者ID:apache,项目名称:tomee,代码行数:17,代码来源:Contexts.java


示例3: compare

import org.apache.cxf.jaxrs.model.OperationResourceInfo; //导入依赖的package包/类
@Override
public int compare(
    OperationResourceInfo oper1, OperationResourceInfo oper2,
    Message message) {

    return 0;
}
 
开发者ID:apache,项目名称:aries-jax-rs-whiteboard,代码行数:8,代码来源:CXFJaxRsServiceRegistrator.java


示例4: handleMessage

import org.apache.cxf.jaxrs.model.OperationResourceInfo; //导入依赖的package包/类
@Override
public void handleMessage(Message message) throws Fault {
    final OperationResourceInfo operationResource = message.getExchange().get(OperationResourceInfo.class);
    if (operationResource == null) {
        log.info("OperationResourceInfo is not available, skipping validation");
        return;
    }

    final ClassResourceInfo classResource = operationResource.getClassResourceInfo();
    if (classResource == null) {
        log.info("ClassResourceInfo is not available, skipping validation");
        return;
    }

    final ResourceProvider resourceProvider = classResource.getResourceProvider();
    if (resourceProvider == null) {
        log.info("ResourceProvider is not available, skipping validation");
        return;
    }

    final List<Object> arguments = MessageContentsList.getContentsList(message);
    final Method method = operationResource.getAnnotatedMethod();
    final Object instance = resourceProvider.getInstance(message);
    if (method != null && arguments != null) {
        //validate the parameters(arguments) over the invoked method
        validate(method, arguments.toArray(), instance);

        //validate the fields of each argument
        for (Object arg : arguments) {
            if (arg != null)
                validate(arg);
        }
    }

}
 
开发者ID:wso2,项目名称:carbon-device-mgt,代码行数:36,代码来源:ValidationInterceptor.java


示例5: handleMessage

import org.apache.cxf.jaxrs.model.OperationResourceInfo; //导入依赖的package包/类
@Override
public void handleMessage(XMLMessage message) throws Fault {
	Exchange exchange = message.getExchange();
	// TODO break out into a strategy (not JAXRS-specific)
	OperationResourceInfo operationResourceInfo = exchange.get(OperationResourceInfo.class);
	if (operationResourceInfo == null) {
		message.getInterceptorChain().doIntercept(message);
		return;
	}

	// TODO annotate with a better name?
	String methodName = operationResourceInfo.getMethodToInvoke().getName();
	// TODO annotate with a better name?
	Object key = operationResourceInfo.getClassResourceInfo().getResourceProvider()
			.getInstance();
	if (!(key instanceof Timeable)) {
		message.getInterceptorChain().doIntercept(message);
		return;
	}

	EventMetricCollector collector = timer.getCollector();
	collector.startTiming((Timeable) key, methodName);
	try {
		message.getInterceptorChain().doIntercept(message);
	} finally {
		collector.stopTiming();
	}
}
 
开发者ID:performancecopilot,项目名称:parfait,代码行数:29,代码来源:MonitoringInterceptor.java


示例6: handleResponse

import org.apache.cxf.jaxrs.model.OperationResourceInfo; //导入依赖的package包/类
@Override
public Response handleResponse(final Message m, final OperationResourceInfo ori, final Response response) {
    if(session!=null && session.isLive()) {
        session.logout();
        session = null;
    }
    return null;
}
 
开发者ID:jreijn,项目名称:hippo-addon-restful-webservices,代码行数:9,代码来源:HippoAuthenticationRequestHandler.java


示例7: getServiceObject

import org.apache.cxf.jaxrs.model.OperationResourceInfo; //导入依赖的package包/类
private Object getServiceObject(final Message message) {
    final OperationResourceInfo ori = message.getExchange().get(OperationResourceInfo.class);
    if (ori == null) {
        return null;
    }
    if (!ori.getClassResourceInfo().isRoot()) {
        return message.getExchange().get("org.apache.cxf.service.object.last");
    }
    final ResourceProvider resourceProvider = ori.getClassResourceInfo().getResourceProvider();
    if (resourceProvider.isSingleton()) {
        return resourceProvider.getInstance(message);
    }
    final Object o = message.getExchange().get(CdiResourceProvider.INSTANCE_KEY);
    return o != null || !OpenEJBPerRequestPojoResourceProvider.class.isInstance(resourceProvider) ? o : resourceProvider.getInstance(message);
}
 
开发者ID:apache,项目名称:tomee,代码行数:16,代码来源:CxfRsHttpListener.java


示例8: handleResponse

import org.apache.cxf.jaxrs.model.OperationResourceInfo; //导入依赖的package包/类
@Override
public Response handleResponse(Message message, OperationResourceInfo operationResourceInfo, Response response) {
    IdentityApplicationManagementUtil.resetThreadLocalProvisioningServiceProvider();
    return null;
}
 
开发者ID:wso2,项目名称:carbon-identity-framework,代码行数:6,代码来源:AuthenticationFilter.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java JFontChooser类代码示例发布时间:2022-05-22
下一篇:
Java RegionFactory类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap