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

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

public class VirtualServer
extends Object

Implements a proxy for a Site's virtual server.


Field Summary
static int ACCESS_PRIVATE
           
static int ACCESS_PUBLIC
           
 
Constructor Summary
VirtualServer()
          Constructs a new VirtualServer object.
 
Method Summary
 void addContainer(String containerName, int threads)
          Adds a new containers with the given number of threads to this virtual server.
 boolean addVirtualServer(ConnectionProxy connection)
          Adds a VirtualServer to the site that is represented by this object.
 void changeContainer(String containerName, int threads)
          Changes a container threadcount for this virtual server.
 boolean changeVirtualServer(ConnectionProxy connection)
          Changes the VirtualServer on the site that is represented by this object.
 int getAccess()
          Returns the access of an ArcIMS virtual server.
static int getAccessInt(String access)
          Returns the integer representing the specified access string.
 String getAccessString()
          Returns the access of an ArcIMS virtual server as a String.
 Set getContainerSet()
          Returns a set of all of the containers contained in this VirtualServer.
 String getDescription()
          Returns the current description of this virtual server.
 String getName()
          Returns the name of the virtual server.
 String getRecyclingFrequency()
          Returns the recycling frequency of a virtual server.
 String getRecyclingHour()
          Returns the recycling hour of a virtual server.
 String getRecyclingMinute()
          Returns the recycling minute of a virtual server.
 int getThreadsForContainer(String containerID)
          Returns the current number of threads associated with a given container.
 String getType()
          Returns the type of virtual server.
 String getVersion()
          Returns the version of an image server.
static VirtualServer getVirtualServer(String name, ConnectionProxy connection)
          Given the ConnectionProxy, this method returns the specified VirtualServer object that represents the VirtualServer in the site AppServer.
 void removeContainer(String containerID)
          Removes the threads for a given container.
 boolean removeVirtualServer(ConnectionProxy connection)
          Removes the VirtualServer on the site that is represented by this object.
 void setAccess(int access)
          Sets the access of an ArcIMS virtual server.
 void setDescription(String desc)
          Sets the description of the virtual server.
 void setName(String name)
          Sets the name of this VirtualServer.
 void setRecyclingFrequency(String recyclingFrequency)
          Sets the recycling frequency of the virtual server represented by this object.
 void setRecyclingHour(String recyclingHour)
          Sets the recycling hour of the virtual server represented by this object.
 void setRecyclingMinute(String recyclingMinute)
          Sets the recycling minute of the virtual server represented by this object.
 void setType(String serverType)
          Sets the type of virtual server.
 void setVersion(String version)
          Sets the version of the virtual server represented by this object.
 String toString()
          Overwrites Object.toString().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ACCESS_PUBLIC

public static final int ACCESS_PUBLIC
See Also:
Constant Field Values

ACCESS_PRIVATE

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

VirtualServer

public VirtualServer()
Constructs a new VirtualServer object.

Method Detail

getVirtualServer

public static VirtualServer getVirtualServer(String name,
                                             ConnectionProxy connection)
                                      throws ConnectionParameterException,
                                             AuthenticationException,
                                             com.esri.aims.mtier.io.http.UnableToPingEsrimapException,
                                             com.esri.aims.mtier.model.axl.ErrorAndWarningException,
                                             SAXException
Given the ConnectionProxy, this method returns the specified VirtualServer object that represents the VirtualServer in the site AppServer.

Parameters:
name - The name of the VirtualServer to get.
connection - The ConnnectionProxy for a specific ArcIMS site.
Returns:
VirtualServer A VirtualServer representing a VirtualServer in the AppServer of the site defined in the connection object.
Throws:
ConnectionParameterException
AuthenticationException
com.esri.aims.mtier.io.http.UnableToPingEsrimapException
com.esri.aims.mtier.model.axl.ErrorAndWarningException
SAXException
See Also:
VirtualServerCollection.getVirtualServers(ConnectionProxy)

getName

public String getName()
Returns the name of the virtual server.


setName

public void setName(String name)
Sets the name of this VirtualServer.


setType

public void setType(String serverType)
Sets the type of virtual server.

Parameters:
serverType - The type of virtual server to set this to.

getType

public String getType()
Returns the type of virtual server.

Returns:
int The type of this virtual server.

setVersion

public void setVersion(String version)
Sets the version of the virtual server represented by this object.

Parameters:
version - The version of the virtual server.

getVersion

public String getVersion()
Returns the version of an image server.

Returns:
String The version of the virtual server.

setRecyclingHour

public void setRecyclingHour(String recyclingHour)
Sets the recycling hour of the virtual server represented by this object.

Parameters:
recyclingHour - The recycling hour of the virtual server.

getRecyclingHour

public String getRecyclingHour()
Returns the recycling hour of a virtual server.

Returns:
String The recycling hour of the virtual server.

setRecyclingMinute

public void setRecyclingMinute(String recyclingMinute)
Sets the recycling minute of the virtual server represented by this object.

Parameters:
recyclingMinute - The recycling minute of the virtual server.

getRecyclingMinute

public String getRecyclingMinute()
Returns the recycling minute of a virtual server.

Returns:
String The recycling minute of the virtual server.

setRecyclingFrequency

public void setRecyclingFrequency(String recyclingFrequency)
Sets the recycling frequency of the virtual server represented by this object.

Parameters:
recyclingFrequency - The recycling frequency of the virtual server.

getRecyclingFrequency

public String getRecyclingFrequency()
Returns the recycling frequency of a virtual server.

Returns:
String The recycling frequency of the virtual server.

setAccess

public void setAccess(int access)
Sets the access of an ArcIMS virtual server. NOTE: As of version 4.0, you cannot set access through the client. Thus, this method has private access.

Parameters:
access - The access level to set the virtual server at. These values are defined as static integers in this class.

getAccess

public int getAccess()
Returns the access of an ArcIMS virtual server.

Returns:
int The access level the virtual server is set at. These values are defined as static integers in this class.

getAccessString

public String getAccessString()
Returns the access of an ArcIMS virtual server as a String.

Returns:
String The access level the virtual server is set at as a String.

setDescription

public void setDescription(String desc)
Sets the description of the virtual server.

Parameters:
desc - The new description of this virtual server.

getDescription

public String getDescription()
Returns the current description of this virtual server.

Returns:
String The description of the virtual server.

addContainer

public void addContainer(String containerName,
                         int threads)
Adds a new containers with the given number of threads to this virtual server.

Parameters:
containerName - The name of the container to add.
threads - The number of threads to add to this virtual server.

changeContainer

public void changeContainer(String containerName,
                            int threads)
Changes a container threadcount for this virtual server.

Parameters:
containerName - The name of the container to change.
threads - The number of threads to set for this virtual server.

getThreadsForContainer

public int getThreadsForContainer(String containerID)
Returns the current number of threads associated with a given container. If the container is not used, then the return value will be -1. If the container is turned off within this VirtualServer, then the return value will be 0.

Parameters:
containerID - The ID of the container to check the threads for.
Returns:
int The number of threads running on this container.

removeContainer

public void removeContainer(String containerID)
Removes the threads for a given container.

Parameters:
containerID - The ID of the container that should be removed.

getContainerSet

public Set getContainerSet()
Returns a set of all of the containers contained in this VirtualServer.


addVirtualServer

public boolean addVirtualServer(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 VirtualServer to the site that is represented by this object.

Parameters:
connection - The ConnectionProxy configured to connect to a particular machine.
Returns:
boolean True for success, false for failure.
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

changeVirtualServer

public boolean changeVirtualServer(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
Changes the VirtualServer on the site that is represented by this object.

Parameters:
connection - The ConnectionProxy configured to connect to a particular machine.
Returns:
boolean True for success, false for failure.
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

removeVirtualServer

public boolean removeVirtualServer(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 the VirtualServer on the site that is represented by this object.

Parameters:
connection - The ConnectionProxy configured to connect to a particular machine.
Returns:
boolean True for success, false for failure.
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

getAccessInt

public static int getAccessInt(String access)
Returns the integer representing the specified access string. If the access string is invalid, then -1 is returned.

Parameters:
access - The String representing the access type (Example: "public").
Returns:
int The static integer representing this access or -1 if the string is invalid.

toString

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

Overrides:
toString in class Object