com.esri.arcgis.gisclient
Class AGSServerConnectionFactory

java.lang.Object
  extended bycom.esri.arcgis.gisclient.AGSServerConnectionFactory
All Implemented Interfaces:
IAGSServerConnectionFactory, IAGSServerConnectionFactory2, java.io.Serializable

public class AGSServerConnectionFactory
extends java.lang.Object
implements IAGSServerConnectionFactory, IAGSServerConnectionFactory2

A factory object for ArcGIS Server Connections.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Remarks

An AGSServerConnectionFactory is a dispenser of AGSServerConnection objects and allows a client to connect to an ArcGIS Server either directly over a LAN or indirectly to a web service catalog specified. An AGSServerConnection represents a GIS server or web service catalog that containe one of more server objects. Types of server object are MapServer and GeocodeServer. An AGSServerConnectionFactory maintains a pool of currently connected, active connections that are being referenced by the application. Connection properties are specified using a PropertySet object and can be saved to a connection file.

See Also:
AGSServerConnection, GISServerConnection, Serialized Form

Constructor Summary
AGSServerConnectionFactory()
          Constructs a AGSServerConnectionFactory using ArcGIS Engine.
AGSServerConnectionFactory(java.lang.Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
 
Method Summary
 boolean equals(java.lang.Object o)
          Compare this object with another
 IAGSServerConnectionFactory getAsIAGSServerConnectionFactory()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 IAGSServerConnectionFactory2 getAsIAGSServerConnectionFactory2()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
static java.lang.String getClsid()
           
 int getDefaultHttpTimeout()
          The default timeout for http requests to the server (in seconds).
 int hashCode()
          the hashcode for this object
 IAGSServerConnection open(IPropertySet pConnectionProperties, int hWnd)
          Opens the GIS server connection specified by the connection properties.
 IAGSServerConnection openFromFile(java.lang.String fileName, int hWnd)
          Opens the server connection specified by the given file name.
 IPropertySet readConnectionPropertiesFromFile(java.lang.String fileName)
          The connection properties from the specified file.
 void setDefaultHttpTimeout(int seconds)
          The default timeout for http requests to the server (in seconds).
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AGSServerConnectionFactory

public AGSServerConnectionFactory()
                           throws java.io.IOException,
                                  java.net.UnknownHostException
Constructs a AGSServerConnectionFactory using ArcGIS Engine.

Throws:
java.io.IOException - if there are interop problems
java.net.UnknownHostException - if there are interop problems

AGSServerConnectionFactory

public AGSServerConnectionFactory(java.lang.Object obj)
                           throws java.io.IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.

Construct a AGSServerConnectionFactory using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to AGSServerConnectionFactory.
AGSServerConnectionFactory theAGSServerConnectionFactory = (AGSServerConnectionFactory) obj;

Parameters:
obj - an object returned from ArcGIS Engine or Server
Throws:
java.io.IOException - if there are interop problems
Method Detail

getClsid

public static java.lang.String getClsid()

getAsIAGSServerConnectionFactory

public IAGSServerConnectionFactory getAsIAGSServerConnectionFactory()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.


getAsIAGSServerConnectionFactory2

public IAGSServerConnectionFactory2 getAsIAGSServerConnectionFactory2()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.


equals

public boolean equals(java.lang.Object o)
Compare this object with another


hashCode

public int hashCode()
the hashcode for this object


open

public IAGSServerConnection open(IPropertySet pConnectionProperties,
                                 int hWnd)
                          throws java.io.IOException,
                                 AutomationException
Description copied from interface: IAGSServerConnectionFactory
Opens the GIS server connection specified by the connection properties.

Supported Platforms

Windows, Solaris, Linux

Remarks

Use the Open method to create an AGSServerConnection based on a property set. The properties required in the property set depend on whether you are connecting directly to a GIS server over a LAN, or if you are connecting to a web service catalog. When connecting to a GIS server over the LAN, you need to set the machine property to be the name of the GIS server machine. When connecting to a web service catalog, you need to set the url property to the url of the web service catalog.

If the web service catalog you are connecting to is secure and requires a username and password, include them in the property set as the user and password properties, respectivly.

Specified by:
open in interface IAGSServerConnectionFactory
Parameters:
pConnectionProperties - A reference to a com.esri.arcgis.system.IPropertySet (in)
hWnd - The hWnd (A COM typedef) (in)
Returns:
A reference to a com.esri.arcgis.gisclient.IAGSServerConnection
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

openFromFile

public IAGSServerConnection openFromFile(java.lang.String fileName,
                                         int hWnd)
                                  throws java.io.IOException,
                                         AutomationException
Description copied from interface: IAGSServerConnectionFactory2
Opens the server connection specified by the given file name.

Specified by:
openFromFile in interface IAGSServerConnectionFactory2
Parameters:
fileName - The fileName (in)
hWnd - The hWnd (A COM typedef) (in)
Returns:
A reference to a com.esri.arcgis.gisclient.IAGSServerConnection
Throws:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

readConnectionPropertiesFromFile

public IPropertySet readConnectionPropertiesFromFile(java.lang.String fileName)
                                              throws java.io.IOException,
                                                     AutomationException
Description copied from interface: IAGSServerConnectionFactory2
The connection properties from the specified file.

Specified by:
readConnectionPropertiesFromFile in interface IAGSServerConnectionFactory2
Parameters:
fileName - The fileName (in)
Returns:
A reference to a com.esri.arcgis.system.IPropertySet
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

setDefaultHttpTimeout

public void setDefaultHttpTimeout(int seconds)
                           throws java.io.IOException,
                                  AutomationException
Description copied from interface: IAGSServerConnectionFactory2
The default timeout for http requests to the server (in seconds).

Specified by:
setDefaultHttpTimeout in interface IAGSServerConnectionFactory2
Parameters:
seconds - The seconds (in)
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

getDefaultHttpTimeout

public int getDefaultHttpTimeout()
                          throws java.io.IOException,
                                 AutomationException
Description copied from interface: IAGSServerConnectionFactory2
The default timeout for http requests to the server (in seconds).

Specified by:
getDefaultHttpTimeout in interface IAGSServerConnectionFactory2
Returns:
The seconds
Throws:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.