addProperty
public final A3CMLProperty addProperty(A3CMLProperty prop)
throws Exception
add property
prop
- A3CMLProperty
- the previous value of the specified prop.name in
this hashtable, or null if it did not have one.
configure
public void configure(A3CMLPServer root)
throws Exception
Adapts the current configuration to the specified persistent server.
containsDomain
public final boolean containsDomain(String name)
Returns true if it exists a domain with this name, false otherwise.
name
- The domain name.
- True if the domain is declared, false otherwise.
containsProperty
public final boolean containsProperty(String name)
contains property
name
- property name
- true if contain name; false otherwise.
containsServer
public final boolean containsServer(String name)
Returns true if the configuration contains a server with specified name.
name
- server name
- true if contain name; false otherwise.
containsServer
public final boolean containsServer(short sid)
Returns true if the configuration contains a server with specified id.
sid
- server id
- true if contain sid; false otherwise.
equals
public boolean equals(Object obj)
getConfig
public static A3CMLConfig getConfig(String path)
throws Exception
Gets a A3CMLConfig
serialialized object from file.
path
- path of serialized configuration file
- the
A3CMLConfig
object if file exists and is
correct, null otherwise.
getDomainConfig
public A3CMLConfig getDomainConfig(String domainName)
throws Exception
Gets configuration of agent servers by a domain from a Config object.
This method fills the object graph configuration in the Config
object.
domainName
- domain name
- the
Config
object if file exists and is
correct, null otherwise.
getDomainConfig
public A3CMLConfig getDomainConfig(String[] listDomainName)
throws Exception
Gets configuration of agent servers by a list of domain from a Config object.
This method fills the object graph configuration in the Config
object.
- the
Config
object if file exists and is
correct, null otherwise.
getJvmArgs
public final String getJvmArgs(String name)
throws UnknownServerException
Get the JVM argument for a particular agent server identified by its name.
name
- agent server name.
- the arguments as declared in configuration file
UnknownServerException
- The specified server does not exist.
getJvmArgs
public final String getJvmArgs(short sid)
throws UnknownServerException
Get the JVM argument for a particular agent server identified by its id.
- the arguments as declared in configuration file
UnknownServerException
- The specified server does not exist.
getProperty
public final A3CMLProperty getProperty(String name)
Returns the specified property.
getServerIdByName
public short getServerIdByName(String name)
throws UnknownServerException
Gets a server identifier from its name.
name
- The server name.
- The server identifier.
UnknownServerException
- If the server does not exist.
getServiceArgs
public final String getServiceArgs(short sid,
String classname)
throws UnknownServerException,
UnknownServiceException
Get the argument strings for a particular service on a particular
agent server identified by its id.
sid
- agent server id.classname
- the service class name.
- the arguments as declared.
UnknownServerException
- The specified server does not exist.UnknownServiceException
- The specified service is not declared on this server.
getServiceArgsHost
public final String getServiceArgsHost(String hostname,
String classname)
throws Exception
Gets the argument strings for a particular service running on a server
identified by its host (searchs on all servers and associated transient).
hostname
- hostname
- the arguments as declared in configuration file
load
public static A3CMLConfig load()
throws Exception
read object from a serialized file,
in cfgDir if null, search object in
path used to load classes
removeProperty
public final A3CMLProperty removeProperty(String name)
remove property
name
- property name
- the value to which the name had been mapped in
this hashtable, or null if the name did not have a mapping.
reset
public void reset()
reset visited and gateway fields.
save
public void save()
throws IOException
save configuration of agent servers (Config)
in a serialized file.
AgentServer.DEFAULT_SER_CFG_FILE
toString
public String toString()