Package org.glassfish.api.admin.config
Interface ConfigParser
-
- All Known Implementing Classes:
DefaultConfigParser
@Contract public interface ConfigParser
- Author:
- Jerome Dochez, Vivek Pandey
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T extends Container>
TparseContainerConfig(org.glassfish.hk2.api.ServiceLocator habitat, URL configuration, Class<T> containerType)
Parse a Container's configuration defined by it's XML template pointed by configuration URL.
-
-
-
Method Detail
-
parseContainerConfig
<T extends Container> T parseContainerConfig(org.glassfish.hk2.api.ServiceLocator habitat, URL configuration, Class<T> containerType) throws IOException
Parse a Container's configuration defined by it's XML template pointed by configuration URL.
Example:
Inside yourSniffer
:{@link @Inject} ConfigParser parser; {@link @Inject} JrubyContainer container; public Module[] setup(java.lang.String s, java.util.logging.Logger logger) throws java.io.IOException{ if(container == null){ URL xml = getClass().getClassLoader().getResource("jruby-container-config.xml"); config = parser.parseContainerConfig(habitat, xml, JrubyContainer.class); //Now do stuff with config } }
- Returns:
- Confgured container
- Throws:
IOException
-
-