本文整理汇总了Java中org.jboss.resteasy.core.ResourceInvoker类的典型用法代码示例。如果您正苦于以下问题:Java ResourceInvoker类的具体用法?Java ResourceInvoker怎么用?Java ResourceInvoker使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ResourceInvoker类属于org.jboss.resteasy.core包,在下文中一共展示了ResourceInvoker类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: fromBoundResourceInvokers
点赞 2
import org.jboss.resteasy.core.ResourceInvoker; //导入依赖的package包/类
public static List<ResourceDescription> fromBoundResourceInvokers(
Set<Map.Entry<String, List<ResourceInvoker>>> bound) {
Map<String, ResourceDescription> descriptions =
new HashMap<String, IFOpenDoorsRestServices.ResourceDescription>();
for (Map.Entry<String, List<ResourceInvoker>> entry : bound) {
Method aMethod = ((ResourceMethodInvoker) entry.getValue().get(
0)).getMethod();
String basePath = aMethod.getDeclaringClass()
.getAnnotation(Path.class).value();
if (!descriptions.containsKey(basePath)) {
descriptions.put(basePath,
new ResourceDescription(basePath));
}
for (ResourceInvoker invoker : entry.getValue()) {
ResourceMethodInvoker method = (ResourceMethodInvoker) invoker;
String subPath = null;
for (Annotation annotation : method.getMethodAnnotations()) {
if (annotation.annotationType().equals(Path.class)) {
subPath = ((Path) annotation).value();
break;
}
}
descriptions.get(basePath).addMethod(basePath + subPath,
method);
}
}
List<ResourceDescription> linkList =
new LinkedList<ResourceDescription>();
linkList.addAll(descriptions.values());
return linkList;
}
开发者ID:LADOSSIFPB,
项目名称:-gdgjp-HackGDGIO2015-IFOpenDoors,
代码行数:40,
代码来源:IFOpenDoorsRestServices.java
示例2: isMultipartExpected
点赞 1
import org.jboss.resteasy.core.ResourceInvoker; //导入依赖的package包/类
/**
* Checks if multipart is expected for the resource. This is determined by the
* presence of {@value MediaType#MULTIPART_FORM_DATA} in the {@link Consumes}
* annotation.
*
* @param request
* @return
*/
private boolean isMultipartExpected(final HttpRequest request) {
final ResourceInvoker invoker = dispatcher.getRegistry().getResourceInvoker(request);
final Consumes consumes = invoker.getMethod().getAnnotation(Consumes.class);
return consumes != null && Arrays.asList(consumes.value()).contains(MediaType.MULTIPART_FORM_DATA);
}
开发者ID:trajano,
项目名称:app-ms,
代码行数:16,
代码来源:SpringJaxRsHandler.java