com.esri.arcgis.trackinganalyst
Interface ICOMClient

All Superinterfaces:
Serializable
All Known Subinterfaces:
ICOMClient2
All Known Implementing Classes:
PlugIn

public interface ICOMClient
extends Serializable

Provides access to methods and properties implemented by datalinks and consumed by the Tracking Server.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires Tracking Analyst Extension.


Method Summary
 void connect(String szConnectionString)
          Connects the client to the Tracking Server.
 int getErrorCode()
          Value for the error code in the data connection.
 int getEventHandle()
          The handle to the event that is signaled when data is ready to be received.
 String getID()
          ID value for the data in the connection.
 IMessage getMessage(int nTimeOut)
          Returns a message from the Tracking Server.
 String getName()
          Name of the dataset in the connection.
 void postMessage(IMessage piMessage)
          Posts a message to the Tracking Server.
 void setErrorCode(int pVal)
          Value for the error code in the data connection.
 void setID(String pVal)
          ID value for the data in the connection.
 void setName(String pVal)
          Name of the dataset in the connection.
 

Method Detail

getID

String getID()
             throws IOException,
                    AutomationException
ID value for the data in the connection.

Description

This property contains a unique identifier for this instance of the Object in which this interface is implemented with. This Unique ID is used internally by the Tracking Server to route command, data, status, and response message. This is the same ID that should be used in the message's destination property for routing a message to a specific Datalink. The implementation must verify that the ID is a valid GUID before changing the internal value.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires Tracking Analyst Extension.

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

setID

void setID(String pVal)
           throws IOException,
                  AutomationException
ID value for the data in the connection.

Description

This property contains a unique identifier for this instance of the Object in which this interface is implemented with. This Unique ID is used internally by the Tracking Server to route command, data, status, and response message. This is the same ID that should be used in the message's destination property for routing a message to a specific Datalink. The implementation must verify that the ID is a valid GUID before changing the internal value.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires Tracking Analyst Extension.

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

getEventHandle

int getEventHandle()
                   throws IOException,
                          AutomationException
The handle to the event that is signaled when data is ready to be received.

Description

Reserved for future use.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires Tracking Analyst Extension.

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

getErrorCode

int getErrorCode()
                 throws IOException,
                        AutomationException
Value for the error code in the data connection.

Description

This property indicates the last error code that has occured.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires Tracking Analyst Extension.

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

setErrorCode

void setErrorCode(int pVal)
                  throws IOException,
                         AutomationException
Value for the error code in the data connection.

Description

This property indicates the last error code that has occured.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires Tracking Analyst Extension.

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

getName

String getName()
               throws IOException,
                      AutomationException
Name of the dataset in the connection.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires Tracking Analyst Extension.

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

setName

void setName(String pVal)
             throws IOException,
                    AutomationException
Name of the dataset in the connection.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires Tracking Analyst Extension.

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

postMessage

void postMessage(IMessage piMessage)
                 throws IOException,
                        AutomationException
Posts a message to the Tracking Server.

Description

The postMessage method allows the Tracking server to send messages to the implementation's client. This method should only be valid if the Status is CONNECTED, see the IConnection interface definition. The implementation should return an S_OK if successful and an E_FAIL if not successful or if the implementation is not connected.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires Tracking Analyst Extension.

Parameters:
piMessage - A reference to a com.esri.arcgis.trackinganalyst.IMessage (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMessage

IMessage getMessage(int nTimeOut)
                    throws IOException,
                           AutomationException
Returns a message from the Tracking Server.

Description

The getMessage method is called by the tracking server process and retrieves a message from the implementations client. This method is only valid if the Status is CONNECTED. The implementation should return an S_OK if successful and an E_FAIL if not successful or the implementation is not connected. Additionally this routine should only block for the timeout, in milliseconds, passed in as nTimeOut. If a timeout occurs then the IMessage* value should be NULL and the return result must be S_FALSE; This is a requirement in order for the Tracking Server to properly process timeouts. Timeouts are normal operation as messages are not normally streaming steadily through the implementation.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires Tracking Analyst Extension.

Parameters:
nTimeOut - The nTimeOut (in)
Returns:
A reference to a com.esri.arcgis.trackinganalyst.IMessage
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

connect

void connect(String szConnectionString)
             throws IOException,
                    AutomationException
Connects the client to the Tracking Server.

Description

The connect method provides the entry point for connecting to the implementations client. This method takes one argument, the connection string. This connection string will contain the PROGID as the first section of the string and may contain additional information needed to connect the implementation. This additional information is dependent on the user-developed object. The format past the PROGID is at the discretion of the developer however it is recommended that TAGS be used to identify properties. The TAG format is an ALL CAPS TAG that is terminated with a colon e.g. CONNECTIONSTRING:user=self. The connect method returns S_OK on a successful connection or E_FAIL on a failed connection. Additionally it is desired for the implementation to use the Error Macros defined in ATL 3.0 for returning a descriptive error message. This message is logged into the TMS log and the Windows NT Event Log mechanism.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires Tracking Analyst Extension.

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