org.apache.sysds.runtime.controlprogram.federated

## Class FederatedResponse

- java.lang.Object
- - org.apache.sysds.runtime.controlprogram.federated.FederatedResponse

- All Implemented Interfaces:
    Serializable

      public class FederatedResponse
      extends Object
      implements Serializable

  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `FederatedResponse.ResponseType`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FederatedResponse(FederatedResponse.ResponseType status)`
    `FederatedResponse(FederatedResponse.ResponseType status, Object data)`
    `FederatedResponse(FederatedResponse.ResponseType status, Object[] data)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Object[]` | `getData()`
    `String` | `getErrorMessage()`
    `boolean` | `isSuccessful()`
    `void` | `setCheckedConstraints(Map<PrivacyConstraint.PrivacyLevel,LongAdder> checkedConstraints)` Set checked privacy constraints in response if the provided map is not empty.
    `void` | `throwExceptionFromResponse()` Checks the data object array for exceptions that occurred in the federated worker during handling of request.
    `void` | `updateCheckedConstraintsLog()`

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

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

- - ### Constructor Detail

    - #### FederatedResponse

          public FederatedResponse(FederatedResponse.ResponseType status)

    - #### FederatedResponse

          public FederatedResponse(FederatedResponse.ResponseType status,
                                   Object[] data)

    - #### FederatedResponse

          public FederatedResponse(FederatedResponse.ResponseType status,
                                   Object data)

  - ### Method Detail

    - #### isSuccessful

          public boolean isSuccessful()

    - #### getErrorMessage

          public String getErrorMessage()

    - #### getData

          public Object[] getData()
                           throws Exception

      Throws:
        `Exception`

    - #### throwExceptionFromResponse

          public void throwExceptionFromResponse()
                                          throws Exception

      Checks the data object array for exceptions that occurred in the federated worker during handling of request.
      Throws:
        `Exception` - the exception retrieved from the data object array or DMLRuntimeException if no exception is provided by the federated worker.

    - #### setCheckedConstraints

          public void setCheckedConstraints(Map<PrivacyConstraint.PrivacyLevel,LongAdder> checkedConstraints)

      Set checked privacy constraints in response if the provided map is not empty. If the map is empty, it means that no privacy constraints were found.
      Parameters:
        `checkedConstraints` - map of checked constraints from the PrivacyMonitor

    - #### updateCheckedConstraintsLog

          public void updateCheckedConstraintsLog()

Copyright © 2020 The Apache Software Foundation. All rights reserved.