|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.dyade.aaa.agent.conf.A3CMLConfig
public class A3CMLConfig
Field Summary | |
---|---|
java.util.Hashtable |
clusters
Hashtable of all clusters |
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 (persistent and transient) |
Constructor Summary | |
---|---|
A3CMLConfig()
|
Method Summary | |
---|---|
void |
addCluster(A3CMLCluster cluster)
Adds a cluster. |
void |
addDomain(A3CMLDomain domain)
Adds a domain. |
A3CMLProperty |
addProperty(A3CMLProperty prop)
add property |
void |
addServer(A3CMLServer server)
Adds a server. |
void |
configure(A3CMLServer root)
Adapts the current configuration to the specified persistent server. |
boolean |
containsCluster(short sid)
Returns true if the configuration contains a cluster with specified id. |
boolean |
containsCluster(java.lang.String name)
Returns true if the configuration contains a cluster with specified name. |
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)
|
A3CMLCluster |
getCluster(short sid)
Returns the description of a cluster. |
A3CMLCluster |
getCluster(java.lang.String name)
Returns the description of a cluster. |
short |
getClusterIdByName(java.lang.String name)
Gets a cluster identifier from its name. |
static A3CMLConfig |
getConfig(java.lang.String path)
Gets a A3CMLConfig serialized 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. |
A3CMLProperty |
getProperty(java.lang.String name,
short sid,
short cid)
Returns the specified property. |
A3CMLServer |
getServer(short sid)
Returns the description of a server. |
A3CMLServer |
getServer(short sid,
short cid)
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 |
getServerNameById(short sid)
Gets a server name from its identifier. |
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). |
int |
hashCode()
|
static A3CMLConfig |
load()
read object from a serialized file. |
A3CMLCluster |
removeCluster(short sid)
Removes a cluster. |
A3CMLCluster |
removeCluster(java.lang.String name)
Remove a cluster. |
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, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public java.util.Hashtable domains
public java.util.Hashtable servers
public java.util.Hashtable properties
public java.util.Hashtable clusters
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 addCluster(A3CMLCluster cluster) throws DuplicateClusterException
cluster
- The description of added cluster.
DuplicateClusterException
- If the cluster already exist.public final A3CMLCluster getCluster(short sid) throws UnknownClusterException
sid
- The cluster identifier.
UnknownClusterException
- If the cluster does not exist.public final A3CMLCluster getCluster(java.lang.String name) throws UnknownClusterException
name
- The cluster name.
UnknownClusterException
- If the cluster does not exist.public short getClusterIdByName(java.lang.String name) throws UnknownClusterException
name
- The cluster name.
UnknownClusterException
- If the cluster does not exist.public final boolean containsCluster(java.lang.String name)
name
- cluster name
public final boolean containsCluster(short sid)
sid
- cluster id
public final A3CMLCluster removeCluster(short sid) throws UnknownClusterException
sid
- The unique cluster identifier.
UnknownClusterException
- If the server does not exist.public final A3CMLCluster removeCluster(java.lang.String name) throws UnknownClusterException
name
- The cluster name.
UnknownClusterException
- If the server does not 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 java.lang.String getServerNameById(short sid) throws UnknownServerException
name
- The server identifier.
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
sid
- The server identifier.
UnknownServerException
- If the server does not exist.public final A3CMLServer getServer(short sid, short cid) throws UnknownServerException
sid
- The server identifier.cid
- The cluster identifier.
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 A3CMLProperty getProperty(java.lang.String name, short sid, short cid) throws java.lang.Exception
java.lang.Exception
public final java.lang.String getJvmArgs(short sid) throws UnknownServerException
id
- agent server identifier.
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
sid
- agent server name.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(A3CMLServer 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.
domainName
- list of domain name
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
serialized 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()
toString
in class java.lang.Object
public final java.lang.String getServiceArgsHost(java.lang.String hostname, java.lang.String classname) throws java.lang.Exception
hostname
- hostnameclassName
- the service class name
UnknownServiceException
- The specified service is not declared on this server.
java.lang.Exception
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public void reset()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |