VistALink v1.5.0.026

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

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

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. For each type of adapter derived from this class, it should overide/implement getConnection() to achieve adapter-specific connection.

Version:
1.5.0.026
Author:
Application Modernization - Foundations Team
See Also:
Serialized Form

Constructor Summary
VistaLinkConnectionFactory(gov.va.med.vistalink.adapter.spi.VistaLinkManagedConnectionFactory managedFactory, javax.resource.spi.ConnectionManager connectionManager)
           
 
Method Summary
 javax.resource.cci.Connection getConnection()
          Gets a VistaLinkConnection connection handle; calls allocateConnection()
 javax.resource.cci.Connection getConnection(javax.resource.cci.ConnectionSpec connectionSpec)
          Gets a VistaLinkConnection handle with the connectionspec Empty method.
 java.io.PrintWriter getLogWriter()
           
 void getMCFInfo(gov.va.med.vistalink.adapter.spi.ConnectorInfoVO connectorInfoVO, boolean getDetailInfo)
          Populate a ConnectorInfoVO object with information from the stored VistaLinkManagedConnectionFactory instance.
 javax.resource.cci.ResourceAdapterMetaData getMetaData()
          Returns the meta data information associated with this adapter.
 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).
 void setLogWriter(java.io.PrintWriter printWriter)
           
 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
Returns:
PrintWriter
Throws:
javax.resource.ResourceException

setLogWriter

public void setLogWriter(java.io.PrintWriter printWriter)
                  throws javax.resource.ResourceException
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.

Specified by:
setReference in interface javax.resource.Referenceable
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
Gets a VistaLinkConnection handle with the connectionspec Empty method.

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

getConnection

public javax.resource.cci.Connection getConnection()
                                            throws javax.resource.ResourceException
Gets a VistaLinkConnection connection handle; calls allocateConnection()

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.

Client code in that case uses 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

getMCFInfo

public void getMCFInfo(gov.va.med.vistalink.adapter.spi.ConnectorInfoVO connectorInfoVO,
                       boolean getDetailInfo)
Populate a ConnectorInfoVO object with information from the stored VistaLinkManagedConnectionFactory instance.

Parameters:
connectorInfoVO -
 
NOT FOR PUBLIC USE
This constructor, method or field is not for public use.

VistALink v1.5.0.026

VistALink v1.5.0.026