com.esri.arcgis.server
Class GPServerHelper

java.lang.Object
  extended by com.esri.arcgis.server.GPServerHelper
All Implemented Interfaces:
com.esri.arcgis.interop.RemoteObjRef, IGPServerHelper, ISupportErrorInfo, Serializable

public class GPServerHelper
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, ISupportErrorInfo, IGPServerHelper

Product Availability

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

See Also:
Serialized Form

Constructor Summary
GPServerHelper()
          Constructs a GPServerHelper using ArcGIS Engine.
GPServerHelper(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
GPServerHelper theGPServerHelper = (GPServerHelper) obj;
 
Method Summary
 boolean equals(Object o)
          Compare this object with another
 byte[] getBinaryJobDefinition(String jobID, String serviceName, String serviceType)
          Gets the binary job definition for a given job ID.
 String getBinaryRequestMessageType(byte[] request)
          Gets the type of the request from a binary message.
static String getClsid()
          getClsid.
 String getJobIDFromBinaryResponse(byte[] response)
          Extracts the job ID from a binary message that contains this information.
 String getJobIDFromStringResponse(String response)
          Extracts the job ID from a Soap message that conatins this information.
 int getJobStatus(String jobID, String serviceName, String serviceType)
          Returns the status of a job.
 void getRESTJobDefinition(String jobID, String serviceName, String serviceType, String[] resourceName, String[] operationName, String[] operationInput, String[] outputFormat, String[] requestProperties)
          Returns the REST job definition for a given job ID.
 String getStringJobDefinition(String jobID, String serviceName, String serviceType)
          Gets the string job definition for given a job ID.
 String getStringRequestMessageType(String request)
          Gets the type of the request from a string message.
 int hashCode()
          the hashcode for this object
 void init(String jobRegistryPath, String jobsDirectoryPath)
          Initializes the helper with the job registery and jobs directory.
 void interfaceSupportsErrorInfo(GUID riid)
          interfaceSupportsErrorInfo
 void writeBinaryJobResult(String jobID, String serviceName, String serviceType, byte[] result)
          Writes a binary job result to the job directory.
 void writeJobStatusAndMessage(String jobID, String serviceName, String serviceType, int status, String message)
          Writes a specific job message and status for a given job ID.
 void writeRESTJobResult(String jobID, String serviceName, String serviceType, String responseProperties, byte[] result)
          Writes a REST job result to the job directory.
 void writeStringJobResult(String jobID, String serviceName, String serviceType, String result)
          Writes a SOAP job result to the job directory.
 
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

GPServerHelper

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

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

GPServerHelper

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

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

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

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.

init

public void init(String jobRegistryPath,
                 String jobsDirectoryPath)
          throws IOException,
                 AutomationException
Initializes the helper with the job registery and jobs directory.

Product Availability

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

Specified by:
init in interface IGPServerHelper
Parameters:
jobRegistryPath - The jobRegistryPath (in)
jobsDirectoryPath - The jobsDirectoryPath (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeStringJobResult

public void writeStringJobResult(String jobID,
                                 String serviceName,
                                 String serviceType,
                                 String result)
                          throws IOException,
                                 AutomationException
Writes a SOAP job result to the job directory.

Product Availability

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

Specified by:
writeStringJobResult in interface IGPServerHelper
Parameters:
jobID - The jobID (in)
serviceName - The serviceName (in)
serviceType - The serviceType (in)
result - The result (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeBinaryJobResult

public void writeBinaryJobResult(String jobID,
                                 String serviceName,
                                 String serviceType,
                                 byte[] result)
                          throws IOException,
                                 AutomationException
Writes a binary job result to the job directory.

Product Availability

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

Specified by:
writeBinaryJobResult in interface IGPServerHelper
Parameters:
jobID - The jobID (in)
serviceName - The serviceName (in)
serviceType - The serviceType (in)
result - An unsigned byte (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeRESTJobResult

public void writeRESTJobResult(String jobID,
                               String serviceName,
                               String serviceType,
                               String responseProperties,
                               byte[] result)
                        throws IOException,
                               AutomationException
Writes a REST job result to the job directory.

Product Availability

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

Specified by:
writeRESTJobResult in interface IGPServerHelper
Parameters:
jobID - The jobID (in)
serviceName - The serviceName (in)
serviceType - The serviceType (in)
responseProperties - The responseProperties (in)
result - An unsigned byte (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getStringRequestMessageType

public String getStringRequestMessageType(String request)
                                   throws IOException,
                                          AutomationException
Gets the type of the request from a string message.

Product Availability

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

Specified by:
getStringRequestMessageType in interface IGPServerHelper
Parameters:
request - The request (in)
Returns:
The pType
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getBinaryRequestMessageType

public String getBinaryRequestMessageType(byte[] request)
                                   throws IOException,
                                          AutomationException
Gets the type of the request from a binary message.

Product Availability

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

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

getJobIDFromStringResponse

public String getJobIDFromStringResponse(String response)
                                  throws IOException,
                                         AutomationException
Extracts the job ID from a Soap message that conatins this information.

Product Availability

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

Specified by:
getJobIDFromStringResponse in interface IGPServerHelper
Parameters:
response - The response (in)
Returns:
The pJobID
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getJobIDFromBinaryResponse

public String getJobIDFromBinaryResponse(byte[] response)
                                  throws IOException,
                                         AutomationException
Extracts the job ID from a binary message that contains this information.

Product Availability

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

Specified by:
getJobIDFromBinaryResponse in interface IGPServerHelper
Parameters:
response - An unsigned byte (in)
Returns:
The pJobID
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getStringJobDefinition

public String getStringJobDefinition(String jobID,
                                     String serviceName,
                                     String serviceType)
                              throws IOException,
                                     AutomationException
Gets the string job definition for given a job ID.

Product Availability

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

Specified by:
getStringJobDefinition in interface IGPServerHelper
Parameters:
jobID - The jobID (in)
serviceName - The serviceName (in)
serviceType - The serviceType (in)
Returns:
The pJobDefinition
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getBinaryJobDefinition

public byte[] getBinaryJobDefinition(String jobID,
                                     String serviceName,
                                     String serviceType)
                              throws IOException,
                                     AutomationException
Gets the binary job definition for a given job ID.

Product Availability

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

Specified by:
getBinaryJobDefinition in interface IGPServerHelper
Parameters:
jobID - The jobID (in)
serviceName - The serviceName (in)
serviceType - The serviceType (in)
Returns:
An unsigned byte
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getRESTJobDefinition

public void getRESTJobDefinition(String jobID,
                                 String serviceName,
                                 String serviceType,
                                 String[] resourceName,
                                 String[] operationName,
                                 String[] operationInput,
                                 String[] outputFormat,
                                 String[] requestProperties)
                          throws IOException,
                                 AutomationException
Returns the REST job definition for a given job ID.

Product Availability

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

Specified by:
getRESTJobDefinition in interface IGPServerHelper
Parameters:
jobID - The jobID (in)
serviceName - The serviceName (in)
serviceType - The serviceType (in)
resourceName - The resourceName (out: use single element array)
operationName - The operationName (out: use single element array)
operationInput - The operationInput (out: use single element array)
outputFormat - The outputFormat (out: use single element array)
requestProperties - The requestProperties (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeJobStatusAndMessage

public void writeJobStatusAndMessage(String jobID,
                                     String serviceName,
                                     String serviceType,
                                     int status,
                                     String message)
                              throws IOException,
                                     AutomationException
Writes a specific job message and status for a given job ID.

Product Availability

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

Specified by:
writeJobStatusAndMessage in interface IGPServerHelper
Parameters:
jobID - The jobID (in)
serviceName - The serviceName (in)
serviceType - The serviceType (in)
status - A com.esri.arcgis.system.esriJobStatus constant (in)
message - The message (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getJobStatus

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

Product Availability

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

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