com.esri.arcgis.geodatabase
Interface IGPMessage

All Superinterfaces:
Serializable
All Known Implementing Classes:
GPMessage, GPMessages

public interface IGPMessage
extends Serializable

Provides access to the properties of a Geoprocessor message.

Remarks

The GPMessage object is composed of a message type, error code, and description. The message type can be Error, Warning, or Informative.

See also IGPMessages

When To Use

The IGPMessage interface returns a GPMessage object from an IGPMessages array, a collection of GPMessage objects. Messages are returned during the validating and executing of a geoprocessing tool.

Also refer to Building Geoprocessing Function Tools.

Product Availability

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


Method Summary
 String getDescription()
          The description of the geoprocessing message.
 int getErrorCode()
          The error code for the geoprocessing message.
 int getType()
          The geoprocessing message type.
 boolean isAbort()
          Indicates if the message is an abort.
 boolean isError()
          Indicates if the message is an error.
 boolean isInformational()
          Indicates if the message is informative.
 boolean isWarning()
          Indicates if the message is a warning.
 void setDescription(String message)
          The description of the geoprocessing message.
 void setErrorCode(int errorCode)
          The error code for the geoprocessing message.
 void setType(int type)
          The geoprocessing message type.
 

Method Detail

setType

void setType(int type)
             throws IOException,
                    AutomationException
The geoprocessing message type.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
type - A com.esri.arcgis.geodatabase.esriGPMessageType constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getType

int getType()
            throws IOException,
                   AutomationException
The geoprocessing message type.

Remarks

The get_Type property returns the message's type. Valid values are defined in the esriGPMessageType enumeration; they are: esriGPMessageTypeInformative, esriGPMessageTypeProcessDefinition, esriGPMessageTypeProcessStart, esriGPMessageTypeProcessStop, esriGPMessageTypeWarning, esriGPMessageTypeAbort, esriGPMessageTypeError, and esriGPMessageTypeEmpty.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
A com.esri.arcgis.geodatabase.esriGPMessageType constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setErrorCode

void setErrorCode(int errorCode)
                  throws IOException,
                         AutomationException
The error code for the geoprocessing message.

Remarks

The ErrorCode property returns the error code for a given message. It applies only to messages of type error.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
errorCode - The errorCode (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getErrorCode

int getErrorCode()
                 throws IOException,
                        AutomationException
The error code for the geoprocessing message.

Remarks

The get_ErrorCode property returns the message's error code. It applies only to a message of type esriGPMessageTypeError.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
The errorCode
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setDescription

void setDescription(String message)
                    throws IOException,
                           AutomationException
The description of the geoprocessing message.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
message - The message (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDescription

String getDescription()
                      throws IOException,
                             AutomationException
The description of the geoprocessing message.

Remarks

The get_Description property returns the actual message text string.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
The message
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isInformational

boolean isInformational()
                        throws IOException,
                               AutomationException
Indicates if the message is informative.

Remarks

The IsInformational method returns true if the message is of type esriGPMessageTypeInformative, esriGPMessageTypeProcessDefinition, esriGPMessageTypeProcessStart, and esriGPMessageTypeProcessStop.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
The isInformational
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isWarning

boolean isWarning()
                  throws IOException,
                         AutomationException
Indicates if the message is a warning.

Remarks

The IsWarning method returns true if the message is of type esriGPMessageTypeWarning.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
The isWarning
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isError

boolean isError()
                throws IOException,
                       AutomationException
Indicates if the message is an error.

Remarks

The IsError method returns true if the message is of type esriGPMessageTypeError.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
The isError
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isAbort

boolean isAbort()
                throws IOException,
                       AutomationException
Indicates if the message is an abort.

Remarks

The IsAbort method returns true if the message is of type esriGPMessageTypeAbort.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
The isAbort
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.