Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Sun Adapter for COM/DCOM API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.stc.connector.comadapter.eway
Class ComEwayConnection

    java.lang.Object
      com.stc.connector.comadapter.eway.ComEwayConnection

All Implemented Interfaces:
  com.stc.connector.framework.eway.EwayConnection, com.stc.connector.framework.eway.ValidatingEwayConnection, com.stc.connector.management.STCManagedSlave

    public class ComEwayConnection

extends java.lang.Object
implements com.stc.connector.framework.eway.ValidatingEwayConnection, com.stc.connector.management.STCManagedSlave

This class implements the EwayConnection interface for the ETD. It is required that it has a public constructor without arguments.

Constructor Summary
`ComEwayConnection()` Creates a new instance of EtdEwayConnection

Method Summary
`void` | `cleanup()` Perform clean up of any resources or reset of any state held by the instance of EwayConnection.
`STCIDispatch` | `create(java.lang.String clsidString, java.lang.String server)` Call this method to create an instance of the COM object specified by the CLSID string and server (if DCOM component) overriding the default server in the eWay configuration.
`void` | `destroy()` Release any resources prior to the destruction of the associated ManagedConnection.
`com.stc.connector.framework.client.AssociateableHandle` | `getConnection(javax.security.auth.Subject subject, javax.resource.spi.ConnectionRequestInfo cri)` Get a new instance of the connection handle (application connection).
`javax.resource.spi.LocalTransaction` | `getLocalTransaction()` Get a LocalTransaction instance for local transaction demarcation.
`javax.resource.spi.ManagedConnectionMetaData` | `getMetaData()` Get a new instance of the ManagedConnectionMetaData which contains connection information for the currently established connection.
`com.stc.connector.management.util.ObjectReference` | `getMonitor()`
`javax.transaction.xa.XAResource` | `getXAResource()` Get an XAResource instance for global transaction demaracation.
`void` | `initialize(com.stc.connector.framework.eway.ManagedConnectionCallback aCallback, javax.security.auth.Subject aSubject, javax.resource.spi.ConnectionRequestInfo aConfiguration, com.stc.connector.management.jca.system.mbeans.MonitorDataContainer aMonitorDataContainer)` Initialize the EwayConnection.
`boolean` | `isValidConnection()` This method is used by the framework to determine whether the EwayConnection is still valid (ie, unrecoverable connection error).
`boolean` | `matchConnection(javax.security.auth.Subject subject, javax.resource.spi.ConnectionRequestInfo cri)` Determines whether this instance of the EwayConnection matches the the connection request with the connection information in Subject and/or ConnectionRequestInfo.
`java.lang.String` | `resolveSystemErrorText(int hr)` A convenience method exposed to allow the user to get the error text for an HRESULT.
`void` | `setMonitor(com.stc.connector.management.util.ObjectReference mbean)`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ComEwayConnection

    public ComEwayConnection()

  Creates a new instance of EtdEwayConnection

Method Detail

### initialize

    public void initialize(com.stc.connector.framework.eway.ManagedConnectionCallback aCallback,
                           javax.security.auth.Subject aSubject,
                           javax.resource.spi.ConnectionRequestInfo aConfiguration,
                           com.stc.connector.management.jca.system.mbeans.MonitorDataContainer aMonitorDataContainer)
                    throws javax.resource.ResourceException

  Initialize the EwayConnection. Establish the connection to the external system (EIS).

  Specified by:
    `initialize` in interface `com.stc.connector.framework.eway.EwayConnection`
  Parameters:
    `mcCallback` - The callback object for getting services from the associated ManagedConnection.
    `subject` - The Subject instance which holds the credentials for EIS signon.
    `aConfiguration` - The ConnectionRequestInfo instance which can hold both EIS signon information or general connection specific information. The ConnectionRequestInfo provided will contain the union of the properties from the client connection request properties, the ResourceAdapter properties, and the ManagedConnectionFactory properties.
  Throws:
    `javax.resource.ResourceException` - upon error.

### matchConnection

    public boolean matchConnection(javax.security.auth.Subject subject,
                                   javax.resource.spi.ConnectionRequestInfo cri)

  Determines whether this instance of the EwayConnection matches the the connection request with the connection information in Subject and/or ConnectionRequestInfo.

  Specified by:
    `matchConnection` in interface `com.stc.connector.framework.eway.EwayConnection`
  Parameters:
    `subject` - The Subject instance which holds the credentials for EIS signon.
    `cri` - The ConnectionRequestInfo instance which holds both EIS EIS signon information or general connection specific information. The ConnectionRequestInfo provided will contain the union of the properties from the client connection request properties, the ResourceAdapter properties, and the ManagedConnectionFactory properties.
  Returns:
    A boolean true if there is a connection match; false otherwise.

### getConnection

    public com.stc.connector.framework.client.AssociateableHandle getConnection(javax.security.auth.Subject subject,
                                                                                javax.resource.spi.ConnectionRequestInfo cri)
                                                                         throws javax.resource.ResourceException

  Get a new instance of the connection handle (application connection).

  Specified by:
    `getConnection` in interface `com.stc.connector.framework.eway.EwayConnection`
  Parameters:
    `subject` - The Subject instance which holds the credentials for EIS signon.
    `cri` - The ConnectionRequestInfo instance which holds both EIS EIS signon information or general connection specific information. The ConnectionRequestInfo provided will contain the union of the properties from the client connection request properties, the ResourceAdapter properties, and the ManagedConnectionFactory properties.
  Returns:
    A connection handle (application connection) instance which implements the Associateable interface.
  Throws:
    `javax.resource.ResourceException` - upon error.

### cleanup

    public void cleanup()
                 throws javax.resource.ResourceException

  Perform clean up of any resources or reset of any state held by the instance of EwayConnection.

  Specified by:
    `cleanup` in interface `com.stc.connector.framework.eway.EwayConnection`
  Throws:
    `javax.resource.ResourceException` - upon error.

### destroy

    public void destroy()
                 throws javax.resource.ResourceException

  Release any resources prior to the destruction of the associated ManagedConnection.

  Specified by:
    `destroy` in interface `com.stc.connector.framework.eway.EwayConnection`
  Throws:
    `javax.resource.ResourceException` - upon error.

### getLocalTransaction

    public javax.resource.spi.LocalTransaction getLocalTransaction()
                                                            throws javax.resource.ResourceException

  Get a LocalTransaction instance for local transaction demarcation.

  Specified by:
    `getLocalTransaction` in interface `com.stc.connector.framework.eway.EwayConnection`
  Returns:
    A LocalTransaction instance.
  Throws:
    `javax.resource.ResourceException` - upon error.

### getMetaData

    public javax.resource.spi.ManagedConnectionMetaData getMetaData()
                                                             throws javax.resource.ResourceException

  Get a new instance of the ManagedConnectionMetaData which contains connection information for the currently established connection.

  Specified by:
    `getMetaData` in interface `com.stc.connector.framework.eway.EwayConnection`
  Returns:
    An instance of ManagedConnectionMetaData which contains information about the current established connection to the EIS.
  Throws:
    `javax.resource.ResourceException` - upon error.

### getXAResource

    public javax.transaction.xa.XAResource getXAResource()
                                                  throws javax.resource.ResourceException

  Get an XAResource instance for global transaction demaracation.

  Specified by:
    `getXAResource` in interface `com.stc.connector.framework.eway.EwayConnection`
  Returns:
    A XAResource instance.
  Throws:
    `javax.resource.ResourceException` - upon error.

### create

    public STCIDispatch create(java.lang.String clsidString,
                               java.lang.String server)
                        throws STCComException

  Call this method to create an instance of the COM object specified by the CLSID string and server (if DCOM component) overriding the default server in the eWay configuration.

  Parameters:
    `clsidString` - The CLSID string of the COM object you wish to create. Note that the component must be automation-compatible.
    `server` - The server on which the DCOM component resides.
  Returns:
    Returns an STCIDispatch interface for the specified CLSID string.
  Throws:
    `ComApplicationException` - if creation of the instance fails.
    `STCComException`

### 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.

  Returns:
    Error message from operating system, if any.

### setMonitor

    public void setMonitor(com.stc.connector.management.util.ObjectReference mbean)

  Specified by:
    `setMonitor` in interface `com.stc.connector.management.STCManagedSlave`

### getMonitor

    public com.stc.connector.management.util.ObjectReference getMonitor()

### isValidConnection

    public boolean isValidConnection()

  This method is used by the framework to determine whether the EwayConnection is still valid (ie, unrecoverable connection error). It is used to determine whether the ManagedConnection instance associated with the instance of the EwayConnection should be pruned from the connection pool by the container. Available for JCA 1.5 only.

  Specified by:
    `isValidConnection` in interface `com.stc.connector.framework.eway.ValidatingEwayConnection`
  Returns:
    If valid eway connection, true must be returned, otherwise false must be returned.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Sun Adapter for COM/DCOM API
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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