VLJ Iteration II, v. 1.0.0.193

gov.va.med.foundations.rpc
Class RpcReferenceType

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

public class RpcReferenceType
extends java.lang.Object

Represents a reference type object for an RPC parameter.
Used mainly for RpcRequest.setParams() call to represent a
'reference' type parameter.
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 = "XWB GET VARIABLE VALUE";
 
  //Construct the request object
 vReq = RpcRequestFactory.getRpcRequest(rpcContext, rpcName);
 
 //clear the params 	
 vReq.clearParams()
 
 
 //Create an arraylist for the params
 ArrayList params = new ArrayList();
 
 //Clear the arraylist
 params.clear();
 
 //add a new VistaRpcReferenceType to the array list
  params.add(new VistaRpcReferenceType("DTIME"));
 
 //Add the araylist with the VistaRpcReferenceType to the request as a param
 vReq. setParams(params);
 
 //An alternate way of doing the above
 vReq.getParams().setParam(1, "ref", "DT");
 
 
 
 //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
RpcReferenceType()
          Default constructor
RpcReferenceType(java.lang.String value)
          Method VistaRpcReferenceType.
 
Method Summary
 java.lang.String getValue()
          Returns name of the variable desired in the M server partition.
 void setValue(java.lang.String value)
          Sets the value to the name of the variable desired in the M server partition.
 java.lang.String toString()
          Returns name of the variable desired in the M server partition.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RpcReferenceType

public RpcReferenceType()
Default constructor


RpcReferenceType

public RpcReferenceType(java.lang.String value)
Method VistaRpcReferenceType.
Constructs this instance with the specified value

Parameters:
value - Name of variable to be referenced, like DUZ
Method Detail

getValue

public java.lang.String getValue()
Returns name of the variable desired in the M server partition.

Returns:
String

setValue

public void setValue(java.lang.String value)
Sets the value to the name of the variable desired in the M server partition.

Parameters:
value - The value to set

toString

public java.lang.String toString()
Returns name of the variable desired in the M server partition.

Overrides:
toString in class java.lang.Object
See Also:
Object.toString()

VLJ Iteration II, v. 1.0.0.193

VistaLink Iteration II, v. 1.0.0.193