|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.dyade.aaa.agent.conf.A3CMLConfig
Field Summary | |
java.util.Hashtable |
domains
Hashtable of all domains |
java.util.Hashtable |
properties
Hashtable of all global properties |
java.util.Hashtable |
servers
Hashtable of all servers (persitent and transient) |
Constructor Summary | |
A3CMLConfig()
|
Method Summary | |
void |
addDomain(A3CMLDomain domain)
Adds a domain. |
A3CMLProperty |
addProperty(A3CMLProperty prop)
add property |
void |
addServer(A3CMLServer server)
Adds a server. |
void |
configure(A3CMLPServer root)
Adapts the current configuration to the specified persistent server. |
boolean |
containsDomain(java.lang.String name)
Returns true if it exists a domain with this name, false otherwise. |
boolean |
containsProperty(java.lang.String name)
contains property |
boolean |
containsServer(short sid)
Returns true if the configuration contains a server with specified id. |
boolean |
containsServer(java.lang.String name)
Returns true if the configuration contains a server with specified name. |
boolean |
equals(java.lang.Object obj)
|
static A3CMLConfig |
getConfig(java.lang.String path)
Gets a A3CMLConfig serialialized object from file. |
A3CMLDomain |
getDomain(java.lang.String name)
Returns the description of a domain. |
A3CMLConfig |
getDomainConfig(java.lang.String domainName)
Gets configuration of agent servers by a domain from a Config object. |
A3CMLConfig |
getDomainConfig(java.lang.String[] listDomainName)
Gets configuration of agent servers by a list of domain from a Config object. |
java.lang.String |
getJvmArgs(short sid)
Get the JVM argument for a particular agent server identified by its id. |
java.lang.String |
getJvmArgs(java.lang.String name)
Get the JVM argument for a particular agent server identified by its name. |
A3CMLProperty |
getProperty(java.lang.String name)
Returns the specified property. |
A3CMLServer |
getServer(short sid)
Returns the description of a server. |
A3CMLServer |
getServer(java.lang.String name)
Returns the description of a server. |
short |
getServerIdByName(java.lang.String name)
Gets a server identifier from its name. |
java.lang.String |
getServiceArgs(short sid,
java.lang.String classname)
Get the argument strings for a particular service on a particular agent server identified by its id. |
java.lang.String |
getServiceArgs(java.lang.String name,
java.lang.String classname)
Get the argument strings for a particular service on a particular agent server identified by its name. |
java.lang.String |
getServiceArgsHost(java.lang.String hostname,
java.lang.String classname)
Gets the argument strings for a particular service running on a server identified by its host (searchs on all servers and associated transient). |
static A3CMLConfig |
load()
read object from a serialized file, in cfgDir if null, search object in path used to load classes |
A3CMLDomain |
removeDomain(java.lang.String name)
Removes a domain. |
A3CMLProperty |
removeProperty(java.lang.String name)
remove property |
A3CMLServer |
removeServer(short sid)
Removes a server. |
A3CMLServer |
removeServer(java.lang.String name)
Remove a server. |
void |
reset()
reset visited and gateway fields. |
void |
save()
save configuration of agent servers (Config) in a serialized file. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public java.util.Hashtable domains
public java.util.Hashtable servers
public java.util.Hashtable properties
Constructor Detail |
public A3CMLConfig()
Method Detail |
public final void addDomain(A3CMLDomain domain) throws DuplicateDomainException
domain
- The description of added domain.
DuplicateDomainException
- If the domain already exist.public final A3CMLDomain removeDomain(java.lang.String name) throws UnknownDomainException
name
- The domain name.
UnknownDomainException
- If the domain don't exist.public final boolean containsDomain(java.lang.String name)
name
- The domain name.
public final A3CMLDomain getDomain(java.lang.String name) throws UnknownDomainException
name
- The domain name.
UnknownDomainException
- If the domain don't exist.public final void addServer(A3CMLServer server) throws DuplicateServerException
server
- The description of added server.
DuplicateServerException
- If the server already exist.public final A3CMLServer removeServer(short sid) throws UnknownServerException
sid
- The unique server identifier.
UnknownServerException
- If the server does not exist.public final A3CMLServer removeServer(java.lang.String name) throws UnknownServerException
name
- The server name.
UnknownServerException
- If the server does not exist.public final boolean containsServer(short sid)
sid
- server id
public short getServerIdByName(java.lang.String name) throws UnknownServerException
name
- The server name.
UnknownServerException
- If the server does not exist.public final boolean containsServer(java.lang.String name)
name
- server name
public final A3CMLServer getServer(short sid) throws UnknownServerException
UnknownServerException
- If the server does not exist.public final A3CMLServer getServer(java.lang.String name) throws UnknownServerException
name
- The server name.
UnknownServerException
- If the server does not exist.public final A3CMLProperty addProperty(A3CMLProperty prop) throws java.lang.Exception
prop
- A3CMLProperty
java.lang.Exception
public final A3CMLProperty removeProperty(java.lang.String name)
name
- property name
public final boolean containsProperty(java.lang.String name)
name
- property name
public final A3CMLProperty getProperty(java.lang.String name)
public final java.lang.String getJvmArgs(short sid) throws UnknownServerException
UnknownServerException
- The specified server does not exist.public final java.lang.String getJvmArgs(java.lang.String name) throws UnknownServerException
name
- agent server name.
UnknownServerException
- The specified server does not exist.public final java.lang.String getServiceArgs(short sid, java.lang.String classname) throws UnknownServerException, UnknownServiceException
sid
- agent server id.classname
- the service class name.
UnknownServerException
- The specified server does not exist.
UnknownServiceException
- The specified service is not declared on this server.public final java.lang.String getServiceArgs(java.lang.String name, java.lang.String classname) throws UnknownServerException, UnknownServiceException
classname
- the service class name.
UnknownServerException
- The specified server does not exist.
UnknownServiceException
- The specified service is not declared on this server.public void configure(A3CMLPServer root) throws java.lang.Exception
java.lang.Exception
public A3CMLConfig getDomainConfig(java.lang.String domainName) throws java.lang.Exception
Config
object.
domainName
- domain name
Config
object if file exists and is
correct, null otherwise.
java.lang.Exception
- unspecialized exception when reading and parsing the configuration filepublic A3CMLConfig getDomainConfig(java.lang.String[] listDomainName) throws java.lang.Exception
Config
object.
Config
object if file exists and is
correct, null otherwise.
java.lang.Exception
- unspecialized exception when reading and parsing the configuration filepublic void save() throws java.io.IOException
java.io.IOException
AgentServer.DEFAULT_SER_CFG_FILE
public static A3CMLConfig load() throws java.lang.Exception
java.lang.Exception
public static A3CMLConfig getConfig(java.lang.String path) throws java.lang.Exception
A3CMLConfig
serialialized object from file.
path
- path of serialized configuration file
A3CMLConfig
object if file exists and is
correct, null otherwise.
java.lang.Exception
- unspecialized exception when reading and parsing the configuration filepublic java.lang.String toString()
public final java.lang.String getServiceArgsHost(java.lang.String hostname, java.lang.String classname) throws java.lang.Exception
hostname
- hostname
UnknownServiceException
- The specified service is not declared on this server.
java.lang.Exception
public boolean equals(java.lang.Object obj)
public void reset()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |