Package org.ow2.joram.spring
Class JoramAdminBeanDefinitionParser
- java.lang.Object
-
- org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
-
- org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser
-
- org.ow2.joram.spring.JoramAdminBeanDefinitionParser
-
- All Implemented Interfaces:
org.springframework.beans.factory.xml.BeanDefinitionParser
public class JoramAdminBeanDefinitionParser extends org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParserParser for the joram:admin xml entry.The joram administration attributes:
- user (optionnal): the name of the Joram root (default “root”)
- pass (optionnal): the password of the Joram root (default “root”)
- host (optionnal): the host of the Joram server (default “localhost”)
- port (optionnal): the port of the Joram server (default “16010”)
A simple example:<!-- Joram administration to use --> <joram:admin id="wrapper" user="root" pass="root" host="localhost" port="16010" />
-
-
Field Summary
Fields Modifier and Type Field Description private Connectioncnxstatic Loggerlogger
-
Constructor Summary
Constructors Constructor Description JoramAdminBeanDefinitionParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private AdminItfadminConnect(boolean collocated, String user, String pass, String host, int port)Create the wrapper (AdminItf).protected voiddoParse(Element element, org.springframework.beans.factory.support.BeanDefinitionBuilder bean)Parse the joram admin definition, and create the admin wrapper.protected ClassgetBeanClass(Element element)-
Methods inherited from class org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser
doParse, getBeanClassName, getParentName, parseInternal
-
-
-
-
Field Detail
-
logger
public static final Logger logger
-
cnx
private Connection cnx
-
-
Method Detail
-
getBeanClass
protected Class getBeanClass(Element element)
- Overrides:
getBeanClassin classorg.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser- Returns:
- the Class of JoramAdmin.
- See Also:
AbstractSingleBeanDefinitionParser.getBeanClass(org.w3c.dom.Element)
-
doParse
protected void doParse(Element element, org.springframework.beans.factory.support.BeanDefinitionBuilder bean)
Parse the joram admin definition, and create the admin wrapper. By default JoramAdmin is collocated. If you set a host / port, the collocated set to false. Add the wrapper property value to the bean.- Overrides:
doParsein classorg.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser- See Also:
AbstractSingleBeanDefinitionParser.doParse(org.w3c.dom.Element, org.springframework.beans.factory.support.BeanDefinitionBuilder)
-
adminConnect
private AdminItf adminConnect(boolean collocated, String user, String pass, String host, int port) throws Exception
Create the wrapper (AdminItf).- Parameters:
collocated- true if Joram is colocateduser- the admin user namepass- the admin passwordhost- the admin hostport- the admin port- Returns:
- the admin wrapper
- Throws:
Exception
-
-