com.esri.arcgis.system
Interface IExtension

All Superinterfaces:
Serializable
All Known Implementing Classes:
AnimationExtension, DddServerEnvironment, EngineEditor, EngineNetworkAnalystEnvironment, EngineSnappingWindow, FMEExtensionHelper, IExtensionProxy, LicensedDataExtension, TrackingEngineUtil

public interface IExtension
extends Serializable

Provides access to members that define an extension.

Description

IExtension is implemented by developers of custom extensions. You do not normally use this interface from client code, other than to get the name of the extension.

Any extension that is registered with an application is automatically loaded and unloaded by the application; the end user does nothing to load or unload. For example, an extension that has been added to the ESRI Mx Extensions category will be started when ArcMap is started and will be shutdown when ArcMap is shutdown.

Remarks

If you want your extension to be exposed in the Extensions dialog, you would also implement the IExtensionConfig interface. The class module for your extension would implement both IExtension and IExtensionConfig.

When To Use

Use the IExtension interface to query the properties of an extension or to create your own extension.

When you are creating a new extension, you need to implement the IExtension interface in your class code. This interface allows you to set the name of the extension and specify what action takes place when the extension is started or shutdown.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

See Also:
IExtensionAccelerators, IExtensionManager, IExtensionConfig, com.esri.arcgis.framework.IApplication

Method Summary
 String getName()
          The name of the extension.
 void shutdown()
          Shuts down the extension.
 void startup(Object initializationData)
          Starts up the extension with the given initialization data.
 

Method Detail

getName

String getName()
               throws IOException,
                      AutomationException
The name of the extension.

Remarks

When implementing IExtension to create a custom extension, use the Name property to set the name of this extension.

If you implement persistence (e.g. IPersistVariant) for the extension, the length of the Name property cannot exceed 31 characters.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

startup

void startup(Object initializationData)
             throws IOException,
                    AutomationException
Starts up the extension with the given initialization data.

Description

initializationData is a reference to the object with which this extension is registered.

Remarks

When implementing IExtension to create a custom extension, use the Startup method to perform some action when the extension gets loaded.

The following list is an example of some of the common object types for the initializationData parameter.

Extension Category initializationData object type
ESRI Mx Application Application (IMxApplication)
ESRI Gx Applcation Application (IGxApplication)
ESRI Editor Extensions Editor (IEditor)

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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

shutdown

void shutdown()
              throws IOException,
                     AutomationException
Shuts down the extension.

Remarks

When implementing IExtension to create a custom extension, use the Shutdown method to perform some action when the extension gets unloaded.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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