com.esri.arcgis.server
Class ServerCluster

java.lang.Object
  extended by com.esri.arcgis.server.ServerCluster

public class ServerCluster
extends Object

The ServerCluster class represents the clustering of SOMs available using the ClusterType {FAIL_OVER|ROUND_ROBIN|NONE}.


Nested Class Summary
protected  class ServerCluster.ServerInfo
          ServerInfo class represents the server available for clustering.
 
Constructor Summary
ServerCluster(Collection availableResources, ServerClusterType clusterType)
          Initializes the ServerCluster class using the specified resource collection and cluster type.
ServerCluster(Collection availableResources, ServerClusterType clusterType, int failRecheckValue)
          Initializes the ServerCluster class using the specified resource collection, cluster type and failRecheckCount.
ServerCluster(Collection availableResources, ServerClusterType clusterType, String serverObjectName, String serverObjectType)
          Initializes the ServerCluster class using the specified resource collection, cluster type, serverObjectName, serverObjectType.
ServerCluster(Collection availableResources, ServerClusterType clusterType, String serverObjectName, String serverObjectType, int failRecheckValue, String domain, String userName, String password)
          Initializes the ServerCluster class using the specified resource collection, cluster type, serverObjectName, serverObjectType and failRecheckCount.
ServerCluster(Collection availableResources, ServerClusterType clusterType, String serverObjectName, String serverObjectType, String domain, String userName, String password)
          Initializes the ServerCluster class using the specified resource collection, cluster type, serverObjectName, serverObjectType and user credentials.
 
Method Summary
 void addSOM(String machineName)
          Adds a Server to the list available for clustering.
 String getCurrentHost()
          Returns the current host name.
 IServerObjectManager getNextSOM()
          Returns the IServerObjectManager object from the server.
 ServerClusterType getServerClusterType()
          Returns the ServerClusterType used for clustering.
 ServerConnection getServerConnection()
          Returns the ServerConnection object.
 String getUserDomain()
           
 String getUserName()
           
 boolean hasServers()
          Returns if Servers are available for clustering.
 String listSOMsAsString()
          Returns the server list particapiting in the cluster as String.
 void removeSOM(String machineName)
          Remove a Server from the list available for clustering.
 void setCredentials(String domain, String userName, String password)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServerCluster

public ServerCluster(Collection availableResources,
                     ServerClusterType clusterType)
Initializes the ServerCluster class using the specified resource collection and cluster type.

Parameters:
availableResources - the resource collection
clusterType - the cluster ServerClusterType used

ServerCluster

public ServerCluster(Collection availableResources,
                     ServerClusterType clusterType,
                     String serverObjectName,
                     String serverObjectType)
Initializes the ServerCluster class using the specified resource collection, cluster type, serverObjectName, serverObjectType.

Parameters:
availableResources - the resource collection
clusterType - the cluster ServerClusterType used
serverObjectName - -the ServerObject configuartion Name, if present checks if this ServerObjectName is present in the SOM
serverObjectType - -the ServerObject configuartion Type, if present checks if this serverObjectType is present in the SOM

ServerCluster

public ServerCluster(Collection availableResources,
                     ServerClusterType clusterType,
                     String serverObjectName,
                     String serverObjectType,
                     String domain,
                     String userName,
                     String password)
Initializes the ServerCluster class using the specified resource collection, cluster type, serverObjectName, serverObjectType and user credentials.

Parameters:
availableResources - the resource collection
clusterType - the cluster ServerClusterType used
serverObjectName - -the ServerObject configuartion Name, if present checks if this ServerObjectName is present in the SOM
serverObjectType - -the ServerObject configuartion Type, if present checks if this serverObjectType is present in the SOM
domain - the domain of the user to impersonate
userName - the name of the user to impersonate
password - the password of the user to impersonate

ServerCluster

public ServerCluster(Collection availableResources,
                     ServerClusterType clusterType,
                     int failRecheckValue)
Initializes the ServerCluster class using the specified resource collection, cluster type and failRecheckCount.

Parameters:
availableResources - the resource collection
clusterType - the cluster ServerClusterType used
failRecheckValue - the fail Recheck value used for checking if the server is alive after n bypass rounds { default is -1, there will be no checking till all the SOM's particapating in the cluster are failed}.

ServerCluster

public ServerCluster(Collection availableResources,
                     ServerClusterType clusterType,
                     String serverObjectName,
                     String serverObjectType,
                     int failRecheckValue,
                     String domain,
                     String userName,
                     String password)
Initializes the ServerCluster class using the specified resource collection, cluster type, serverObjectName, serverObjectType and failRecheckCount.

Parameters:
availableResources - the resource collection
clusterType - the cluster ServerClusterType used
serverObjectName - -the ServerObject configuartion Name, if present checks if this ServerObjectName is present in the SOM
serverObjectType - -the ServerObject configuartion Type, if present checks if this serverObjectType is present in the SOM
failRecheckValue - the fail Recheck value used for checking if the server is alive after n bypass rounds { default is -1, there will be no checking till all the SOM's particapating in the cluster are failed}.
domain - the domain of the user to impersonate
userName - the name of the user to impersonate
password - the password of the user to impersonate
Method Detail

getNextSOM

public IServerObjectManager getNextSOM()
                                throws SOMNotAvailableException
Returns the IServerObjectManager object from the server. If ServerObjectName & ServerObjectType is passed in creating the servercluste, then checks if this ServerObjectName & ServerObjectType is present in this SOM, else it marks this SOM as not useful and checks in the next avaialble SOM

Returns:
IServerObjectManager- the IServerObjectMananger object
Throws:
SOMNotAvailableException

hasServers

public boolean hasServers()
Returns if Servers are available for clustering.

Returns:
boolean- if true, servers are present.

getCurrentHost

public String getCurrentHost()
Returns the current host name.

Returns:
String

getServerConnection

public ServerConnection getServerConnection()
Returns the ServerConnection object.

Returns:
ServerConnection

removeSOM

public void removeSOM(String machineName)
Remove a Server from the list available for clustering.

Parameters:
machineName - as String

addSOM

public void addSOM(String machineName)
Adds a Server to the list available for clustering.

Parameters:
machineName - as String

getServerClusterType

public ServerClusterType getServerClusterType()
Returns the ServerClusterType used for clustering.

Returns:
ServerClusterType- the ServerClusterType

listSOMsAsString

public String listSOMsAsString()
Returns the server list particapiting in the cluster as String.

Returns:
String- the server list particapiting in the cluster as String

setCredentials

public void setCredentials(String domain,
                           String userName,
                           String password)

getUserDomain

public String getUserDomain()

getUserName

public String getUserName()