com.esri.arcgis.geoprocessing
Class GPJobServer

java.lang.Object
  extended by com.esri.arcgis.geoprocessing.GPJobServer
All Implemented Interfaces:
IGPJobServerExe, com.esri.arcgis.interop.RemoteObjRef, IServerObject, ILogSupport, IObjectActivate, IObjectConstruct, IRequestHandler, IRequestHandler2, IRESTRequestHandler, ISupportErrorInfo, Serializable

public class GPJobServer
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IObjectConstruct, IRequestHandler, IRequestHandler2, IObjectActivate, ILogSupport, ISupportErrorInfo, IServerObject, IGPJobServerExe, IRESTRequestHandler

GP Job 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
 
Fields inherited from interface com.esri.arcgis.system.IRESTRequestHandler
IID, IID9d66a418_d54a_48ed_88bd_043a25fa9c83, xxDummy
 
Constructor Summary
GPJobServer()
          Constructs a GPJobServer using ArcGIS Engine.
GPJobServer(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
GPJobServer theGPJobServer = (GPJobServer) obj;
 
Method Summary
 void activate()
          Activates the object.
 void construct(IPropertySet props)
          Two phase object construction.
 void deactivate()
          Deactivates the object.
 boolean equals(Object o)
          Compare this object with another
static String getClsid()
          getClsid.
 String getConfigurationName()
          Name of the server object configuration that defines the server object.
 String getSchema()
          This method returns the resource hierarchy of a REST based SOE.
 String getTypeName()
          Type of the server object (MapServer or GeocodeServer).
 byte[] handleBinaryRequest(byte[] request)
          Handles a binary request.
 byte[] handleBinaryRequest(byte[] request, ITrackCancel pTrackCancel)
          Executes the server request and returns the server response.
 byte[] handleBinaryRequest2(String capabilities, byte[] request)
          Handles a binary request with explicit capabilities.
 byte[] handleRESTRequest(String capabilities, String resourceName, String operationName, String operationInput, String outputFormat, String requestProperties, String[] responseProperties)
          Handles REST requests for SOE.
 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
 
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

GPJobServer

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

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

GPJobServer

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

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

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

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.

handleBinaryRequest

public byte[] handleBinaryRequest(byte[] request,
                                  ITrackCancel pTrackCancel)
                           throws IOException,
                                  AutomationException
Executes the server request and returns the server response.

Product Availability

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

Specified by:
handleBinaryRequest in interface IGPJobServerExe
Parameters:
request - An unsigned byte (in)
pTrackCancel - A reference to a com.esri.arcgis.system.ITrackCancel (in)
Returns:
An unsigned byte
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

handleRESTRequest

public byte[] handleRESTRequest(String capabilities,
                                String resourceName,
                                String operationName,
                                String operationInput,
                                String outputFormat,
                                String requestProperties,
                                String[] responseProperties)
                         throws IOException,
                                AutomationException
Handles REST requests for SOE.

This method is invoked by ArcGIS Server's REST handler, which intercepts client's request (in URL form), parses it and passes it on to this method in form of parameter values.

The REST SOE developer must add logic to use these parameter values to determine which resource/operation is being requested and accordingly handle these requests and generate responses in the output format indicated by the "outputFormat" parameter. For more information on developing REST SOEs, please consult the Java ArcObjects Developer Guide.

Developer doc: Developing extensions > Server Object Extensions > SOE Web Services > REST Web Services > Developing SOE REST Web Services
Samples: Samples > Server Object Extensions section

Specified by:
handleRESTRequest in interface IRESTRequestHandler
Parameters:
capabilities - The capabilities supported by the SOE. An admin can choose which capabilities are enabled on a particular SOE (in ArcGIS Manager or ArcCatalog), based on certain criteria such as security roles. This list of allowed capabilities is then sent to this method, at runtime, as a comma separated list. (in)
resourceName - Name of the resource being addressed. If empty, its assumed that root resource is being addressed. (in)
operationName - Name of the operation being invoked. If empty, description of resource is returned. (in)
operationInput - Input parameters, in form of comma separated list, to the operation specified by operationName parameter. (in)
outputFormat - OutputFormat of operation. Possible formats are JSON, HTML, AMF, etc. (in)
requestProperties - The requestProperties (in)
responseProperties - The responseProperties (out)
Returns:
Output generated by the SOE
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSchema

public String getSchema()
                 throws IOException,
                        AutomationException
This method returns the resource hierarchy of a REST based SOE. This hierarchy is in JSON format as shown in the example below:

For an SOE that has a root resource (called "root") with one operation ("operation0"), and 2 sub-resources with one operation each ("operation1" and "operation2" respectively), the schema would look like:


 {
   "name": "MyRESTSOE",
   "description": "My REST SOE with 3 resources and 1 operation each.",
   "isCollection": false,
   "operations": [
   {
      "name": "operation0",
      "parameters": ["param01"],
      "supportedOutputFormats": ["json"]
    }
 ],
 "resources": [
  {
      "name": "subresource1",
      "description": "Sub Resource 1",
      "isCollection": true,
      "operations": [
       {
          "name": "operation1",
          "parameters": ["param10", "param11"],
          "supportedOutputFormats": ["json"]
       }
    ]
  },
  {
      "name": "subresource2",
      "description": "Sub Resource 2",
      "isCollection": true,
      "operations": [
       {
          "name": "operation2",
          "parameters": ["param20", "param21"],
          "supportedOutputFormats": ["json"]
       }
    ]
  }
 ]
}

Specified by:
getSchema in interface IRESTRequestHandler
Returns:
resource hierarchy of REST SOE, as String
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.