com.esri.arcgis.geoprocessing
Class GPServer

java.lang.Object
  extended by com.esri.arcgis.geoprocessing.GPServer
All Implemented Interfaces:
IGPServer, IGPServer2, com.esri.arcgis.interop.RemoteObjRef, IServerObject, IServerObjectExtensionManager, ILogSupport, IObjectActivate, IObjectConstruct, IRequestHandler, IRequestHandler2, ISupportErrorInfo, Serializable

public class GPServer
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IGPServer, IObjectConstruct, IRequestHandler, IRequestHandler2, IObjectActivate, ILogSupport, ISupportErrorInfo, IServerObject, IServerObjectExtensionManager, IGPServer2

GP Server Class.

Product Availability

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

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.esri.arcgis.system.IRequestHandler
IID, IID46a0e2ea_3b64_4a46_bd78_88a1660f35bb, xxDummy
 
Fields inherited from interface com.esri.arcgis.system.IObjectActivate
IID, IIDe3b78022_143e_4e61_9099_ed319ec061e7, xxDummy
 
Constructor Summary
GPServer()
          Constructs a GPServer using ArcGIS Engine.
GPServer(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
GPServer theGPServer = (GPServer) obj;
 
Method Summary
 void activate()
          Activates the object.
 void cancelJob(String jobID)
          Cancels the specified job.
 void construct(IPropertySet props)
          Two phase object construction.
 void deactivate()
          Deactivates the object.
 boolean equals(Object o)
          Compare this object with another
 IGPResult execute(String toolName, IGPValues values, IGPResultOptions pOptions)
          Executes the specified tool with the supplied values and options and returns the results.
 IGPResult execute(String toolName, IGPValues values, IGPResultOptions options, IPropertySet envValues)
          Executes the specified tool with the supplied values and options and returns the results.
 IServerObjectExtension findExtensionByCLSID(String cLSID)
          Returns a server object extension found using a string representation of its class ID.
 IServerObjectExtension findExtensionByTypeName(String name)
          Returns a server object extension found using its type name.
static String getClsid()
          getClsid.
 String getConfigurationName()
          Name of the server object configuration that defines the server object.
 int getExecutionType()
          Indicates if the geoprocessing server is synchronous or asynchronous.
 IPropertySet getJobEnvironmentValues(String jobID)
          Returns the enviornment values for the job.
 IGPValues getJobInputValues(String jobID, IStringArray parameterNames)
          Returns the input values for the job.
 IJobMessages getJobMessages(String jobID)
          Returns the messages of the specified job.
 IGPResult getJobResult(String jobID, IStringArray parameterNames, IGPResultOptions pOptions)
          Returns the results of the specified job.
 IEnvelope getJobResultMapExtent(String jobID)
          Returns the extent for the job.
 IGPResultOptions getJobResultOptions(String jobID)
          Returns the result options for the job.
 int getJobStatus(String jobID)
          Returns the status of the specified job.
 String getJobToolName(String jobID)
          Returns the tool name for the job.
 String getResultMapServerName()
          Indicates if there is an associated map server to draw the results and the name of the map server.
 IGDSData getResultWorkspace(String jobID, int transportType)
          Returns a zip file of the results workspace.
 IGPToolInfos getTaskInfos()
          Returns the tool information of the available tasks.
 IStringArray getTaskNames()
          Returns the names of the available tasks.
 IGPToolInfo getToolInfo(String toolName)
          Returns the tool information of the specified tool name.
 IGPToolInfos getToolInfos()
          Returns the tool information of the available tools.
 IStringArray getToolNames()
          Returns the names of the available tools.
 String getTypeName()
          Type of the server object (MapServer or GeocodeServer).
 byte[] handleBinaryRequest(byte[] request)
          Handles a binary request.
 byte[] handleBinaryRequest2(String capabilities, byte[] request)
          Handles a binary request with explicit capabilities.
 String handleStringRequest(String capabilities, String request)
          Handles a SOAP string request.
 int hashCode()
          the hashcode for this object
 void initLogging(ILog log)
          Initializes an object with a log.
 void interfaceSupportsErrorInfo(GUID riid)
          interfaceSupportsErrorInfo
 String submitJob(String toolName, IGPValues values)
          Submits the specified tool with the supplied values and options and returns the job id.
 String submitJob(String toolName, IGPValues values, IGPResultOptions options, IPropertySet envValues)
          Submits the specified tool with the supplied values and options and returns the job id.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef
getJintegraDispatch, release
 

Constructor Detail

GPServer

public GPServer()
         throws IOException,
                UnknownHostException
Constructs a GPServer using ArcGIS Engine.

Throws:
IOException - if there are interop problems
UnknownHostException - if there are interop problems

GPServer

public GPServer(Object obj)
         throws IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
GPServer theGPServer = (GPServer) obj;

Construct a GPServer using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to GPServer.

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

getClsid

public static String getClsid()
getClsid.


equals

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

Overrides:
equals in class Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class Object

getToolNames

public IStringArray getToolNames()
                          throws IOException,
                                 AutomationException
Returns the names of the available tools.

Product Availability

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

Specified by:
getToolNames in interface IGPServer
Specified by:
getToolNames in interface IGPServer2
Returns:
A reference to a com.esri.arcgis.system.IStringArray
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getToolInfos

public IGPToolInfos getToolInfos()
                          throws IOException,
                                 AutomationException
Returns the tool information of the available tools.

Product Availability

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

Specified by:
getToolInfos in interface IGPServer
Specified by:
getToolInfos in interface IGPServer2
Returns:
A reference to a com.esri.arcgis.geoprocessing.IGPToolInfos
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getToolInfo

public IGPToolInfo getToolInfo(String toolName)
                        throws IOException,
                               AutomationException
Returns the tool information of the specified tool name.

Product Availability

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

Specified by:
getToolInfo in interface IGPServer
Specified by:
getToolInfo in interface IGPServer2
Parameters:
toolName - The toolName (in)
Returns:
A reference to a com.esri.arcgis.geoprocessing.IGPToolInfo
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getTaskNames

public IStringArray getTaskNames()
                          throws IOException,
                                 AutomationException
Returns the names of the available tasks.

Product Availability

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

Specified by:
getTaskNames in interface IGPServer
Specified by:
getTaskNames in interface IGPServer2
Returns:
A reference to a com.esri.arcgis.system.IStringArray
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getTaskInfos

public IGPToolInfos getTaskInfos()
                          throws IOException,
                                 AutomationException
Returns the tool information of the available tasks.

Product Availability

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

Specified by:
getTaskInfos in interface IGPServer
Specified by:
getTaskInfos in interface IGPServer2
Returns:
A reference to a com.esri.arcgis.geoprocessing.IGPToolInfos
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getResultMapServerName

public String getResultMapServerName()
                              throws IOException,
                                     AutomationException
Indicates if there is an associated map server to draw the results and the name of the map server.

Product Availability

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

Specified by:
getResultMapServerName in interface IGPServer
Specified by:
getResultMapServerName in interface IGPServer2
Returns:
The mapServerName
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

execute

public IGPResult execute(String toolName,
                         IGPValues values,
                         IGPResultOptions pOptions)
                  throws IOException,
                         AutomationException
Executes the specified tool with the supplied values and options and returns the results.

Product Availability

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

Specified by:
execute in interface IGPServer
Parameters:
toolName - The toolName (in)
values - A reference to a com.esri.arcgis.geoprocessing.IGPValues (in)
pOptions - A reference to a com.esri.arcgis.geoprocessing.IGPResultOptions (in)
Returns:
A reference to a com.esri.arcgis.geoprocessing.IGPResult
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

submitJob

public String submitJob(String toolName,
                        IGPValues values)
                 throws IOException,
                        AutomationException
Submits the specified tool with the supplied values and options and returns the job id.

Product Availability

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

Specified by:
submitJob in interface IGPServer
Parameters:
toolName - The toolName (in)
values - A reference to a com.esri.arcgis.geoprocessing.IGPValues (in)
Returns:
The jobID
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getJobStatus

public int getJobStatus(String jobID)
                 throws IOException,
                        AutomationException
Returns the status of the specified job.

Product Availability

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

Specified by:
getJobStatus in interface IGPServer
Specified by:
getJobStatus in interface IGPServer2
Parameters:
jobID - The jobID (in)
Returns:
A com.esri.arcgis.system.esriJobStatus constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getJobMessages

public IJobMessages getJobMessages(String jobID)
                            throws IOException,
                                   AutomationException
Returns the messages of the specified job.

Product Availability

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

Specified by:
getJobMessages in interface IGPServer
Specified by:
getJobMessages in interface IGPServer2
Parameters:
jobID - The jobID (in)
Returns:
A reference to a com.esri.arcgis.system.IJobMessages
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getJobResult

public IGPResult getJobResult(String jobID,
                              IStringArray parameterNames,
                              IGPResultOptions pOptions)
                       throws IOException,
                              AutomationException
Returns the results of the specified job.

Product Availability

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

Specified by:
getJobResult in interface IGPServer
Specified by:
getJobResult in interface IGPServer2
Parameters:
jobID - The jobID (in)
parameterNames - A reference to a com.esri.arcgis.system.IStringArray (in)
pOptions - A reference to a com.esri.arcgis.geoprocessing.IGPResultOptions (in)
Returns:
A reference to a com.esri.arcgis.geoprocessing.IGPResult
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

cancelJob

public void cancelJob(String jobID)
               throws IOException,
                      AutomationException
Cancels the specified job.

Product Availability

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

Specified by:
cancelJob in interface IGPServer
Specified by:
cancelJob in interface IGPServer2
Parameters:
jobID - The jobID (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getExecutionType

public int getExecutionType()
                     throws IOException,
                            AutomationException
Indicates if the geoprocessing server is synchronous or asynchronous.

Product Availability

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

Specified by:
getExecutionType in interface IGPServer
Specified by:
getExecutionType in interface IGPServer2
Returns:
A com.esri.arcgis.geoprocessing.esriExecutionType constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getResultWorkspace

public IGDSData getResultWorkspace(String jobID,
                                   int transportType)
                            throws IOException,
                                   AutomationException
Returns a zip file of the results workspace.

Product Availability

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

Specified by:
getResultWorkspace in interface IGPServer
Specified by:
getResultWorkspace in interface IGPServer2
Parameters:
jobID - The jobID (in)
transportType - A com.esri.arcgis.geodatabasedistributed.esriGDSTransportType constant (in)
Returns:
A reference to a com.esri.arcgis.geodatabasedistributed.IGDSData
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

construct

public void construct(IPropertySet props)
               throws IOException,
                      AutomationException
Two phase object construction.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
construct in interface IObjectConstruct
Parameters:
props - A reference to a com.esri.arcgis.system.IPropertySet (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

handleBinaryRequest

public byte[] handleBinaryRequest(byte[] request)
                           throws IOException,
                                  AutomationException
Handles a binary request.

Specified by:
handleBinaryRequest in interface IRequestHandler
Parameters:
request - An unsigned byte (in)
Returns:
An unsigned byte
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

handleStringRequest

public String handleStringRequest(String capabilities,
                                  String request)
                           throws IOException,
                                  AutomationException
Handles a SOAP string request.

Specified by:
handleStringRequest in interface IRequestHandler
Parameters:
capabilities - The capabilities (in)
request - The request (in)
Returns:
The response
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

handleBinaryRequest2

public byte[] handleBinaryRequest2(String capabilities,
                                   byte[] request)
                            throws IOException,
                                   AutomationException
Handles a binary request with explicit capabilities.

Product Availability

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

Specified by:
handleBinaryRequest2 in interface IRequestHandler2
Parameters:
capabilities - The capabilities (in)
request - An unsigned byte (in)
Returns:
An unsigned byte
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

activate

public void activate()
              throws IOException,
                     AutomationException
Activates the object.

Specified by:
activate in interface IObjectActivate
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

deactivate

public void deactivate()
                throws IOException,
                       AutomationException
Deactivates the object.

Specified by:
deactivate in interface IObjectActivate
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

initLogging

public void initLogging(ILog log)
                 throws IOException,
                        AutomationException
Initializes an object with a log.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
initLogging in interface ILogSupport
Parameters:
log - A reference to a com.esri.arcgis.system.ILog (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

interfaceSupportsErrorInfo

public void interfaceSupportsErrorInfo(GUID riid)
                                throws IOException,
                                       AutomationException
interfaceSupportsErrorInfo

Description

Indicates whether the interface supports IErrorInfo.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
interfaceSupportsErrorInfo in interface ISupportErrorInfo
Parameters:
riid - A Structure: com.esri.arcgis.support.ms.stdole.GUID (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getConfigurationName

public String getConfigurationName()
                            throws IOException,
                                   AutomationException
Name of the server object configuration that defines the server object.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getConfigurationName in interface IServerObject
Returns:
The name
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getTypeName

public String getTypeName()
                   throws IOException,
                          AutomationException
Type of the server object (MapServer or GeocodeServer).

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Specified by:
getTypeName in interface IServerObject
Returns:
The name
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

findExtensionByCLSID

public IServerObjectExtension findExtensionByCLSID(String cLSID)
                                            throws IOException,
                                                   AutomationException
Returns a server object extension found using a string representation of its class ID.

Product Availability

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

Specified by:
findExtensionByCLSID in interface IServerObjectExtensionManager
Parameters:
cLSID - The cLSID (in)
Returns:
A reference to a com.esri.arcgis.server.IServerObjectExtension
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

findExtensionByTypeName

public IServerObjectExtension findExtensionByTypeName(String name)
                                               throws IOException,
                                                      AutomationException
Returns a server object extension found using its type name.

Product Availability

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

Specified by:
findExtensionByTypeName in interface IServerObjectExtensionManager
Parameters:
name - The name (in)
Returns:
A reference to a com.esri.arcgis.server.IServerObjectExtension
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

execute

public IGPResult execute(String toolName,
                         IGPValues values,
                         IGPResultOptions options,
                         IPropertySet envValues)
                  throws IOException,
                         AutomationException
Executes the specified tool with the supplied values and options and returns the results.

Product Availability

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

Specified by:
execute in interface IGPServer2
Parameters:
toolName - The toolName (in)
values - A reference to a com.esri.arcgis.geoprocessing.IGPValues (in)
options - A reference to a com.esri.arcgis.geoprocessing.IGPResultOptions (in)
envValues - A reference to a com.esri.arcgis.system.IPropertySet (in)
Returns:
A reference to a com.esri.arcgis.geoprocessing.IGPResult
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

submitJob

public String submitJob(String toolName,
                        IGPValues values,
                        IGPResultOptions options,
                        IPropertySet envValues)
                 throws IOException,
                        AutomationException
Submits the specified tool with the supplied values and options and returns the job id.

Product Availability

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

Specified by:
submitJob in interface IGPServer2
Parameters:
toolName - The toolName (in)
values - A reference to a com.esri.arcgis.geoprocessing.IGPValues (in)
options - A reference to a com.esri.arcgis.geoprocessing.IGPResultOptions (in)
envValues - A reference to a com.esri.arcgis.system.IPropertySet (in)
Returns:
The jobID
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getJobToolName

public String getJobToolName(String jobID)
                      throws IOException,
                             AutomationException
Returns the tool name for the job.

Product Availability

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

Specified by:
getJobToolName in interface IGPServer2
Parameters:
jobID - The jobID (in)
Returns:
The name
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getJobInputValues

public IGPValues getJobInputValues(String jobID,
                                   IStringArray parameterNames)
                            throws IOException,
                                   AutomationException
Returns the input values for the job.

Product Availability

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

Specified by:
getJobInputValues in interface IGPServer2
Parameters:
jobID - The jobID (in)
parameterNames - A reference to a com.esri.arcgis.system.IStringArray (in)
Returns:
A reference to a com.esri.arcgis.geoprocessing.IGPValues
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getJobResultOptions

public IGPResultOptions getJobResultOptions(String jobID)
                                     throws IOException,
                                            AutomationException
Returns the result options for the job.

Product Availability

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

Specified by:
getJobResultOptions in interface IGPServer2
Parameters:
jobID - The jobID (in)
Returns:
A reference to a com.esri.arcgis.geoprocessing.IGPResultOptions
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getJobEnvironmentValues

public IPropertySet getJobEnvironmentValues(String jobID)
                                     throws IOException,
                                            AutomationException
Returns the enviornment values for the job.

Product Availability

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

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

getJobResultMapExtent

public IEnvelope getJobResultMapExtent(String jobID)
                                throws IOException,
                                       AutomationException
Returns the extent for the job.

Product Availability

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

Specified by:
getJobResultMapExtent in interface IGPServer2
Parameters:
jobID - The jobID (in)
Returns:
A reference to a com.esri.arcgis.geometry.IEnvelope
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.