本文整理了Java中org.apache.cxf.Bus.getProperty()
方法的一些代码示例,展示了Bus.getProperty()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Bus.getProperty()
方法的具体详情如下:
包路径:org.apache.cxf.Bus
类名称:Bus
方法名:getProperty
暂无
代码示例来源:origin: org.apache.cxf/cxf-rt-transports-http
public FormattedServiceListWriter(String styleSheetPath,
String title,
boolean showForeignContexts,
Bus bus) {
this.styleSheetPath = styleSheetPath;
this.title = title;
this.showForeignContexts = showForeignContexts;
this.bus = bus;
if (this.bus != null) {
this.atomMap =
CastUtils.cast((Map<?, ?>)this.bus.getProperty("org.apache.cxf.extensions.logging.atom.pull"));
}
}
代码示例来源:origin: org.apache.cxf/cxf-rt-transports-http
private void writeUnformattedRESTfulEndpoints(PrintWriter writer,
String baseAddress,
AbstractDestination[] destinations) throws IOException {
for (AbstractDestination sd : destinations) {
String address = getAbsoluteAddress(baseAddress, sd);
boolean wadlAvailable = bus != null
&& PropertyUtils.isTrue(bus.getProperty("wadl.service.descrition.available"));
boolean swaggerAvailable = bus != null
&& PropertyUtils.isTrue(bus.getProperty("swagger.service.descrition.available"));
if (!wadlAvailable && !swaggerAvailable) {
writer.write(address + "\n");
return;
}
if (wadlAvailable) {
writer.write(address + "?_wadl\n");
}
if (swaggerAvailable) {
writer.write(address + "/swagger.json\n");
}
}
}
代码示例来源:origin: org.apache.cxf/cxf-rt-transports-http
if (sb != null && PropertyUtils.isTrue(sb.getProperty("wadl.service.description.available"))) {
writer.write("<br/><span class=\"field\">WADL :</span> " + "<a href=\"" + absoluteURL
+ "?_wadl\">" + absoluteURL + "?_wadl" + "</a>");
if (sb != null && PropertyUtils.isTrue(sb.getProperty("swagger.service.description.available"))) {
String swaggerPath = "swagger.json";
if (PropertyUtils.isTrue(sb.getProperty("swagger.service.ui.available"))) {
URI uri = URI.create(absoluteURL);
String schemePath = uri.getScheme() + "://" + uri.getHost()
代码示例来源:origin: org.apache.cxf/cxf-rt-transports-http
privateEndpoints = (List<String>)bus.getProperty("org.apache.cxf.private.endpoints");
} else {
privateEndpoints = new ArrayList<>();
代码示例来源:origin: org.apache.cxf/cxf-rt-transports-http
/**
* Constructor
*
* @param b the associated Bus
* @param registry the destination registry
* @param ei the endpoint info of the destination
* @param path the path
* @param dp true for adding the default port if it is missing
* @throws IOException
*/
public AbstractHTTPDestination(Bus b,
DestinationRegistry registry,
EndpointInfo ei,
String path,
boolean dp)
throws IOException {
super(b, getTargetReference(getAddressValue(ei, dp), b), ei);
this.bus = b;
this.registry = registry;
this.path = path;
try {
ServletRequest.class.getMethod("isAsyncSupported");
isServlet3 = true;
} catch (Throwable t) {
//servlet 2.5 or earlier, no async support
}
decodeBasicAuthWithIso8859 = PropertyUtils.isTrue(bus.getProperty(DECODE_BASIC_AUTH_WITH_ISO8859));
initConfig();
}
代码示例来源:origin: org.apache.cxf/cxf-rt-transports-http
peferredTransportId = (String)getBus().getProperty(AbstractTransportFactory.PREFERRED_TRANSPORT_ID);
代码示例来源:origin: apache/cxf
private static String getGlobalCacheManagerName(Bus bus) {
if (bus != null) {
return (String) bus.getProperty(GLOBAL_EHCACHE_MANAGER_NAME);
}
return null;
}
}
代码示例来源:origin: apache/cxf
private static String getBusProperty(Bus b, String key, String dflt) {
String v = (String)b.getProperty(key);
return v != null ? v : dflt;
}
代码示例来源:origin: apache/cxf
private static String getBusProperty(Bus b, String key, String dflt) {
String v = (String)b.getProperty(key);
return v != null ? v : dflt;
}
代码示例来源:origin: apache/cxf
private static String getBusProperty(Bus b, String key, String dflt) {
String v = (String)b.getProperty(key);
return v != null ? v : dflt;
}
代码示例来源:origin: apache/cxf
private static boolean getBusProperty(Bus b, String key, boolean dflt) {
Object v = b.getProperty(key);
if (v instanceof Boolean) {
return (Boolean)v;
}
return v != null ? Boolean.valueOf(v.toString()) : dflt;
}
}
代码示例来源:origin: apache/cxf
@SuppressWarnings("unchecked")
private Map<Class<?>, Map<Class<?>, ThreadLocalProxy<?>>> getConstructorProxyMap(boolean create) {
Object property = bus.getProperty(CONSTRUCTOR_PROXY_MAP);
if (property == null) {
Map<Class<?>, Map<Class<?>, ThreadLocalProxy<?>>> map
= new ConcurrentHashMap<>(2);
bus.setProperty(CONSTRUCTOR_PROXY_MAP, map);
property = map;
}
return (Map<Class<?>, Map<Class<?>, ThreadLocalProxy<?>>>)property;
}
代码示例来源:origin: apache/cxf
public static Class<?> getRealClass(Bus bus, Object o) {
bus = getBus(bus);
if (bus != null && bus.getProperty(ClassUnwrapper.class.getName()) != null) {
ClassUnwrapper unwrapper = (ClassUnwrapper) bus.getProperty(ClassUnwrapper.class.getName());
return unwrapper.getRealClass(o);
}
return getContextClassHelper(bus).getRealClassInternal(o);
}
代码示例来源:origin: org.apache.cxf/cxf-core
public static Class<?> getRealClass(Bus bus, Object o) {
bus = getBus(bus);
if (bus != null && bus.getProperty(ClassUnwrapper.class.getName()) != null) {
ClassUnwrapper unwrapper = (ClassUnwrapper) bus.getProperty(ClassUnwrapper.class.getName());
return unwrapper.getRealClass(o);
}
return getContextClassHelper(bus).getRealClassInternal(o);
}
代码示例来源:origin: apache/cxf
private boolean shouldCheckUrl(Bus bus) {
Object prop = null;
if (bus != null) {
prop = bus.getProperty(DO_NOT_CHECK_URL_PROP);
}
if (prop == null) {
prop = SystemPropertyAction.getPropertyOrNull(DO_NOT_CHECK_URL_PROP);
}
return !PropertyUtils.isTrue(prop);
}
代码示例来源:origin: org.apache.cxf/cxf-rt-transports-http-jetty
private boolean shouldCheckUrl(Bus bus) {
Object prop = null;
if (bus != null) {
prop = bus.getProperty(DO_NOT_CHECK_URL_PROP);
}
if (prop == null) {
prop = SystemPropertyAction.getPropertyOrNull(DO_NOT_CHECK_URL_PROP);
}
return !PropertyUtils.isTrue(prop);
}
代码示例来源:origin: apache/cxf
private boolean shouldCheckUrl(Bus bus) {
Object prop = null;
if (bus != null) {
prop = bus.getProperty(DO_NOT_CHECK_URL_PROP);
}
if (prop == null) {
prop = SystemPropertyAction.getPropertyOrNull(DO_NOT_CHECK_URL_PROP);
}
return !PropertyUtils.isTrue(prop);
}
代码示例来源:origin: org.apache.cxf/cxf-bundle-jaxrs
private boolean shouldCheckUrl(Bus bus) {
Object prop = null;
if (bus != null) {
prop = bus.getProperty(DO_NOT_CHECK_URL_PROP);
}
if (prop == null) {
prop = SystemPropertyAction.getPropertyOrNull(DO_NOT_CHECK_URL_PROP);
}
return !PropertyUtils.isTrue(prop);
}
代码示例来源:origin: apache/cxf
@Test
public void testProxyClassIsProperlyUnwrapped() {
final BookStorePreMatchingRequestFilter filter = getBeanReference(BookStorePreMatchingRequestFilter.class);
final ClassUnwrapper unwrapper = (ClassUnwrapper)bus.getProperty(ClassUnwrapper.class.getName());
assertThat(unwrapper, notNullValue());
assertThat(filter.getClass(), not(equalTo(BookStorePreMatchingRequestFilter.class)));
assertThat(unwrapper.getRealClass(filter), equalTo(BookStorePreMatchingRequestFilter.class));
}
代码示例来源:origin: apache/cxf
@Test
public void testRealClassIsProperlyUnwrapped() {
final BookStoreRequestFilter filter = getBeanReference(BookStoreRequestFilter.class);
final ClassUnwrapper unwrapper = (ClassUnwrapper)bus.getProperty(ClassUnwrapper.class.getName());
assertThat(unwrapper, notNullValue());
assertThat(filter.getClass(), equalTo(BookStoreRequestFilter.class));
assertThat(unwrapper.getRealClass(filter), equalTo(BookStoreRequestFilter.class));
}
}
内容来源于网络,如有侵权,请联系作者删除!