com.esri.aims.mtier.model.admin
Class Server

java.lang.Object
  extended by com.esri.aims.mtier.model.admin.Server

public class Server
extends Object

Implements a proxy object for a site Monitor.


Field Summary
static int ALL_ACCESS
           
static int COMPONENT_ACCESS
           
static int COMPONENT_ALLOWED
           
static int COMPONENT_THREADS
           
static int PRIVATE_ACCESS
           
static int PUBLIC_ACCESS
           
 
Constructor Summary
Server()
          Constructs a new Server object.
 
Method Summary
 void addComponent(String containerID, String vsType, String version, String access, String runningThreads, String allowed)
          Adds a component for this container.
 boolean addContainer(ConnectionProxy connection)
          Adds a container to this ArcIMS Monitor.
 void addContainerID(String id)
          Adds the container with given ID to the list of containers associated with this object.
 void addVirtualServerType(String type, String version, String access)
          Adds a new type of VirtualServer to this object.
 boolean containsVirtualServerType(String type, String version)
          Returns true if the defined VirtualServer type and version exist on this server.
 String getContainerAttribute(int attribute, String containerID, String vsType, String version)
          Retrieve an attribute for this container based on the type of virtual server.
 int getContainerCount()
          Returns the number of containers associated with this monitor.
 String[] getContainerIDs()
          Returns a list of the container names.
 String getName()
          Returns the name of this Server.
static Server getServer(String monitorName, ConnectionProxy connection)
          Returns a Server for the given monitorName and ConnnectionProxy.
 String getVirtualServerAccess(String type, String version)
          Returns the access level for a VirtualServer.
 String[] getVirtualServerTypes()
          Returns the VirtualServer types associated with this object.
 String[] getVirtualServerTypesOfAccess(int access)
          Returns VirtualServer types for a given access.
 boolean removeContainer(String id, ConnectionProxy connection)
          Removes a container with given identifier from this ArcIMS Monitor.
 void removeContainerID(String id)
          Removes a container with given ID from the list of containers associated with this object.
 void removeVirtualServerType(String type, String version)
          Removes a new VirtualServer type to this object.
 void setName(String name)
          Sets the name of the Server with given string.
 String toString()
          Overwrites Object.toString().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PUBLIC_ACCESS

public static final int PUBLIC_ACCESS
See Also:
Constant Field Values

PRIVATE_ACCESS

public static final int PRIVATE_ACCESS
See Also:
Constant Field Values

ALL_ACCESS

public static final int ALL_ACCESS
See Also:
Constant Field Values

COMPONENT_ACCESS

public static final int COMPONENT_ACCESS
See Also:
Constant Field Values

COMPONENT_THREADS

public static final int COMPONENT_THREADS
See Also:
Constant Field Values

COMPONENT_ALLOWED

public static final int COMPONENT_ALLOWED
See Also:
Constant Field Values
Constructor Detail

Server

public Server()
Constructs a new Server object.

Method Detail

getServer

public static Server getServer(String monitorName,
                               ConnectionProxy connection)
                        throws ConnectionParameterException,
                               AuthenticationException,
                               com.esri.aims.mtier.io.http.UnableToPingEsrimapException,
                               com.esri.aims.mtier.model.axl.AXLAttributeException,
                               com.esri.aims.mtier.model.axl.ErrorAndWarningException,
                               SAXException
Returns a Server for the given monitorName and ConnnectionProxy.

Parameters:
monitorName - the name of the Monitor
connection - the ConnectionProxy object
Throws:
ConnectionParameterException, - when the parameters used to initialize a MetadataConnectionProxy contain errors.
AuthenticationException, - when the ConnectionProxy cannot validate the user and/or the password supplied.
UnableToPingEsrimapException, - when trying to construct a BaseEsrimap and the code is unable to ping the ESRIMAP.
AXLAttributeException, - when an error occurs during reading or writing an AXL attribute.
ConnectionParameterException
AuthenticationException
com.esri.aims.mtier.io.http.UnableToPingEsrimapException
com.esri.aims.mtier.model.axl.AXLAttributeException
com.esri.aims.mtier.model.axl.ErrorAndWarningException
SAXException

setName

public void setName(String name)
Sets the name of the Server with given string.


getName

public String getName()
Returns the name of this Server.


addContainer

public boolean addContainer(ConnectionProxy connection)
                     throws ConnectionParameterException,
                            AuthenticationException,
                            com.esri.aims.mtier.io.http.UnableToPingEsrimapException,
                            com.esri.aims.mtier.model.axl.AXLAttributeException,
                            com.esri.aims.mtier.model.axl.ErrorAndWarningException,
                            SAXException
Adds a container to this ArcIMS Monitor.

Parameters:
connection - the ConnectionProxy object.
Throws:
ConnectionParameterException, - when the parameters used to initialize a MetadataConnectionProxy contain errors.
AuthenticationException, - when the ConnectionProxy cannot validate the user and/or the password supplied.
UnableToPingEsrimapException, - when trying to construct a BaseEsrimap and the code is unable to ping the ESRIMAP.
AXLAttributeException, - when an error occurs during reading or writing an AXL attribute.
ErrorAndWarningException, - when an ERROR or WARNING response is received.
ConnectionParameterException
AuthenticationException
com.esri.aims.mtier.io.http.UnableToPingEsrimapException
com.esri.aims.mtier.model.axl.AXLAttributeException
com.esri.aims.mtier.model.axl.ErrorAndWarningException
SAXException

removeContainer

public boolean removeContainer(String id,
                               ConnectionProxy connection)
                        throws ConnectionParameterException,
                               AuthenticationException,
                               com.esri.aims.mtier.io.http.UnableToPingEsrimapException,
                               com.esri.aims.mtier.model.axl.AXLAttributeException,
                               com.esri.aims.mtier.model.axl.ErrorAndWarningException,
                               SAXException
Removes a container with given identifier from this ArcIMS Monitor.

Parameters:
connection - the ConnectionProxy object.
id - the identifier of the Container to be removed.
Throws:
ConnectionParameterException, - when the parameters used to initialize a MetadataConnectionProxy contain errors.
AuthenticationException, - when the ConnectionProxy cannot validate the user and/or the password supplied.
UnableToPingEsrimapException, - when trying to construct a BaseEsrimap and the code is unable to ping the ESRIMAP.
AXLAttributeException, - when an error occurs during reading or writing an AXL attribute.
ErrorAndWarningException, - when an ERROR or WARNING response is received.
ConnectionParameterException
AuthenticationException
com.esri.aims.mtier.io.http.UnableToPingEsrimapException
com.esri.aims.mtier.model.axl.AXLAttributeException
com.esri.aims.mtier.model.axl.ErrorAndWarningException
SAXException

getContainerCount

public int getContainerCount()
Returns the number of containers associated with this monitor.


getContainerIDs

public String[] getContainerIDs()
Returns a list of the container names.


addContainerID

public void addContainerID(String id)
Adds the container with given ID to the list of containers associated with this object. NOTE: This method does not add a new container to the server that this object represents, but just adds it to the list maintained by this object. To add a server to this container use the addContainer method.
Use of this method may misrepresent the current state of the Server. Use it with caution.

Parameters:
id - the identifier of the container that is to be added to the internal list of this server.
See Also:
addContainer(com.esri.aims.mtier.io.ConnectionProxy)

removeContainerID

public void removeContainerID(String id)
Removes a container with given ID from the list of containers associated with this object. NOTE: This method does not remove a container from the server that this object represents, but just modifies the list maintained by it. To remove a container from this server use the removeContainer method.
Use of this method may misrepresent the current state of the Server. Use it with caution.

Parameters:
id - the identifier of the container that needs to be removed from the internal list of this server.
See Also:
removeContainer(java.lang.String, com.esri.aims.mtier.io.ConnectionProxy)

addComponent

public void addComponent(String containerID,
                         String vsType,
                         String version,
                         String access,
                         String runningThreads,
                         String allowed)
Adds a component for this container.

Parameters:
containerID - the id of the container
vsType - the virtual server type string.
version - the version associated with the virtual server type.
access - the type of access for this virtual server type.
runningThreads - how many threads of this type are running on the container.
allowed - whether or not more instances of this type are allowed in the container.

getContainerAttribute

public String getContainerAttribute(int attribute,
                                    String containerID,
                                    String vsType,
                                    String version)
Retrieve an attribute for this container based on the type of virtual server.

Parameters:
attribute - the attribute to retrieve (COMPONENT_ALLOWED, COMPONENT_THREADS, COMPONENT_ACCESS).
containerID - the id of the container
vsType - the virtual server type string.
version - the version associated with the virtual server type.

addVirtualServerType

public void addVirtualServerType(String type,
                                 String version,
                                 String access)
Adds a new type of VirtualServer to this object. NOTE: This method does not add a new type to the server that this object represents, but rather just to this object.
Use of this method may misrepresent the current state of the Server. Use it with caution.

Parameters:
type - the VirtualServer type (example: "ImageServer")
version - the version of this VirtualServer type (example: "ArcMap")
access - the access level of this type.

removeVirtualServerType

public void removeVirtualServerType(String type,
                                    String version)
Removes a new VirtualServer type to this object. NOTE: This method does not remove type to the server that this object represents, but rather just to this object.
Use of this method may misrepresent the current state of the Server. Use it with caution.

Parameters:
type - The VirtualServer type (e.g. "ImageServer")
version - The version of this VirtualServer type (e.g. "ArcMap")

containsVirtualServerType

public boolean containsVirtualServerType(String type,
                                         String version)
Returns true if the defined VirtualServer type and version exist on this server. NOTE: If altered after the Server was created from the corresponding request, there is no guarantee that such a server type exists on the actual server.

Parameters:
type - The VirtualServer type (e.g. "ImageServer")
version - The version of this VirtualServer type (e.g. "ArcMap")

getVirtualServerTypes

public String[] getVirtualServerTypes()
Returns the VirtualServer types associated with this object. Values are returned as Strings of the form type,version. An example would be ImageServer,ArcMap. Has the same effect as calling getVirtualServerTypesOfAccess(ALL_ACCESS).


getVirtualServerTypesOfAccess

public String[] getVirtualServerTypesOfAccess(int access)
Returns VirtualServer types for a given access. Access values are defined by the constants PUBLIC_ACCESS, PRIVATE_ACCESS, and ALL_ACCESS in this class. Values are returned as in getVirtualServerTypes().

See Also:
PUBLIC_ACCESS, PRIVATE_ACCESS, ALL_ACCESS, getVirtualServerTypes()

getVirtualServerAccess

public String getVirtualServerAccess(String type,
                                     String version)
Returns the access level for a VirtualServer.


toString

public String toString()
Overwrites Object.toString().

Overrides:
toString in class Object