VLJ Iteration II, v. 1.0.0.193

gov.va.med.foundations.adapter.cci
Class VistaLinkConnection

java.lang.Object
  |
  +--gov.va.med.foundations.adapter.cci.VistaLinkConnection

public class VistaLinkConnection
extends java.lang.Object

This implementation class represents an application level connection handle that is used by a component to access an EIS instance.
J2SE Example

 

 // create the callback handler
 CallbackHandlerSwing cbhSwing = new CallbackHandlerSwing(myFrame);
 
 // create the LoginContext  
 loginContext = new LoginContext("Production", cbhSwing);
 
 // login to server
 loginContext.login(); 
 
 //Gets the principal that contains the VistaLinkConnection
 VistaKernelPrincipalImpl myPrincipal = VistaKernelPrincipalImpl.
 			getKernelPrincipal(loginContext.getSubject());
 
 //Get the VistaLinkConnection
 VistaLinkConnection myConnection = myPrincipal.getAuthenticatedConnection();
 
  //request  and response objects 
 RpcRequest vReq = null; 
 RpcResponse vResp = null;
 
 //The Rpc Context
 String rpcContext = "XOBV VISTALINK TESTER";
 
 //The Rpc to call
 String rpcName = "XOBV TEST PING";
 
  //Construct the request object
 vReq = RpcRequestFactory.getRpcRequest(rpcContext, rpcName);
 
   //Execute the Rpc and get the response 
 vResp = myConnection.executeRPC(vReq);
 
 
  //Work with the response ...
 
 
 

Version:
1.0.0.193
Author:
Application Modernization - Foundations Team

Constructor Summary
VistaLinkConnection(VistaLinkManagedConnection mc)
          VistaLinkConnection Constructor.
 
Method Summary
 void close()
          Method close
Closes this connection handle
Informs the managed connection that this handle is closed
 Interaction createInteraction()
          Empty method.
 VistaLinkResponseVO executeInteraction(VistaLinkRequestVO requestVO, VistaLinkResponseFactory responseFactory)
          Method executeInteraction.
 gov.va.med.foundations.rpc.RpcResponse executeRPC(gov.va.med.foundations.rpc.RpcRequest request)
          Method executeRPC.
 gov.va.med.foundations.adapter.cci.VistaLinkServerInfo getConnectionInfo()
          Method getConnectionInfo.
 LocalTransaction getLocalTransaction()
          Empty method.
 VistaLinkManagedConnection getManagedConnection()
          Method getManagedConnection.
 ConnectionMetaData getMetaData()
          Method getMetaData
Gets the meta-information on the underlying EIS instance via this connection
 ResultSetInfo getResultSetInfo()
          Empty method.
 void setManagedConnection(VistaLinkManagedConnection mc)
          Method setManagedConnection.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VistaLinkConnection

public VistaLinkConnection(VistaLinkManagedConnection mc)
VistaLinkConnection Constructor.
This constructor should not be called directly.
Used by spi classes.

Parameters:
mc -
Method Detail

close

public void close()
           throws ResourceException
Method close
Closes this connection handle
Informs the managed connection that this handle is closed

Throws:
ResourceException

executeInteraction

public VistaLinkResponseVO executeInteraction(VistaLinkRequestVO requestVO,
                                              VistaLinkResponseFactory responseFactory)
                                       throws VistaLinkFaultException,
                                              FoundationsException
Method executeInteraction.
Executes an interaction with M

Parameters:
requestVO - - the request being made
responseFactory - - the factory which will construct the response
Returns:
VistaLinkResponseVO - the response from M
Throws:
VistaLinkFaultException - - thrown if an error occurred on M while processing the request
FoundationsException - - thrown if an internal adapter exception has occurred

executeRPC

public gov.va.med.foundations.rpc.RpcResponse executeRPC(gov.va.med.foundations.rpc.RpcRequest request)
                                                  throws VistaLinkFaultException,
                                                         FoundationsException
Method executeRPC.
Executes an interaction with M using the RpcResponseFactory
to construct a response.

Parameters:
request - - The request being made
Returns:
RpcResponse - the response that is returned
Throws:
VistaLinkFaultException - - thrown if an error occurred on M while processing the request
FoundationsException - - thrown if an internal adapter exception has occurred

getMetaData

public ConnectionMetaData getMetaData()
                               throws ResourceException
Method getMetaData
Gets the meta-information on the underlying EIS instance via this connection

Returns:
ConnectionMetaData - the value object that contains
the metadata for this adapter
Throws:
ResourceException

getConnectionInfo

public gov.va.med.foundations.adapter.cci.VistaLinkServerInfo getConnectionInfo()
Method getConnectionInfo. Returns connection information
about the host

Returns:
VistaLinkServerInfo - the value object that contains connection
information

getManagedConnection

public VistaLinkManagedConnection getManagedConnection()
                                                throws FoundationsException
Method getManagedConnection.
This method should not be called directly. Used by spi classes.

Returns:
VistaLinkManagedConnection - the managed connection
FoundationsException

setManagedConnection

public void setManagedConnection(VistaLinkManagedConnection mc)
Method setManagedConnection. This method should not be called directly. Used by spi classes.

Parameters:
mc -

createInteraction

public Interaction createInteraction()
                              throws ResourceException
Empty method. throws NotSupportedException

ResourceException
See Also:
javax.resource.cci.Connection#createInteraction()

getLocalTransaction

public LocalTransaction getLocalTransaction()
                                     throws ResourceException
Empty method. throws NotSupportedException

ResourceException
See Also:
javax.resource.cci.Connection#getLocalTransaction()

getResultSetInfo

public ResultSetInfo getResultSetInfo()
                               throws ResourceException
Empty method. throws NotSupportedException

ResourceException
See Also:
javax.resource.cci.Connection#getResultSetInfo()

VLJ Iteration II, v. 1.0.0.193

VistaLink Iteration II, v. 1.0.0.193