@Service public class DefaultConfigParser extends Object implements ConfigParser
| Constructor and Description |
|---|
DefaultConfigParser() |
| Modifier and Type | Method and Description |
|---|---|
<T extends Container> |
parseContainerConfig(org.glassfish.hk2.api.ServiceLocator habitat,
URL configuration,
Class<T> configType)
Parse a Container's configuration defined by it's XML template pointed by configuration URL.
|
public <T extends Container> T parseContainerConfig(org.glassfish.hk2.api.ServiceLocator habitat, URL configuration, Class<T> configType) throws IOException
ConfigParserSniffer:
@InjectConfigParser parser;@InjectJrubyContainer 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 } }
parseContainerConfig in interface ConfigParserIOExceptionCopyright © 2017. All rights reserved.