Geoprocessing event listeners


Purpose
This sample demonstrates how to register geoprocessing events and execute functionality based on the occurrence of such events. This sample listens to the following events:
  • onMessageAdded (when a new message is added to GeoProcessor)
  • preToolExecute (when executing a tool before execution of the main geoprocessing tool begins)
  • postToolExecute (when executing a tool after execution of the main geoprocessing tool is complete)
  • toolboxChange (when the toolbox is changed)
The Buffer geoprocessing tool is used in this sample, and the above-described events are wired around the execution of this tool. Each event occurrence displays a message on the console.

How to use

See How to use ArcGIS samples for help on running the sample. If the sample has associated data, you will find that the sample's zip file includes a "data" folder alongside the language folders. However, you will need to update the sample to point to the location of the data once you have extracted all the files.

  1. Run the sample.
  2. Examine output messages on the console.


Download the files for Java
geoprocessing/EventListener.java Main class




Development licensing Deployment licensing
Engine Developer Kit Engine Runtime
ArcView