public class Geoprocessor
extends com.google.gwt.core.client.JavaScriptObject
Modifier and Type | Method and Description |
---|---|
void |
addCheckJobStatusHandler(CheckJobStatusHandler handler)
Add event handler for checkJobStatus.
|
void |
addErrorHandler(ErrorHandler handler)
Add event handler for errors.
|
void |
addExecuteHandler(GeoprocessorExecuteHandler handler)
Add event handler for execute.
|
void |
addGetResultDataHandler(GetResultDataHandler handler)
Add event handler for getResultDataHandler.
|
void |
addGetResultImageHandler(GetResultImageHandler handler)
Add event handler for getResultImage
|
void |
addGetResultImageLayerHandler(GetResultImageLayerHandler handler)
Add event handler for getResultImageLayer
|
void |
addJobHandler(GeoprocessorJobHandler handler)
Add event handler for when job is complete.
|
void |
cancelJobStatusUpdates(java.lang.String jobId)
Cancels the periodic job status updates initiated automatically when submitJob() is invoked for the job identified by jobId.
|
void |
checkJobStatus(java.lang.String jobId)
Sends a request to the GP Task for the current state of the job identified by jobId.
|
void |
checkJobStatus(java.lang.String jobId,
CheckJobStatusCallback callback)
Sends a request to the GP Task for the current state of the job identified by jobId.
|
static Geoprocessor |
create(java.lang.String url)
Creates a new Geoprocessor object that represents the GP Task identifed by a URL.
|
Deferred |
execute(JSObject params)
Sends a request to the server to execute a synchronous GP task.
|
Deferred |
execute(JSObject params,
GeoprocessorExecuteCallback callback)
Sends a request to the server to execute a synchronous GP task.
|
SpatialReference |
getOutputSpatialReference()
Deprecated.
- Use outSpatialReference instead.
|
SpatialReference |
getOutSpatialReference()
The spatial reference of the output geometries.
|
SpatialReference |
getProcessSpatialReference()
The spatial reference that the model will use to perform geometry operations.
|
Deferred |
getResultData(java.lang.String jobId,
java.lang.String parameterName)
Sends a request to the GP Task to get the task result identified by jobId and resultParameterName.
|
Deferred |
getResultData(java.lang.String jobId,
java.lang.String parameterName,
GetResultDataCallback callback)
Sends a request to the GP Task to get the task result identified by jobId and resultParameterName.
|
Deferred |
getResultImage(java.lang.String jobId,
java.lang.String parameterName,
ImageParameters parameters)
Sends a request to the GP Task to get the task result identified by jobId and resultParameterName as an image.
|
Deferred |
getResultImage(java.lang.String jobId,
java.lang.String parameterName,
ImageParameters parameters,
GetResultImageCallback callback)
Sends a request to the GP Task to get the task result identified by jobId and resultParameterName as an image.
|
void |
getResultImageLayer(java.lang.String jobId,
java.lang.String parameterName,
ImageParameters parameters)
Sends a request to the GP Task to get the task result identified by jobId and resultParameterName as an ArcGISDynamicMapServiceLayer.
|
void |
getResultImageLayer(java.lang.String jobId,
java.lang.String parameterName,
ImageParameters parameters,
GetResultImageLayerCallback callback)
Sends a request to the GP Task to get the task result identified by jobId and resultParameterName as an ArcGISDynamicMapServiceLayer.
|
int |
getUpdateDelay()
The time interval in milliseconds between each job status request sent to an asynchronous GP task.
|
java.lang.String |
getUrl()
ArcGIS Server Rest API endpoint to the resource that receives the geoprocessing request.
|
void |
setOutputSpatialReference(SpatialReference spatialReference)
Deprecated.
- Use outSpatialReference instead.
|
void |
setOutSpatialReference(SpatialReference outSpatialReference)
Set the outSpatialReference parameter.
|
void |
setProcessSpatialReference(SpatialReference processSpatialReference)
Set the processSpatialReference parameter.
|
void |
setUpdateDelay(int delay)
Sets the time interval in milliseconds between each job status request sent to an asynchronous GP task.
|
void |
submitJob(JSObject inputParameters)
Submits a job to the server for asynchronous processing by the GP task.
|
void |
submitJob(JSObject inputParameters,
SubmitJobCallback callback)
Submits a job to the server for asynchronous processing by the GP task.
|
public static Geoprocessor create(java.lang.String url)
url
- - URL to the ArcGIS Server REST resource that represents a geoprocessing service.public final SpatialReference getOutputSpatialReference()
public final SpatialReference getOutSpatialReference()
public final SpatialReference getProcessSpatialReference()
public final int getUpdateDelay()
public final java.lang.String getUrl()
public final void cancelJobStatusUpdates(java.lang.String jobId)
jobId
- - A string that uniquely identifies the job for which the job updates are cancelled.public final void checkJobStatus(java.lang.String jobId, CheckJobStatusCallback callback)
jobId
- - A string that uniquely identifies a job on the server. It is created when a job is submitted for execution and later used to check its status
and retrieve the results.callback
- - The function to call when the method has completed.public final void checkJobStatus(java.lang.String jobId)
jobId
- - A string that uniquely identifies a job on the server. It is created when a job is submitted for execution and later used to check its status
and retrieve the results.public final Deferred execute(JSObject params, GeoprocessorExecuteCallback callback)
params
- - The inputParameters argument specifies the input parameters accepted by the task and their corresponding values.callback
- - The function to call when the method has completed.public final Deferred execute(JSObject params)
params
- - The inputParameters argument specifies the input parameters accepted by the task and their corresponding values.public final Deferred getResultData(java.lang.String jobId, java.lang.String parameterName, GetResultDataCallback callback)
jobId
- - The jobId returned from JobInfo.parameterName
- - The name of the result parameter as defined in Services Directory.callback
- - The function to call when the method has completed.public final Deferred getResultData(java.lang.String jobId, java.lang.String parameterName)
jobId
- - The jobId returned from JobInfo.parameterName
- - The name of the result parameter as defined in Services Directory.public final Deferred getResultImage(java.lang.String jobId, java.lang.String parameterName, ImageParameters parameters, GetResultImageCallback callback)
jobId
- - The jobId returned from JobInfo.parameterName
- - The name of the result parameter as defined in Services Directory.parameters
- - Specifies the properties of the result image.callback
- - The function to call when the method has completed.public final Deferred getResultImage(java.lang.String jobId, java.lang.String parameterName, ImageParameters parameters)
jobId
- - The jobId returned from JobInfo.parameterName
- - The name of the result parameter as defined in Services Directory.parameters
- - Specifies the properties of the result image.public final void getResultImageLayer(java.lang.String jobId, java.lang.String parameterName, ImageParameters parameters, GetResultImageLayerCallback callback)
jobId
- - The jobId returned from JobInfo.parameterName
- - The name of the result parameter as defined in Services Directory.parameters
- - Contains various options that can be specified when generating a dynamic map image.callback
- - The function to call when the method has completed.public final void getResultImageLayer(java.lang.String jobId, java.lang.String parameterName, ImageParameters parameters)
jobId
- - The jobId returned from JobInfo.parameterName
- - The name of the result parameter as defined in Services Directory.parameters
- - Contains various options that can be specified when generating a dynamic map image.public final void setOutputSpatialReference(SpatialReference spatialReference)
spatialReference
- public final void setOutSpatialReference(SpatialReference outSpatialReference)
outSpatialReference
- - The spatial reference of the output geometries. If not specified, the output geometries are in the spatial reference of the input
geometries. If processSpatialReferencew is specified and outSpatialReference is not specified, the output geometries are in the
spatial reference of the process spatial reference.public final void setProcessSpatialReference(SpatialReference processSpatialReference)
processSpatialReference
- - The spatial reference that the model will use to perform geometry operations. If processSpatialReference is specified and outputSpatialReference is not
specified, the output geometries are in the spatial reference of the process spatial reference.public final void setUpdateDelay(int delay)
delay
- - The value in milliseconds. One second equals 1000 milliseconds.public final void submitJob(JSObject inputParameters, SubmitJobCallback callback)
inputParameters
- - The inputParameters argument specifies the input parameters accepted by the task and their
corresponding values. These input parameters are listed in the parameters field of the associated GP Task resource.callback
- - The function to call when the method has completed and on update of status.public final void submitJob(JSObject inputParameters)
inputParameters
- - The inputParameters argument specifies the input parameters accepted by the task and their
corresponding values. These input parameters are listed in the parameters field of the associated GP Task resource.public final void addErrorHandler(ErrorHandler handler)
handler
- - Fires when an error occurs when executing the task.public final void addExecuteHandler(GeoprocessorExecuteHandler handler)
handler
- - Fires when a synchronous GP task is completed.public final void addGetResultDataHandler(GetResultDataHandler handler)
handler
- - Fires when the result of an asynchronous GP task execution is available.public final void addGetResultImageHandler(GetResultImageHandler handler)
handler
- - Fires when a map image is generated by invoking the getResultImage() method.public final void addGetResultImageLayerHandler(GetResultImageLayerHandler handler)
handler
- - Fires when getResultImageLayer() has completed.public final void addJobHandler(GeoprocessorJobHandler handler)
handler
- - Fires when an asynchronous GP task using submitJob is complete.public final void addCheckJobStatusHandler(CheckJobStatusHandler handler)
handler
- - Fires when a job status update is available.