本文整理了Java中org.apache.tomcat.util.modeler.Registry.loadMetadata
方法的一些代码示例,展示了Registry.loadMetadata
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Registry.loadMetadata
方法的具体详情如下:
包路径:org.apache.tomcat.util.modeler.Registry
类名称:Registry
方法名:loadMetadata
[英]Load descriptors. The source can be a File or URL or InputStream for the descriptors file. In the case of File and URL, if the extension is ".ser" a serialized version will be loaded. This method should be used to explicitly load metadata - but this is not required in most cases. The registerComponent() method will find metadata in the same package.
[中]加载描述符。源可以是描述符文件的文件、URL或输入流。对于文件和URL,如果扩展名为“.ser”,将加载序列化版本。应该使用此方法显式加载元数据,但在大多数情况下并不需要这样做。registerComponent()方法将在同一个包中查找元数据。
代码示例来源:origin: org.apache.coyote.springsource/com.springsource.org.apache.coyote.springsource
/**
* Load the registry from the XML input found in the specified input
* stream.
*
* @param stream InputStream containing the registry configuration
* information
*
* @exception Exception if any parsing or processing error occurs
* @deprecated use normal class method instead
* @since 1.0
*/
public static void loadRegistry(InputStream stream) throws Exception {
Registry registry = getRegistry();
registry.loadMetadata(stream);
}
代码示例来源:origin: jboss.web/jbossweb
/**
* Load the registry from the XML input found in the specified input
* stream.
*
* @param stream InputStream containing the registry configuration
* information
*
* @exception Exception if any parsing or processing error occurs
* @deprecated use normal class method instead
* @since 1.0
*/
public static void loadRegistry(InputStream stream) throws Exception {
Registry registry = getRegistry();
registry.loadMetadata(stream);
}
代码示例来源:origin: org.jboss.web/jbossweb
/**
* Load the registry from the XML input found in the specified input
* stream.
*
* @param stream InputStream containing the registry configuration
* information
*
* @exception Exception if any parsing or processing error occurs
* @deprecated use normal class method instead
* @since 1.0
*/
public static void loadRegistry(InputStream stream) throws Exception {
Registry registry = getRegistry();
registry.loadMetadata(stream);
}
代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina-ha
protected static boolean initMetaData(Class<?> clazz) {
try {
if (clazz==null) return false;
getRegistry().loadMetadata(clazz.getResourceAsStream("mbeans-descriptors.xml"));
}catch (Exception x) {
log.warn("Unable to load meta data for class:"+clazz.getName());
return false;
}
return true;
}
内容来源于网络,如有侵权,请联系作者删除!