VLJ Iteration II, v. 1.0.0.193

gov.va.med.foundations.rpc
Class RpcRequestFactory

java.lang.Object
  |
  +--gov.va.med.foundations.rpc.RpcRequestFactory

public class RpcRequestFactory
extends java.lang.Object

Factory class to creates instances of RpcRequest
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 respnse
 vResp = myConnection.executeRPC(vReq);
 
 //Work with the response ...
 
 
 

Version:
1.0.0.193
Author:
Application Modernization - Foundations Team

Constructor Summary
RpcRequestFactory()
           
 
Method Summary
static gov.va.med.foundations.rpc.RpcRequest getRpcRequest()
          Method getRpcRequest.
static gov.va.med.foundations.rpc.RpcRequest getRpcRequest(java.lang.String rpcContext)
          Method getRpcRequest.
static gov.va.med.foundations.rpc.RpcRequest getRpcRequest(java.lang.String rpcContext, java.lang.String rpcName)
          Method getRpcRequest.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RpcRequestFactory

public RpcRequestFactory()
Method Detail

getRpcRequest

public static gov.va.med.foundations.rpc.RpcRequest getRpcRequest()
                                                           throws FoundationsException
Method getRpcRequest.
Creates a RpcRequest with a null RpcContext and RpcName

Returns:
RpcRequest
Throws:
FoundationsException

getRpcRequest

public static gov.va.med.foundations.rpc.RpcRequest getRpcRequest(java.lang.String rpcContext)
                                                           throws FoundationsException
Method getRpcRequest.
Creates a RpcRequest with the specified RpcContext and a
null RpcName

Parameters:
rpcContext -
Returns:
RpcRequest
Throws:
FoundationsException

getRpcRequest

public static gov.va.med.foundations.rpc.RpcRequest getRpcRequest(java.lang.String rpcContext,
                                                                  java.lang.String rpcName)
                                                           throws FoundationsException
Method getRpcRequest.
Creates appropriate rpc request object to be passed into the connection.

Parameters:
rpcContext -
rpcName -
Returns:
RpcRequest
Throws:
FoundationsException

VLJ Iteration II, v. 1.0.0.193

VistaLink Iteration II, v. 1.0.0.193