com.esri.core.tasks.ags.identify
Class IdentifyTask

java.lang.Object
  extended by com.esri.core.tasks.Task<IdentifyResult[]>
      extended by com.esri.core.tasks.ags.identify.IdentifyTask
All Implemented Interfaces:
Serializable, Callable<IdentifyResult[]>

public class IdentifyTask
extends Task<IdentifyResult[]>

The IdentifyTask class identifies features based on a set of parameters. The IdentifyTask class receives input parameters as an IdentifyParameters object, which specifies the details necessary for identifying features.

Use this class' execute() method to identify features. The identified features are returned as an array of type IdentifyResult.

The IdentifyTask class extends the abstract class Task, which implements the Callable interface. The advantage of this is that you execute the IdentifyTask with another thread. The Callable interface provides the advantage that results can be returned, in this case as an array of type IdentifyResult, when the result is computed by the separate thread.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.esri.core.tasks.Task
actionInput
 
Constructor Summary
IdentifyTask(IdentifyParameters identifyInput)
          The single argument constructor that only requires the parameters used when executing the identify action.
IdentifyTask(IdentifyParameters identifyInput, TaskListener<IdentifyResult[]> listener)
          This constructor is necessary if you wish to take advantage of executing the identify task in a separate thread.
 
Method Summary
 IdentifyResult[] execute()
          Executes an identify action.
If any results are retrieved by attempting to identify features, then the results are returned as an array of type IdentifyResults.
 
Methods inherited from class com.esri.core.tasks.Task
call, getActionInput, setActionInput
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IdentifyTask

public IdentifyTask(IdentifyParameters identifyInput,
                    TaskListener<IdentifyResult[]> listener)
This constructor is necessary if you wish to take advantage of executing the identify task in a separate thread. You'll need to setup a listener, TaskListener, that will be notified when the execute() method finishes execution.

Parameters:
identifyInput - the input parameters for this identify tasktask (see the IdentifyParameters class description for details).
listener - the listener object that will be notified when the execute() method completes. If the execute() method fails, then an error is returned.

IdentifyTask

public IdentifyTask(IdentifyParameters identifyInput)
The single argument constructor that only requires the parameters used when executing the identify action.

Parameters:
identifyInput - the input parameters for this identify task (see the IdentifyParameters class description for details).
Method Detail

execute

public IdentifyResult[] execute()
                         throws Exception
Executes an identify action.
If any results are retrieved by attempting to identify features, then the results are returned as an array of type IdentifyResults. If no features are identified, then an empty array is returned.

Specified by:
execute in class Task<IdentifyResult[]>
Returns:
an array of IdentifyResult
Throws:
Exception


Copyright © 2010. All Rights Reserved.