Package fr.dyade.aaa.agent.conf
Class A3CML
- java.lang.Object
-
- fr.dyade.aaa.agent.conf.A3CML
-
public class A3CML extends Object
Defines XML syntactic element for A3CML configuration file.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static StringATT_ARGSSyntaxic name for args attribute(package private) static StringATT_CLASSSyntaxic name for class attribute(package private) static StringATT_DOMAINSyntaxic name for domain attribute(package private) static StringATT_HOSTNAMESyntaxic name for hostname attribute(package private) static StringATT_IDSyntaxic name for id attribute(package private) static StringATT_NAMESyntaxic name for name attribute(package private) static StringATT_NETWORKSyntaxic name for network attribute(package private) static StringATT_PORTSyntaxic name for port attribute(package private) static StringATT_SERVERSyntaxic name for server attribute(package private) static StringATT_SIDSyntaxic name for sid attribute(package private) static StringATT_VALUESyntaxic name for value attribute(package private) static StringELT_CONFIGSyntaxic name for config element(package private) static StringELT_DOMAINSyntaxic name for domain element(package private) static StringELT_JVM_ARGSSyntaxic for server jvm arguments(package private) static StringELT_NATSyntaxic name for nat element(package private) static StringELT_NETWORKSyntaxic name for network element(package private) static StringELT_PROPERTYSyntaxic name for property element(package private) static StringELT_SERVERSyntaxic name for server element(package private) static StringELT_SERVICESyntaxic name for service element(package private) static StringTAB(package private) static StringTAB2
-
Constructor Summary
Constructors Constructor Description A3CML()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static A3CMLConfiggetConfig(Reader reader)Gets configuration of agent servers from a XML file.static A3CMLConfiggetXMLConfig()Gets an agent server configuration from a XML file.static A3CMLConfiggetXMLConfig(String path)static A3CMLConfiggetXMLConfig(String cfgDir, String cfgFileName)Gets an agent server configuration from a XML file.static voidtoXML(A3CMLConfig config, PrintWriter out)static voidtoXML(A3CMLConfig config, String cfgDir, String xmlFileName)write a configuration in an A3CML file.private static voidwriteToXMLServer(Object obj, PrintWriter out)
-
-
-
Field Detail
-
ELT_CONFIG
static final String ELT_CONFIG
Syntaxic name for config element- See Also:
- Constant Field Values
-
ELT_DOMAIN
static final String ELT_DOMAIN
Syntaxic name for domain element- See Also:
- Constant Field Values
-
ELT_SERVER
static final String ELT_SERVER
Syntaxic name for server element- See Also:
- Constant Field Values
-
ELT_NETWORK
static final String ELT_NETWORK
Syntaxic name for network element- See Also:
- Constant Field Values
-
ELT_SERVICE
static final String ELT_SERVICE
Syntaxic name for service element- See Also:
- Constant Field Values
-
ELT_PROPERTY
static final String ELT_PROPERTY
Syntaxic name for property element- See Also:
- Constant Field Values
-
ELT_NAT
static final String ELT_NAT
Syntaxic name for nat element- See Also:
- Constant Field Values
-
ATT_ID
static final String ATT_ID
Syntaxic name for id attribute- See Also:
- Constant Field Values
-
ATT_NAME
static final String ATT_NAME
Syntaxic name for name attribute- See Also:
- Constant Field Values
-
ATT_DOMAIN
static final String ATT_DOMAIN
Syntaxic name for domain attribute- See Also:
- Constant Field Values
-
ATT_NETWORK
static final String ATT_NETWORK
Syntaxic name for network attribute- See Also:
- Constant Field Values
-
ATT_HOSTNAME
static final String ATT_HOSTNAME
Syntaxic name for hostname attribute- See Also:
- Constant Field Values
-
ATT_PORT
static final String ATT_PORT
Syntaxic name for port attribute- See Also:
- Constant Field Values
-
ATT_SERVER
static final String ATT_SERVER
Syntaxic name for server attribute- See Also:
- Constant Field Values
-
ATT_CLASS
static final String ATT_CLASS
Syntaxic name for class attribute- See Also:
- Constant Field Values
-
ATT_ARGS
static final String ATT_ARGS
Syntaxic name for args attribute- See Also:
- Constant Field Values
-
ATT_VALUE
static final String ATT_VALUE
Syntaxic name for value attribute- See Also:
- Constant Field Values
-
ELT_JVM_ARGS
static final String ELT_JVM_ARGS
Syntaxic for server jvm arguments- See Also:
- Constant Field Values
-
ATT_SID
static final String ATT_SID
Syntaxic name for sid attribute- See Also:
- Constant Field Values
-
TAB
static final String TAB
- See Also:
- Constant Field Values
-
TAB2
static final String TAB2
- See Also:
- Constant Field Values
-
-
Method Detail
-
toXML
public static final void toXML(A3CMLConfig config, String cfgDir, String xmlFileName) throws Exception
write a configuration in an A3CML file.- Parameters:
config- the configurationcfgDir- the directoryxmlFileName- the filename- Throws:
Exception- an error occurs
-
toXML
public static final void toXML(A3CMLConfig config, PrintWriter out) throws Exception
- Throws:
Exception
-
writeToXMLServer
private static final void writeToXMLServer(Object obj, PrintWriter out)
-
getXMLConfig
public static A3CMLConfig getXMLConfig() throws Exception
Gets an agent server configuration from a XML file. This method fills the object graph configuration in theA3CMLConfigobject.- Returns:
- the
A3CMLConfigobject if file exists and is correct, null otherwise. - Throws:
Exception- unspecialized exception when reading and parsing the configuration file
-
getXMLConfig
public static A3CMLConfig getXMLConfig(String cfgDir, String cfgFileName) throws Exception
Gets an agent server configuration from a XML file. This method fills the object graph configuration in theA3CMLConfigobject.- Parameters:
cfgDir- directory of XML filecfgFileName- name of XML configuration file- Returns:
- the
A3CMLConfigobject if file exists and is correct, null otherwise. - Throws:
Exception- unspecialized exception when reading and parsing the configuration file
-
getXMLConfig
public static A3CMLConfig getXMLConfig(String path) throws Exception
- Throws:
Exception
-
getConfig
public static A3CMLConfig getConfig(Reader reader) throws Exception
Gets configuration of agent servers from a XML file. This method fills the object graph configuration in theConfigobject.- Parameters:
reader- Reader- Returns:
- the
Configobject if file exists and is correct, null otherwise. - Throws:
Exception- unspecialized exception when reading and parsing the configuration file
-
-