Package org.drip.service.engine
Class ComputeClient
java.lang.Object
org.drip.service.engine.ComputeClient
public class ComputeClient
extends java.lang.Object
ComputeClient contains the Functionality behind the DROP API Compute Service Client. It provides
the following Functions:
- Construct Standard LocalHost-based Instance of the ComputeClient
- Retrieve the Compute Server Host
- Retrieve the Compute Server Port
- Establish a Connection to the Compute Server Engine
- Invoke a Request on the Compute Server and Retrieve the Response
- Entry Point
Module | Computational Core Module |
Library | Computation Support |
Project | Environment, Product/Definition Containers, and Scenario/State Manipulation APIs |
Package | Compute Engine Request-Response Thunker |
- Author:
- Lakshmi Krishnamurthy
-
Constructor Summary
Constructors Constructor Description ComputeClient(java.lang.String serverHost, int serverPort)
ComputeClient Constructor -
Method Summary
Modifier and Type Method Description boolean
initialize()
Establish a Connection to the Compute Server EngineJSONObject
invoke(JSONObject requestJSON)
Invoke a Request on the Compute Server and Retrieve the Responsestatic void
main(java.lang.String[] argumentArray)
Entry Pointjava.lang.String
serverHost()
Retrieve the Compute Server Hostint
serverPort()
Retrieve the Compute Server Portstatic ComputeClient
Standard()
Construct Standard LocalHost-based Instance of the ComputeClientMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
ComputeClient
public ComputeClient(java.lang.String serverHost, int serverPort) throws java.lang.ExceptionComputeClient Constructor- Parameters:
serverHost
- The Compute Server HostserverPort
- The Compute Server Port- Throws:
java.lang.Exception
- Thrown if the Inputs are Invalid
-
-
Method Details
-
Standard
Construct Standard LocalHost-based Instance of the ComputeClient- Returns:
- The Standard LocalHost-based Instance of the ComputeClient
-
serverHost
public java.lang.String serverHost()Retrieve the Compute Server Host- Returns:
- The Compute Server Host
-
serverPort
public int serverPort()Retrieve the Compute Server Port- Returns:
- The Compute Server Port
-
initialize
public boolean initialize()Establish a Connection to the Compute Server Engine- Returns:
- TRUE - Connection to the Compute Server Engine Established
-
invoke
Invoke a Request on the Compute Server and Retrieve the Response- Parameters:
requestJSON
- The Input JSON Request- Returns:
- The Processed JSON Response
-
main
public static final void main(java.lang.String[] argumentArray) throws java.lang.ExceptionEntry Point- Parameters:
argumentArray
- Argument Array- Throws:
java.lang.Exception
- Propagate Exception Encountered
-