Package 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
Description
`static enum`
`FederatedResponse.ResponseType`

## Constructor Summary

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

## Method Summary

Modifier and Type
Method
Description
`long`
`estimateSerializationBufferSize()`
`Object[]`
`getData()`
`String`
`getErrorMessage()`
`LineageItem`
`getLineageItem()`
`boolean`
`isSuccessful()`
`void`
`throwExceptionFromResponse()`
Checks the data object array for exceptions that occurred in the federated worker during handling of request.
`String`
`toString()`

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

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

## Constructor Details

### FederatedResponse

public FederatedResponse(FederatedResponse.ResponseType status)

### FederatedResponse

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

### FederatedResponse

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

### FederatedResponse

public FederatedResponse(FederatedResponse.ResponseType status, Object data)

### FederatedResponse

public FederatedResponse(FederatedResponse.ResponseType status, Object data, LineageItem linItem)

## Method Details

### isSuccessful

public boolean isSuccessful()

### getErrorMessage

public String getErrorMessage()

### getData

public Object[] getData() throws Exception

Throws:
  `Exception`

### estimateSerializationBufferSize

public long estimateSerializationBufferSize()

### 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.

### getLineageItem

public LineageItem getLineageItem()

### toString

public String toString()

Overrides:
  `toString` in class `Object`