public class FederatedResponse extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
static class |
FederatedResponse.ResponseType |
Constructor and Description |
---|
FederatedResponse(FederatedResponse.ResponseType status) |
FederatedResponse(FederatedResponse.ResponseType status,
Object data) |
FederatedResponse(FederatedResponse.ResponseType status,
Object[] data) |
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() |
public FederatedResponse(FederatedResponse.ResponseType status)
public FederatedResponse(FederatedResponse.ResponseType status, Object[] data)
public FederatedResponse(FederatedResponse.ResponseType status, Object data)
public boolean isSuccessful()
public String getErrorMessage()
public void throwExceptionFromResponse() throws Exception
Exception
- the exception retrieved from the data object array
or DMLRuntimeException if no exception is provided by the federated worker.public void setCheckedConstraints(Map<PrivacyConstraint.PrivacyLevel,LongAdder> checkedConstraints)
checkedConstraints
- map of checked constraints from the PrivacyMonitorpublic void updateCheckedConstraintsLog()
Copyright © 2021 The Apache Software Foundation. All rights reserved.