VistALink v1.6

gov.va.med.vistalink.rpc
Class RpcRequest

java.lang.Object
  extended by gov.va.med.vistalink.adapter.record.VistaLinkRequestVOImpl
      extended by gov.va.med.vistalink.rpc.RpcRequest
All Implemented Interfaces:
VistaLinkRequestVO

public class RpcRequest
extends VistaLinkRequestVOImpl

Represents a RPC request to an M VistA server.

This is the principal class of VLJ used by developers to create and setup requests to the host M server.

J2SE Example:

//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
static java.lang.String buildMultipleMSubscriptKey(java.lang.String keyValue)
          Builds and returns string that contains the following: an indicator that the value represents a multiple M subscript structure the actual multiple M subscript structure string value
 void clearParams()
          Clears the params associated with this instance of RpcRequest
 RpcRequestParams getParams()
          Gets the reference to the RpcRequestParamsobject associated with this request.
 java.lang.String getRequestString()
          Gets the proprietary or xml (depending on setting) request string to be sent to the M server.
 int getRpcClientTimeOut()
          Gets the current client time out value.
 java.lang.String getRpcContext()
          Gets the name of the RPC Context.
 java.lang.String getRpcName()
          Gets the name of the RPC.
 double getRpcVersion()
          Gets the current RPC version specified by application
 boolean isUseProprietaryMessageFormat()
          Deprecated. For internal testing only!
 boolean isXmlResponse()
          Indicates whether the returned value from the RPC call is expected in XML format or not.
 void setParams(java.util.List list)
          Sets all the parameters for a RPC call at once using a List.
 void setReAuthenticateInfo(gov.va.med.vistalink.adapter.cci.VistaLinkConnectionSpecImpl connSpec, gov.va.med.vistalink.adapter.spi.EMReAuthState reAuthState, gov.va.med.vistalink.adapter.spi.EMAdapterEnvironment theAdapterEnvironment)
           
 void setRpcClientTimeOut(int value)
          Sets the client time out value.
 void setRpcContext(java.lang.String value)
          Sets the name of the RPC Context to be used.
 void setRpcName(java.lang.String value)
          Sets the name of the RPC to be called on the M server.
 void setRpcVersion(double value)
          Sets the RPC version number Note: Like parameters, it is up to the application code to set this property appropriately for each RPC request made using the RpcRequest instance.
 void setUseProprietaryMessageFormat(boolean useSink)
          Set the indicator that the RPC request should be sent to the M server in a proprietary format (true) or in XML format (false).
 void setXmlResponse(boolean value)
          Sets the indicator that the returned value from the RPC call is expected in XML format or not.
 
Methods inherited from class gov.va.med.vistalink.adapter.record.VistaLinkRequestVOImpl
getRetryStrategy, getTimeOut, setRetryStrategy, setTimeOut
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getParams

public RpcRequestParams getParams()
Gets the reference to the RpcRequestParamsobject associated with this request.

This object contains the parameters sent with the call to the RPC during the getResponse() call. Use this object to set these parameters before calling getResponse().

Returns:
RpcRequestParams

setParams

public void setParams(java.util.List list)
Sets all the parameters for a RPC call at once using a List.

Parameters:
list -

buildMultipleMSubscriptKey

public static java.lang.String buildMultipleMSubscriptKey(java.lang.String keyValue)
Builds and returns string that contains the following:

Parameters:
keyValue - Value representing the multiple M subscript structure
Returns:
flagged key value to be used as HashMap key

clearParams

public void clearParams()
Clears the params associated with this instance of RpcRequest


getRpcName

public java.lang.String getRpcName()
Gets the name of the RPC.

Returns:
String

setRpcName

public void setRpcName(java.lang.String value)
Sets the name of the RPC to be called on the M server. The name must be a valid RPC name as it appears in the REMOTE PROCEDURE (#8994) file in M VistA.

Parameters:
value -

getRpcContext

public java.lang.String getRpcContext()
Gets the name of the RPC Context.

Returns:
String

setRpcContext

public void setRpcContext(java.lang.String value)
Sets the name of the RPC Context to be used. The name must be a valid B- type OPTION name as it appears in the OPTION (#19) file in M VistA.

Parameters:
value -

getRpcClientTimeOut

public int getRpcClientTimeOut()
Gets the current client time out value. (Value is returned in the number of seconds).

Returns:
int

setRpcClientTimeOut

public void setRpcClientTimeOut(int value)
Sets the client time out value. (Value is expected in seconds.)

Parameters:
value -

getRpcVersion

public double getRpcVersion()
Gets the current RPC version specified by application

Returns:
Returns the rpcVersion.

setRpcVersion

public void setRpcVersion(double value)
Sets the RPC version number Note: Like parameters, it is up to the application code to set this property appropriately for each RPC request made using the RpcRequest instance. To unset to default, set property to 0 (zero).

Parameters:
value - The RPC version to set.

getRequestString

public java.lang.String getRequestString()
                                  throws FoundationsException
Gets the proprietary or xml (depending on setting) request string to be sent to the M server.

Specified by:
getRequestString in interface VistaLinkRequestVO
Overrides:
getRequestString in class VistaLinkRequestVOImpl
Returns:
String
Throws:
FoundationsException

isXmlResponse

public boolean isXmlResponse()
Indicates whether the returned value from the RPC call is expected in XML format or not.

Returns:
boolean

setXmlResponse

public void setXmlResponse(boolean value)
Sets the indicator that the returned value from the RPC call is expected in XML format or not.

Parameters:
value - Whether XML is the expected type of result to be returned.

isUseProprietaryMessageFormat

public boolean isUseProprietaryMessageFormat()
Deprecated. For internal testing only!

Indicates whether the RPC request should be sent to the M server in a proprietary format (true) or in XML format (false).

Returns:
boolean

setUseProprietaryMessageFormat

public void setUseProprietaryMessageFormat(boolean useSink)
Set the indicator that the RPC request should be sent to the M server in a proprietary format (true) or in XML format (false).

Parameters:
useSink -

setReAuthenticateInfo

public void setReAuthenticateInfo(gov.va.med.vistalink.adapter.cci.VistaLinkConnectionSpecImpl connSpec,
                                  gov.va.med.vistalink.adapter.spi.EMReAuthState reAuthState,
                                  gov.va.med.vistalink.adapter.spi.EMAdapterEnvironment theAdapterEnvironment)
Parameters:
connSpec -
reAuthState -
theAdapterEnvironment -
 
NOT FOR PUBLIC USE
This constructor, method or field is not for public use.

VistALink v1.6

VistALink v1.6