本文整理了Java中org.apache.cxf.resource.ResourceManager.resolveResource
方法的一些代码示例,展示了ResourceManager.resolveResource
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ResourceManager.resolveResource
方法的具体详情如下:
包路径:org.apache.cxf.resource.ResourceManager
类名称:ResourceManager
方法名:resolveResource
[英]Resolve a resource. The ResourceManager will query all of the registered ResourceResovler
objects until one manages to resolve the resource
[中]解析资源。ResourceManager将查询所有注册的ResourceResovler
对象,直到其中一个对象成功解析资源
代码示例来源:origin: org.apache.cxf/cxf-rt-transports-http
protected InputStream getResourceAsStream(String path) {
InputStream is = ClassLoaderUtils.getResourceAsStream(path, AbstractHTTPServlet.class);
if (is == null && getBus() != null) {
ResourceManager rm = getBus().getExtension(ResourceManager.class);
if (rm != null) {
is = rm.resolveResource(path, InputStream.class);
}
}
return is;
}
代码示例来源:origin: org.apache.cxf/cxf-rt-transports-http
ResourceManager manager = bus.getExtension(ResourceManager.class);
if (manager != null) {
loader = manager.resolveResource("", ClassLoader.class);
代码示例来源:origin: apache/cxf
private Object resolveResource(String resourceName, Class<?> type) {
if (resourceManager == null) {
return null;
}
return resourceManager.resolveResource(resourceName, type, resourceResolvers);
}
代码示例来源:origin: org.apache.cxf/cxf-core
private Object resolveResource(String resourceName, Class<?> type) {
if (resourceManager == null) {
return null;
}
return resourceManager.resolveResource(resourceName, type, resourceResolvers);
}
代码示例来源:origin: org.apache.cxf/cxf-api
private Object resolveResource(String resourceName, Class<?> type) {
if (resourceManager == null) {
return null;
}
return resourceManager.resolveResource(resourceName, type, resourceResolvers);
}
代码示例来源:origin: org.apache.cxf/cxf-common-utilities
private Object resolveResource(String resourceName, Class<?> type) {
if (resourceManager == null) {
return null;
}
return resourceManager.resolveResource(resourceName, type, resourceResolvers);
}
代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs
private Object resolveResource(String resourceName, Class<?> type) {
if (resourceManager == null) {
return null;
}
return resourceManager.resolveResource(resourceName, type, resourceResolvers);
}
代码示例来源:origin: apache/cxf
public static <T> T getResource(String path, Class<T> resourceClass, Bus bus) {
if (bus != null) {
ResourceManager rm = bus.getExtension(ResourceManager.class);
if (rm != null) {
return rm.resolveResource(path, resourceClass);
}
}
return null;
}
代码示例来源:origin: apache/cxf
public static <T> T getResource(String path, Class<T> resourceClass, Bus bus) {
if (bus != null) {
ResourceManager rm = bus.getExtension(ResourceManager.class);
if (rm != null) {
return rm.resolveResource(path, resourceClass);
}
}
return null;
}
代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs
public static <T> T getResource(String path, Class<T> resourceClass, Bus bus) {
if (bus != null) {
ResourceManager rm = bus.getExtension(ResourceManager.class);
if (rm != null) {
return rm.resolveResource(path, resourceClass);
}
}
return null;
}
代码示例来源:origin: org.apache.cxf/cxf-rt-rs-security-jose
public static <T> T getResource(String path, Class<T> resourceClass, Bus bus) {
if (bus != null) {
ResourceManager rm = bus.getExtension(ResourceManager.class);
if (rm != null) {
return rm.resolveResource(path, resourceClass);
}
}
return null;
}
代码示例来源:origin: apache/cxf
public InputSource getInputSource(String parentLocation, String importLocation) {
InputStream ins = bus.getExtension(ResourceManager.class).getResourceAsStream(importLocation);
InputSource is = new InputSource(ins);
is.setSystemId(importLocation);
is.setPublicId(importLocation);
URL url = bus.getExtension(ResourceManager.class).resolveResource(importLocation, URL.class);
if (url != null) {
is.setSystemId(url.toString());
is.setPublicId(url.toString());
}
return is;
}
代码示例来源:origin: org.apache.cxf/cxf-rt-core
public InputSource getInputSource(String parentLocation, String importLocation) {
InputStream ins = bus.getExtension(ResourceManager.class).getResourceAsStream(importLocation);
InputSource is = new InputSource(ins);
is.setSystemId(importLocation);
is.setPublicId(importLocation);
URL url = bus.getExtension(ResourceManager.class).resolveResource(importLocation, URL.class);
if (url != null) {
is.setSystemId(url.toString());
is.setPublicId(url.toString());
}
return is;
}
代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs
public InputSource getInputSource(String parentLocation, String importLocation) {
InputStream ins = bus.getExtension(ResourceManager.class).getResourceAsStream(importLocation);
InputSource is = new InputSource(ins);
is.setSystemId(importLocation);
is.setPublicId(importLocation);
URL url = bus.getExtension(ResourceManager.class).resolveResource(importLocation, URL.class);
if (url != null) {
is.setSystemId(url.toString());
is.setPublicId(url.toString());
}
return is;
}
代码示例来源:origin: apache/cxf
protected InputStream getResourceAsStream(String path) {
InputStream is = ClassLoaderUtils.getResourceAsStream(path, AbstractHTTPServlet.class);
if (is == null && getBus() != null) {
ResourceManager rm = getBus().getExtension(ResourceManager.class);
if (rm != null) {
is = rm.resolveResource(path, InputStream.class);
}
}
return is;
}
代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs
protected InputStream getResourceAsStream(String path) {
InputStream is = ClassLoaderUtils.getResourceAsStream(path, AbstractHTTPServlet.class);
if (is == null && getBus() != null) {
ResourceManager rm = getBus().getExtension(ResourceManager.class);
if (rm != null) {
is = rm.resolveResource(path, InputStream.class);
}
}
return is;
}
代码示例来源:origin: apache/cxf
private void setDataBinding(AbstractServiceFactoryBean factory,
DataBinding annotation) {
if (annotation != null && factory.getDataBinding(false) == null) {
try {
if (!StringUtils.isEmpty(annotation.ref())) {
factory.setDataBinding(factory.getBus().getExtension(ResourceManager.class)
.resolveResource(annotation.ref(), annotation.value()));
}
factory.setDataBinding(annotation.value().newInstance());
} catch (Exception e) {
//REVISIT - log a warning
}
}
}
代码示例来源:origin: org.apache.cxf/cxf-rt-core
private void setDataBinding(AbstractServiceFactoryBean factory,
DataBinding annotation) {
if (annotation != null && factory.getDataBinding(false) == null) {
try {
if (!StringUtils.isEmpty(annotation.ref())) {
factory.setDataBinding(factory.getBus().getExtension(ResourceManager.class)
.resolveResource(annotation.ref(), annotation.value()));
}
factory.setDataBinding(annotation.value().newInstance());
} catch (Exception e) {
//REVISIT - log a warning
}
}
}
代码示例来源:origin: org.apache.cxf/cxf-core
private void setDataBinding(AbstractServiceFactoryBean factory,
DataBinding annotation) {
if (annotation != null && factory.getDataBinding(false) == null) {
try {
if (!StringUtils.isEmpty(annotation.ref())) {
factory.setDataBinding(factory.getBus().getExtension(ResourceManager.class)
.resolveResource(annotation.ref(), annotation.value()));
}
factory.setDataBinding(annotation.value().newInstance());
} catch (Exception e) {
//REVISIT - log a warning
}
}
}
代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs
private void setDataBinding(AbstractServiceFactoryBean factory,
DataBinding annotation) {
if (annotation != null && factory.getDataBinding(false) == null) {
try {
if (!StringUtils.isEmpty(annotation.ref())) {
factory.setDataBinding(factory.getBus().getExtension(ResourceManager.class)
.resolveResource(annotation.ref(), annotation.value()));
}
factory.setDataBinding(annotation.value().newInstance());
} catch (Exception e) {
//REVISIT - log a warning
}
}
}
内容来源于网络,如有侵权,请联系作者删除!