fr.dyade.aaa.agent.conf
Class A3CMLCluster

java.lang.Object
  extended by fr.dyade.aaa.agent.conf.A3CMLCluster
All Implemented Interfaces:
java.io.Serializable

public class A3CMLCluster
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Field Summary
 java.lang.String jvmArgs
           
 java.lang.String name
           
 java.util.Hashtable properties
           
private static long serialVersionUID
          define serialVersionUID for interoperability
 java.util.Hashtable servers
           
 short sid
           
 
Constructor Summary
A3CMLCluster(short sid, java.lang.String name)
           
 
Method Summary
 A3CMLProperty addProperty(A3CMLProperty prop)
          add property
 void addServer(A3CMLServer server)
          Adds a server.
 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)
           
 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.
 int hashCode()
           
 A3CMLProperty removeProperty(java.lang.String name)
          remove property
 A3CMLServer removeServer(short sid)
          Removes a server.
 A3CMLServer removeServer(java.lang.String name)
          Remove a server.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
define serialVersionUID for interoperability

See Also:
Constant Field Values

sid

public short sid

name

public java.lang.String name

jvmArgs

public java.lang.String jvmArgs

servers

public java.util.Hashtable servers

properties

public java.util.Hashtable properties
Constructor Detail

A3CMLCluster

public A3CMLCluster(short sid,
                    java.lang.String name)
             throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

addServer

public final void addServer(A3CMLServer server)
                     throws DuplicateServerException
Adds a server.

Parameters:
server - The description of added server.
Throws:
DuplicateServerException - If the server already exist.

removeServer

public final A3CMLServer removeServer(short sid)
                               throws UnknownServerException
Removes a server.

Parameters:
sid - The unique server identifier.
Returns:
The server description if exists.
Throws:
UnknownServerException - If the server does not exist.

removeServer

public final A3CMLServer removeServer(java.lang.String name)
                               throws UnknownServerException
Remove a server.

Parameters:
name - The server name.
Returns:
The server description if exists.
Throws:
UnknownServerException - If the server does not exist.

containsServer

public final boolean containsServer(short sid)
Returns true if the configuration contains a server with specified id.

Parameters:
sid - server id
Returns:
true if contain sid; false otherwise.

getServerIdByName

public short getServerIdByName(java.lang.String name)
                        throws UnknownServerException
Gets a server identifier from its name.

Parameters:
name - The server name.
Returns:
The server identifier.
Throws:
UnknownServerException - If the server does not exist.

containsServer

public final boolean containsServer(java.lang.String name)
Returns true if the configuration contains a server with specified name.

Parameters:
name - server name
Returns:
true if contain name; false otherwise.

getServer

public final A3CMLServer getServer(short sid)
                            throws UnknownServerException
Returns the description of a server.

Parameters:
name - The server identifier.
Returns:
The server description if exist.
Throws:
UnknownServerException - If the server does not exist.

getServer

public final A3CMLServer getServer(java.lang.String name)
                            throws UnknownServerException
Returns the description of a server.

Parameters:
name - The server name.
Returns:
The server description if exist.
Throws:
UnknownServerException - If the server does not exist.

addProperty

public final A3CMLProperty addProperty(A3CMLProperty prop)
                                throws java.lang.Exception
add property

Parameters:
prop - A3CMLProperty
Returns:
the previous value of the specified prop.name in this hashtable, or null if it did not have one.
Throws:
java.lang.Exception

removeProperty

public final A3CMLProperty removeProperty(java.lang.String name)
remove property

Parameters:
name - property name
Returns:
the value to which the name had been mapped in this hashtable, or null if the name did not have a mapping.

containsProperty

public final boolean containsProperty(java.lang.String name)
contains property

Parameters:
name - property name
Returns:
true if contain name; false otherwise.

getProperty

public final A3CMLProperty getProperty(java.lang.String name)
Returns the specified property.


getJvmArgs

public final java.lang.String getJvmArgs(short sid)
                                  throws UnknownServerException
Get the JVM argument for a particular agent server identified by its id.

Parameters:
id - agent server identifier.
Returns:
the arguments as declared in configuration file
Throws:
UnknownServerException - The specified server does not exist.

getJvmArgs

public final java.lang.String getJvmArgs(java.lang.String name)
                                  throws UnknownServerException
Get the JVM argument for a particular agent server identified by its name.

Parameters:
name - agent server name.
Returns:
the arguments as declared in configuration file
Throws:
UnknownServerException - The specified server does not exist.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object


Copyright © 2010 ScalAgent D.T.. All Rights Reserved.