|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.esri.adf.web.ags.data.AGSLocalConnection
public class AGSLocalConnection
An ArcGIS server resource. It can be of type MapServer or GeocodeServer. This class establishes a connection to the server, holds on to the server parameters and can activate() and passivate() the connections as required. It also provides convenience methods to create server objects within the server context as well as methods to save and load objects to and from their XML representations.
Field Summary | |
---|---|
protected com.esri.arcgis.server.ServerCluster |
cluster
Deprecated. As of ArcGIS Java Server 9.3, instead use cluster2 |
protected com.esri.arcgis.server.ServerCluster2 |
cluster2
|
protected String |
configTypeName
The config type of this resource. |
protected com.esri.arcgis.server.ServerConnection |
connection
The IServerConnection object. |
protected String |
currentHost
The name of the machine which hosts the ArcGIS server. |
static String |
FAIL_OVER
The fail-over cluster type. |
protected int |
failRecheckValue
|
protected List<String> |
hosts
|
protected boolean |
init
|
protected com.esri.arcgis.server.IServerObjectManager |
manager
The server object manager |
static String |
NONE_CLUSTER_TYPE
No cluster type supported. |
protected boolean |
pooled
Indicates whether the associated server object is pooled or not. |
static String |
ROUND_ROBIN
The round-robin cluster type. |
protected com.esri.arcgis.server.ServerClusterType |
serverClusterType
|
protected com.esri.arcgis.server.IServerContext |
serverContext
The IServerContext of this resource |
protected com.esri.arcgis.server.IServerObject |
serverObject
The IServerObject running within this context |
protected String |
serverObjectName
The name by which the server object in question can be accessed on the server. |
protected AGSUser |
user
|
Constructor Summary | |
---|---|
AGSLocalConnection()
|
|
AGSLocalConnection(String serverObjectName,
List<String> hosts,
String configTypeName,
String clusterType,
AGSUser user)
|
Method Summary | |
---|---|
void |
activateResource()
|
void |
addHost(String host)
|
Object |
createArcObject(String progId)
Creates an ArcObject with this progId in the current server context. |
boolean |
equals(String resource)
Determines whether the resource string represents this AGSLocalConnection. |
String |
getClusterType()
|
String |
getConfigTypeName()
|
String |
getCurrentHost()
|
int |
getFailRecheckValue()
Return the fail recheck value. |
List<String> |
getHosts()
|
com.esri.arcgis.server.ServerConnection |
getServerConnection()
Returns the ServerConnection object from the server. |
com.esri.arcgis.server.IServerContext |
getServerContext()
Returns the IServerContext object from the server. |
com.esri.arcgis.server.IServerObject |
getServerObject()
Returns the IServerObject from the server. |
com.esri.arcgis.server.IServerObjectManager |
getServerObjectManager()
Returns the IServerObjectManager object from the server. |
String |
getServerObjectName()
|
AGSUser |
getUser()
|
void |
initResource()
|
boolean |
isPooled()
Returns an indicator of whether the server object is pooled or not. |
Object |
loadObject(String xml)
Deserializes the string to a server object by calling the loadObject method on the ServerContext . |
void |
passivateResource()
|
String |
peek()
|
void |
readExternal(ObjectInput in)
|
String |
saveObject(Object persistObj)
Serializes a server object to a String. |
void |
setClusterType(String clusterType)
|
void |
setConfigTypeName(String configTypeName)
|
void |
setFailRecheckValue(int value)
Sets the fail recheck value, used for checking if the server is alive after n minutes. |
void |
setHosts(List<String> hosts)
|
void |
setServerObjectName(String serverObjectName)
|
void |
setUser(AGSUser user)
|
void |
writeExternal(ObjectOutput out)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String NONE_CLUSTER_TYPE
public static final String FAIL_OVER
public static final String ROUND_ROBIN
protected transient com.esri.arcgis.server.ServerConnection connection
protected transient com.esri.arcgis.server.IServerObject serverObject
protected transient com.esri.arcgis.server.IServerContext serverContext
protected transient com.esri.arcgis.server.IServerObjectManager manager
protected boolean pooled
protected String serverObjectName
protected String currentHost
protected String configTypeName
@Deprecated protected transient com.esri.arcgis.server.ServerCluster cluster
cluster2
protected transient com.esri.arcgis.server.ServerCluster2 cluster2
protected transient com.esri.arcgis.server.ServerClusterType serverClusterType
protected int failRecheckValue
protected boolean init
protected List<String> hosts
protected AGSUser user
Constructor Detail |
---|
public AGSLocalConnection()
public AGSLocalConnection(String serverObjectName, List<String> hosts, String configTypeName, String clusterType, AGSUser user)
Method Detail |
---|
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public void initResource()
public String peek()
public void activateResource()
public void passivateResource()
public Object createArcObject(String progId)
progId
- the class id
Object
- the ArcObject represented by this progIdpublic String saveObject(Object persistObj)
persistObj
- the object to store
String
- a string representation of the objectpublic Object loadObject(String xml)
ServerContext
.
xml
- the string representation of the server object
Object
- the loaded Objectpublic boolean equals(String resource)
resource
- the resource string
public com.esri.arcgis.server.IServerObject getServerObject()
IServerObject
from the server.
IServerObject
- the IServerObjectpublic com.esri.arcgis.server.ServerConnection getServerConnection()
ServerConnection
object from the server.
ServerConnection
- the ServerConnection objectpublic com.esri.arcgis.server.IServerContext getServerContext()
IServerContext
object from the server.
IServerContext
- the IServerContext objectpublic com.esri.arcgis.server.IServerObjectManager getServerObjectManager()
IServerObjectManager
object from the server.
IServerObjectManager
- the IServerObjectMananger objectpublic String getServerObjectName()
public List<String> getHosts()
public String getConfigTypeName()
public String getClusterType()
public AGSUser getUser()
public boolean isPooled()
public String getCurrentHost()
public int getFailRecheckValue()
public void addHost(String host)
public void setServerObjectName(String serverObjectName)
public void setHosts(List<String> hosts)
public void setConfigTypeName(String configTypeName)
public void setClusterType(String clusterType)
public void setFailRecheckValue(int value)
value
- the fail recheck valuepublic void setUser(AGSUser user)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |