Sun Adapter for COM/DCOM API

com.stc.connector.comadapter.appconn
Class ComRuntimeAgentImpl

java.lang.Object
  extended by com.stc.connector.comadapter.appconn.ComRuntimeAgentImpl
All Implemented Interfaces:
ComRuntimeAgent

public class ComRuntimeAgentImpl
extends java.lang.Object
implements ComRuntimeAgent

This class implements the ApplicationConnection interface for the COM application connection.


Constructor Summary
ComRuntimeAgentImpl(ComApplicationConnection appConn)
          Creates a new instance of ComRuntimeAgentImpl.
 
Method Summary
 STCIDispatch create(java.lang.String clsidString)
          Call this method to create an instance of the COM object specified by the CLSID string and the default server (if DCOM component) in the eWay configuration.
 ComConfiguration getConfiguration()
          Get the configuration for this connection.
 java.lang.String resolveSystemErrorText(int hr)
          A convenience method exposed to allow the user to get the error text for an HRESULT.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComRuntimeAgentImpl

public ComRuntimeAgentImpl(ComApplicationConnection appConn)
Creates a new instance of ComRuntimeAgentImpl.

Parameters:
mc - The ManagedConnection which created this connection.
Method Detail

create

public STCIDispatch create(java.lang.String clsidString)
                    throws ComApplicationException
Call this method to create an instance of the COM object specified by the CLSID string and the default server (if DCOM component) in the eWay configuration.

Specified by:
create in interface ComRuntimeAgent
Parameters:
clsidString - The CLSID string of the COM object you wish to create. Note that the component must be automation-compatible.
Returns:
Returns an STCIDispatch interface for the specified CLSID string.
Throws:
ComApplicationException - if creation of the instance fails.

getConfiguration

public ComConfiguration getConfiguration()
Get the configuration for this connection.

Specified by:
getConfiguration in interface ComRuntimeAgent
Returns:
The configuration.

resolveSystemErrorText

public java.lang.String resolveSystemErrorText(int hr)
A convenience method exposed to allow the user to get the error text for an HRESULT. The Method routes down to the FormatMessage method in the Win32 API.

Specified by:
resolveSystemErrorText in interface ComRuntimeAgent
Returns:
Error message from operating system, if any.

Sun Adapter for COM/DCOM API

Copyright © 1994-2008 Sun Microsystems, Inc. All rights reserved.