VistALink v1.6

gov.va.med.vistalink.adapter.cci
Interface VistaLinkConnection

All Superinterfaces:
javax.resource.cci.Connection

public interface VistaLinkConnection
extends javax.resource.cci.Connection

This interface represents an application level connection handle that is used by a component to access an EIS instance.

J2SE Example:

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


Method Summary
 gov.va.med.vistalink.adapter.record.VistaLinkResponseVO executeInteraction(VistaLinkRequestVO requestVO, gov.va.med.vistalink.adapter.record.VistaLinkResponseFactory responseFactory)
          Executes an interaction with M.
 RpcResponse executeRPC(RpcRequest request)
          Executes an interaction with M using the RpcResponseFactory to construct a response.
 VistaLinkServerInfo getConnectionInfo()
          Returns connection information about the host.
 int getTimeOut()
          Returns current connection time out value
 void setTimeOut(int timeOut)
          Enables application to set time out for read operations on connections.
 
Methods inherited from interface javax.resource.cci.Connection
close, createInteraction, getLocalTransaction, getMetaData, getResultSetInfo
 

Method Detail

executeInteraction

gov.va.med.vistalink.adapter.record.VistaLinkResponseVO executeInteraction(VistaLinkRequestVO requestVO,
                                                                           gov.va.med.vistalink.adapter.record.VistaLinkResponseFactory responseFactory)
                                                                           throws VistaLinkFaultException,
                                                                                  FoundationsException
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
 
NOT FOR PUBLIC USE
This constructor, method or field is not for public use.

executeRPC

RpcResponse executeRPC(RpcRequest request)
                       throws VistaLinkFaultException,
                              FoundationsException
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

getConnectionInfo

VistaLinkServerInfo getConnectionInfo()
Returns connection information about the host. The return value represents M VistA information for the connection, like address and port. For developer debugging.

Returns:
VistaLinkServerInfo the value object that contains connection information

getTimeOut

int getTimeOut()
Returns current connection time out value

Returns:
int time out value in milli-seconds

setTimeOut

void setTimeOut(int timeOut)
Enables application to set time out for read operations on connections.

Parameters:
timeOut - time out value to set in milli-seconds. This timeout value is compared to the default value usually used for the connection. The greater of the two values will be used.

VistALink v1.6

VistALink v1.6