VLJ Iteration II, v. 1.0.0.193

gov.va.med.foundations.rpc
Class RpcRequestParams

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

public class RpcRequestParams
extends java.lang.Object

Represents the the collection of parameters associated with an RPC.
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 STRING";
 
  //Construct the request object
 vReq = RpcRequestFactory.getRpcRequest(rpcContext, rpcName);
 
 
 //clear the params 	
 vReq.clearParams();
 
 //Set the params
 vReq.getParams(). setParam(1, "string", "This is a test string!");
 
 
 //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

Method Summary
 java.lang.Object getParam(int position)
          Method getParam.
 void setParam(int position, java.lang.String type, java.lang.Object value)
          Method setParam.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getParam

public java.lang.Object getParam(int position)
Method getParam.
Gets the value for a parameter associated with a specified
position in the parameters collection.
Normally, this method is not used by the client.
A return value of null indicates the there is no parameter for the position. .

Parameters:
position - parameter position the M RPC expects this parameter
Returns:
Object String or Map

setParam

public void setParam(int position,
                     java.lang.String type,
                     java.lang.Object value)
Method setParam.
Sets a parameter needed by for a M RPC call.

The position argument is the parameter list position where the RPC
expects to see this argument. The type argument indicates to VistALink how the argument should be processed
on the M VistA server.

Possible values are the following:

Parameters:
position - parameter position the M RPC expects this parameter
type - type of parameter corresponding to valid M RPC types
value - value of parameter

VLJ Iteration II, v. 1.0.0.193

VistaLink Iteration II, v. 1.0.0.193