com.esri.arcgis.system
Class IExtensionProxy

java.lang.Object
  extended by com.esri.arcgis.interop.Dispatch
      extended by com.esri.arcgis.system.IExtensionProxy
All Implemented Interfaces:
IExtension, Externalizable, Serializable

public class IExtensionProxy
extends com.esri.arcgis.interop.Dispatch
implements IExtension, 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, Serialized Form

Field Summary
 
Fields inherited from class com.esri.arcgis.interop.Dispatch
DISPATCH_METHOD, DISPATCH_PROPERTYGET, DISPATCH_PROPERTYPUT, DISPATCH_PROPERTYPUTREF, E
 
Constructor Summary
  IExtensionProxy()
           
  IExtensionProxy(Object obj)
           
protected IExtensionProxy(Object obj, String iid)
           
 
Method Summary
 void addListener(String iidStr, Object theListener, Object theSource)
           
 String getName()
          The name of the extension.
 void readExternal(ObjectInput in)
           
 void removeListener(String iidStr, Object theListener)
           
 void shutdown()
          Shuts down the extension.
 void startup(Object initializationData)
          Starts up the extension with the given initialization data.
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class com.esri.arcgis.interop.Dispatch
bindUsingMoniker, constructVtblPosTable, convertToNative, cookieForListener, createDispatch, createObjrefMonikerDisplayName, equals, getActiveObject, getActiveObject, getDefaultProperty, getDispatchIdOfName, getLastErrorCode, getMtsObjectContext, getObjRef, getPropertyByName, getPropertyByName, getVtblPos, hashCode, initDispatch, invoke, invokeMethodByName, invokeMethodByName, invokeMethodByName, invokePropertyGetByName, invokePropertyPutByName, invokePropertyPutByRefByName, isNativeMode, isObjRef, queryInterface, release, setNativeMode, setPropertyByName, toString, vtblInvoke
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IExtensionProxy

public IExtensionProxy()

IExtensionProxy

public IExtensionProxy(Object obj)
                throws IOException
Throws:
IOException

IExtensionProxy

protected IExtensionProxy(Object obj,
                          String iid)
                   throws IOException
Throws:
IOException
Method Detail

addListener

public void addListener(String iidStr,
                        Object theListener,
                        Object theSource)
                 throws IOException
Overrides:
addListener in class com.esri.arcgis.interop.Dispatch
Throws:
IOException

removeListener

public void removeListener(String iidStr,
                           Object theListener)
                    throws IOException
Overrides:
removeListener in class com.esri.arcgis.interop.Dispatch
Throws:
IOException

getName

public 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

Specified by:
getName in interface IExtension
Returns:
The extensionName
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

startup

public 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

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

shutdown

public 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

Specified by:
shutdown in interface IExtension
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Overrides:
writeExternal in class com.esri.arcgis.interop.Dispatch
Throws:
IOException

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Overrides:
readExternal in class com.esri.arcgis.interop.Dispatch
Throws:
IOException
ClassNotFoundException