VistALink v1.6

gov.va.med.vistalink.adapter.cci
Class VistaLinkConnectionFactory

java.lang.Object
  extended by gov.va.med.vistalink.adapter.cci.VistaLinkConnectionFactory
All Implemented Interfaces:
java.io.Serializable, javax.naming.Referenceable, javax.resource.cci.ConnectionFactory

public class VistaLinkConnectionFactory
extends java.lang.Object
implements javax.resource.cci.ConnectionFactory, java.io.Serializable, javax.resource.Referenceable

This implementation class provides an interface for getting connection to an EIS instance. Adapters derived from ConnectionFactory overide/implement getConnection() to provide adapter-specific connections.

See Also:
Serialized Form

Constructor Summary
VistaLinkConnectionFactory(gov.va.med.vistalink.adapter.spi.VistaLinkManagedConnectionFactory managedFactory, javax.resource.spi.ConnectionManager connectionManager)
           
 
Method Summary
 java.lang.String getCfgIpAddress()
          Retrieve configuration file setting for this connection factory.
 int getCfgPort()
          Retrieve configuration file setting for this connection factory.
 long getCfgTimeout()
          Retrieve configuration file setting for this connection factory.
 javax.resource.cci.Connection getConnection()
          Gets a VistaLinkConnection connection handle; calls allocateConnection().
 javax.resource.cci.Connection getConnection(javax.resource.cci.ConnectionSpec connectionSpec)
           
 java.lang.String getConnectorJndiName()
          Retrieve configuration file setting for this connection factory.
 long getDistinguishedIdentifier()
          Retrieve information for this connection factory.
 long getHlthConnectionAuthFailureCount()
          Retrieve health counter for this connection factory.
 long getHlthConnectionFailureCount()
          Retrieve health counter for this connection factory.
 long getHlthDivisionMismatchCount()
          Retrieve health counter for this connection factory.
 long getHlthIdentityFailureCount()
          Retrieve health counter for this connection factory.
 long getHlthProductionMismatchCount()
          Retrieve health counter for this connection factory.
 java.io.PrintWriter getLogWriter()
          Deprecated. unused method, not part of JCA spec, left to help preserve compatibility with previous versions
 void getMCFInfo(gov.va.med.vistalink.adapter.spi.ConnectorInfoVO connectorInfoVO, boolean getDetailInfo)
          Deprecated. Unused method; not removing to help preserve compatibility.
 javax.resource.cci.ResourceAdapterMetaData getMetaData()
          Returns the meta data information associated with this adapter.
 double getPerfCreateConnectionHandleAvgMillis()
          Retrieve performance tracker for this connection factory.
 double getPerfMatchManagedConnectionAvgMillis()
          Retrieve performance tracker for this connection factory.
 javax.resource.cci.RecordFactory getRecordFactory()
          Empty method.
 javax.naming.Reference getReference()
          Referenceable interface.
static VistaLinkConnectionFactory getVistaLinkConnectionFactory(java.lang.String hostIPAddress, java.lang.Integer hostPort)
          Creates VistaLinkConnectionFactory to be used in non-managed environment (J2SE).
 boolean isCfgTimeoutAlwaysUseDefaultAsMin()
          Retrieve configuration file setting for this connection factory.
 gov.va.med.vistalink.adapter.spi.VistaLinkSystemInfoVO queryMSystem()
          query the M system reached by this connector for general system information.
 void setLogWriter(java.io.PrintWriter printWriter)
          Deprecated. unused method, not part of JCA spec, left to help preserve compatibility with previous versions
 void setReference(javax.naming.Reference reference)
          Referenceable interface.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VistaLinkConnectionFactory

public VistaLinkConnectionFactory(gov.va.med.vistalink.adapter.spi.VistaLinkManagedConnectionFactory managedFactory,
                                  javax.resource.spi.ConnectionManager connectionManager)
Parameters:
managedFactory - the factory that the connection manager will use to construct managed connections
connectionManager - the connection manager that will allocate new VistaLinkConnections. This value is null in an unmanaged environment and defaults to VistaLinkConnectionManager this value is specified by the application server in a managed environment
 
NOT FOR PUBLIC USE
This constructor, method or field is not for public use.
Method Detail

getLogWriter

public java.io.PrintWriter getLogWriter()
                                 throws javax.resource.ResourceException
Deprecated. unused method, not part of JCA spec, left to help preserve compatibility with previous versions

Returns:
PrintWriter
Throws:
javax.resource.ResourceException
 
NOT FOR PUBLIC USE
This constructor, method or field is not for public use.

setLogWriter

public void setLogWriter(java.io.PrintWriter printWriter)
                  throws javax.resource.ResourceException
Deprecated. unused method, not part of JCA spec, left to help preserve compatibility with previous versions

Parameters:
printWriter -
Throws:
javax.resource.ResourceException
 
NOT FOR PUBLIC USE
This constructor, method or field is not for public use.

getMetaData

public javax.resource.cci.ResourceAdapterMetaData getMetaData()
                                                       throws javax.resource.ResourceException
Returns the meta data information associated with this adapter.

Specified by:
getMetaData in interface javax.resource.cci.ConnectionFactory
Throws:
javax.resource.ResourceException
See Also:
ConnectionFactory.getMetaData()
 
NOT FOR PUBLIC USE
This constructor, method or field is not for public use.

getReference

public javax.naming.Reference getReference()
Referenceable interface.

Specified by:
getReference in interface javax.naming.Referenceable
See Also:
Referenceable.getReference()
 
NOT FOR PUBLIC USE
This constructor, method or field is not for public use.

setReference

public void setReference(javax.naming.Reference reference)
Referenceable interface.

Parameters:
reference - reference
See Also:
Referenceable.setReference(javax.naming.Reference)
 
NOT FOR PUBLIC USE
This constructor, method or field is not for public use.

getConnection

public javax.resource.cci.Connection getConnection(javax.resource.cci.ConnectionSpec connectionSpec)
                                            throws javax.resource.ResourceException
Specified by:
getConnection in interface javax.resource.cci.ConnectionFactory
Throws:
javax.resource.ResourceException

getConnection

public javax.resource.cci.Connection getConnection()
                                            throws javax.resource.ResourceException
Gets a VistaLinkConnection connection handle; calls allocateConnection(). This gets connections for J2SE mode.

Specified by:
getConnection in interface javax.resource.cci.ConnectionFactory
Throws:
javax.resource.ResourceException
See Also:
ConnectionFactory.getConnection()

getRecordFactory

public javax.resource.cci.RecordFactory getRecordFactory()
                                                  throws javax.resource.ResourceException
Empty method.

Specified by:
getRecordFactory in interface javax.resource.cci.ConnectionFactory
Throws:
javax.resource.NotSupportedException
javax.resource.ResourceException
See Also:
ConnectionFactory.getRecordFactory()
 
NOT FOR PUBLIC USE
This constructor, method or field is not for public use.

getVistaLinkConnectionFactory

public static final VistaLinkConnectionFactory getVistaLinkConnectionFactory(java.lang.String hostIPAddress,
                                                                             java.lang.Integer hostPort)
                                                                      throws javax.resource.ResourceException
Creates VistaLinkConnectionFactory to be used in non-managed environment (J2SE).

This method should never be called in managed environment (J2EE) as application server is responsible for creating ConnectionFactories. J2EE code should use JNDI lookup to get a reference to the ConnectionFactory.

Parameters:
hostIPAddress - - the IP address to connect to
hostPort - - the port to open
Returns:
VistaLinkConnectionFactory The connection factory that will return Connections for the specified IPAddress and port
Throws:
javax.resource.ResourceException
 
NOT FOR PUBLIC USE
This constructor, method or field is not for public use.

getMCFInfo

public void getMCFInfo(gov.va.med.vistalink.adapter.spi.ConnectorInfoVO connectorInfoVO,
                       boolean getDetailInfo)
Deprecated. Unused method; not removing to help preserve compatibility.

Populate a ConnectorInfoVO object with information from the stored VistaLinkManagedConnectionFactory instance. Note: This method is unused and could be removed, except for compatibility concerns with previous version.

Parameters:
connectorInfoVO - object to populate
getDetailInfo - populate with less detail if false, more detail if true
 
NOT FOR PUBLIC USE
This constructor, method or field is not for public use.

getCfgIpAddress

public java.lang.String getCfgIpAddress()
Retrieve configuration file setting for this connection factory.

Returns:
IP address from configuration file.
 
NOT FOR PUBLIC USE
This constructor, method or field is not for public use.

getCfgPort

public int getCfgPort()
Retrieve configuration file setting for this connection factory.

Returns:
port from configuration file.
 
NOT FOR PUBLIC USE
This constructor, method or field is not for public use.

getCfgTimeout

public long getCfgTimeout()
Retrieve configuration file setting for this connection factory.

Returns:
default timeout, from configuration file
 
NOT FOR PUBLIC USE
This constructor, method or field is not for public use.

isCfgTimeoutAlwaysUseDefaultAsMin

public boolean isCfgTimeoutAlwaysUseDefaultAsMin()
Retrieve configuration file setting for this connection factory.

Returns:
setting for whether to use default timeout as minimum timeout, from configuration file
 
NOT FOR PUBLIC USE
This constructor, method or field is not for public use.

getDistinguishedIdentifier

public long getDistinguishedIdentifier()
Retrieve information for this connection factory.

Returns:
distinguished (internal) identifier associated with this connection factory
 
NOT FOR PUBLIC USE
This constructor, method or field is not for public use.

getHlthConnectionAuthFailureCount

public long getHlthConnectionAuthFailureCount()
Retrieve health counter for this connection factory.

Returns:
health counter for authentication failures
 
NOT FOR PUBLIC USE
This constructor, method or field is not for public use.

getHlthConnectionFailureCount

public long getHlthConnectionFailureCount()
Retrieve health counter for this connection factory.

Returns:
health counter for connection failures
 
NOT FOR PUBLIC USE
This constructor, method or field is not for public use.

getHlthDivisionMismatchCount

public long getHlthDivisionMismatchCount()
Retrieve health counter for this connection factory.

Returns:
health counter for division mismatches
 
NOT FOR PUBLIC USE
This constructor, method or field is not for public use.

getHlthIdentityFailureCount

public long getHlthIdentityFailureCount()
Retrieve health counter for this connection factory.

Returns:
health counter for "reauthentication" second-level light authentication failures
 
NOT FOR PUBLIC USE
This constructor, method or field is not for public use.

getHlthProductionMismatchCount

public long getHlthProductionMismatchCount()
Retrieve health counter for this connection factory.

Returns:
health counter for production-test mismatches
 
NOT FOR PUBLIC USE
This constructor, method or field is not for public use.

getPerfCreateConnectionHandleAvgMillis

public double getPerfCreateConnectionHandleAvgMillis()
Retrieve performance tracker for this connection factory.

Returns:
performance tracker for "create connection handle" average in milliseconds
 
NOT FOR PUBLIC USE
This constructor, method or field is not for public use.

getPerfMatchManagedConnectionAvgMillis

public double getPerfMatchManagedConnectionAvgMillis()
Retrieve performance tracker for this connection factory.

Returns:
performance tracker for "match managed connection" function in milliseconds
 
NOT FOR PUBLIC USE
This constructor, method or field is not for public use.

queryMSystem

public gov.va.med.vistalink.adapter.spi.VistaLinkSystemInfoVO queryMSystem()
query the M system reached by this connector for general system information.

Returns:
M System Info object.
 
NOT FOR PUBLIC USE
This constructor, method or field is not for public use.

getConnectorJndiName

public java.lang.String getConnectorJndiName()
Retrieve configuration file setting for this connection factory.

Returns:
JNDI name retrieved from VistALink configuration file and associated with this connection factory
 
NOT FOR PUBLIC USE
This constructor, method or field is not for public use.

VistALink v1.6

VistALink v1.6