com.mathworks.mps.client.rest

## Class MATLABResult<T>

- java.lang.Object
- - com.mathworks.mps.client.rest.MATLABResult<T>

- Type Parameters:
    `T` - Expected targetType.

      public class MATLABResult<T>
      extends java.lang.Object

  This class represents the outcome of the execution of a MATLAB function deployed on MATLAB Production Server. It can either return the result when the MATLAB function executes successfully or return a MATLAB error. This class wraps the HTTP response returned by the GET Result of Request request.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MATLABResult()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `<T> T` | `getResult()` Returns the result of the execution of a MATLAB function deployed on the MATLAB Production Server.
    `static MATLABResult` | `newInstance(MATLABParams matlabParams, byte[] byteArray)` Creates a MATLABResult object after passing the required arguments.
    `static MATLABResult` | `newInstance(MATLABParams matlabParams, java.io.InputStream inputStream)` Creates a MATLABResult object after passing the required arguments.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### MATLABResult

          public MATLABResult()

  - ### Method Detail

    - #### newInstance

          public static MATLABResult newInstance(MATLABParams matlabParams,
                                                 java.io.InputStream inputStream)

      Creates a MATLABResult object after passing the required arguments.
      Parameters:
        `matlabParams` - `MATLABParams` object created during the initial POST request
        `inputStream` - Response body of the GET request that gets the result
      Returns:
        `MATLABResult` object

    - #### newInstance

          public static MATLABResult newInstance(MATLABParams matlabParams,
                                                 byte[] byteArray)

      Creates a MATLABResult object after passing the required arguments.
      Parameters:
        `matlabParams` - `MATLABParams` object created during the initial POST request
        `byteArray` - Response body of the GET request that gets the result
      Returns:
        `MATLABResult` object

    - #### getResult

          public <T> T getResult()
                          throws MATLABException

      Returns the result of the execution of a MATLAB function deployed on the MATLAB Production Server.
      Type Parameters:
        `T` - Expected targetType
      Returns:
        Result in the specified target type format
      Throws:
        `MATLABException` - If an error occurs during the execution of the MATLAB function

Copyright 2010-2022 The MathWorks, Inc.