Package org.apache.sling.distribution
Interface DistributionResponse
-
@ProviderType public interface DistributionResponse
ADistributionResponse
represents the outcome of aDistributionRequest
as handled by a certain distribution agent. Such a response will include thestate
of therequest
and optionally a message for more verbose information about the outcome of the request and additionalproperties
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DistributionResponseInfo
getDistributionInfo()
returns additional properties related to theDistributionRequest
java.lang.String
getMessage()
returns a verbose message of the responseDistributionRequestState
getState()
returns the state of the associatedDistributionRequest
boolean
isSuccessful()
returns the status of the request, whether it is successful or not.
-
-
-
Method Detail
-
isSuccessful
boolean isSuccessful()
returns the status of the request, whether it is successful or not. A successful request it is not necessarily distributed, it is just successfully received by the agent. To check the exact state of the request one can retrieve it withgetState
- Returns:
true
if request has been accepted by the agent.
-
getState
@Nonnull DistributionRequestState getState()
returns the state of the associatedDistributionRequest
- Returns:
- the state of the associated request
-
getMessage
@Nullable java.lang.String getMessage()
returns a verbose message of the response- Returns:
- a message associated with this response holding information about e.g. why distribution execution failed, etc.
-
getDistributionInfo
@Nonnull DistributionResponseInfo getDistributionInfo()
returns additional properties related to theDistributionRequest
- Returns:
- additional properties
-
-