com.esri.arcgis.arcmapui
Class GNetCommandHandler

java.lang.Object
  extended by com.esri.arcgis.arcmapui.GNetCommandHandler
All Implemented Interfaces:
IDDECommandHandler, com.esri.arcgis.interop.RemoteObjRef, Serializable

public class GNetCommandHandler
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IDDECommandHandler

GNet Command Handler.

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

See Also:
Serialized Form

Constructor Summary
GNetCommandHandler()
          Constructs a GNetCommandHandler using ArcGIS Engine.
GNetCommandHandler(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
GNetCommandHandler theGNetCommandHandler = (GNetCommandHandler) obj;
 
Method Summary
 boolean canExecute(String command)
          Indicates if the DDE command can be executed.
 boolean equals(Object o)
          Compare this object with another
 void execute(String command)
          Executes the DDE command.
static String getClsid()
          getClsid.
 int hashCode()
          the hashcode for this object
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef
getJintegraDispatch, release
 

Constructor Detail

GNetCommandHandler

public GNetCommandHandler()
                   throws IOException,
                          UnknownHostException
Constructs a GNetCommandHandler using ArcGIS Engine.

Throws:
IOException - if there are interop problems
UnknownHostException - if there are interop problems

GNetCommandHandler

public GNetCommandHandler(Object obj)
                   throws IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
GNetCommandHandler theGNetCommandHandler = (GNetCommandHandler) obj;

Construct a GNetCommandHandler using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to GNetCommandHandler.

Parameters:
obj - an object returned from ArcGIS Engine or Server
Throws:
IOException - if there are interop problems
Method Detail

getClsid

public static String getClsid()
getClsid.


equals

public boolean equals(Object o)
Compare this object with another

Overrides:
equals in class Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class Object

canExecute

public boolean canExecute(String command)
                   throws IOException,
                          AutomationException
Indicates if the DDE command can be executed.

Description

For any class which implements IDDECommandHandler and which is registered in the "ESRI MX DDECommandHandlers" category, ArcMap will call this function whenever a DDE message is received to check if the class can accept the incoming DDE Command string. Returning TRUE from this function will cause ArcMap to call the Execute procedure where any required operations may be carried out. Typically the CanExecute function will check that the incoming Command string is of the format expected by the Execute code.

Remarks

Depending upon the DDE Client involved the incoming Command string may need to be converted from ANSI to Unicode to be useful within the VB environment. Code such as the following can be used to do the conversion where StrCommUni is a string variable used to hold the unicode version of the Command string:

StrCommUni = StrConv(Command, vbUnicode))

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
canExecute in interface IDDECommandHandler
Parameters:
command - The command (in)
Returns:
The canExecute
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

execute

public void execute(String command)
             throws IOException,
                    AutomationException
Executes the DDE command.

Description

Execute may be used to respond to incoming DDE messages and carry out an appropriate task. For a class implementing IDDECommandHandler, ArcMap will only call Execute if the previous call to CanExecute returned TRUE.

Remarks

Depending upon the DDE Client involved the incoming Command string may need to be converted from ANSI to Unicode to be useful within the VB environment. Code such as the following can be used to do the conversion where StrCommUni is a string variable used to hold the unicode version of the Command string:

StrCommUni = StrConv(Command, vbUnicode))

Product Availability

Available with ArcGIS Desktop.

Supported Platforms

Windows

Specified by:
execute in interface IDDECommandHandler
Parameters:
command - The command (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.