Package com.helger.phase4.incoming.spi
Class AS4MessageProcessorResult
java.lang.Object
com.helger.phase4.incoming.spi.AS4MessageProcessorResult
- All Implemented Interfaces:
com.helger.commons.state.ISuccessIndicator
- Direct Known Subclasses:
AS4SignalMessageProcessorResult
@Immutable
public class AS4MessageProcessorResult
extends Object
implements com.helger.commons.state.ISuccessIndicator
This class represents the result of a message processor SPI
implementation.
Note: cannot be serializable because WSS4JAttachment is not serializable
Note: cannot be serializable because WSS4JAttachment is not serializable
- Author:
- Philip Helger
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAS4MessageProcessorResult(com.helger.commons.state.ESuccess eSuccess, com.helger.commons.collection.impl.ICommonsList<WSS4JAttachment> aAttachments, String sAsyncResponseURL) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAllAttachmentsTo(Collection<? super WSS4JAttachment> aTarget) Add all attachments contained in this object onto the provided target collection.static AS4MessageProcessorResultCreate a negative response.static AS4MessageProcessorResultstatic AS4MessageProcessorResultcreateSuccessExt(com.helger.commons.collection.impl.ICommonsList<WSS4JAttachment> aAttachments, String sAsyncResponseURL) Create a success message with optional attachments.com.helger.commons.collection.impl.ICommonsList<WSS4JAttachment> booleanbooleanbooleantoString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.helger.commons.state.ISuccessIndicator
and, isFailure, or
-
Constructor Details
-
AS4MessageProcessorResult
protected AS4MessageProcessorResult(@Nonnull com.helger.commons.state.ESuccess eSuccess, @Nullable com.helger.commons.collection.impl.ICommonsList<WSS4JAttachment> aAttachments, @Nullable String sAsyncResponseURL) - Parameters:
eSuccess- Success or failure. May not benull.aAttachments- The response attachments. May benull.sAsyncResponseURL- The asynchronous response URLs. May benull.
-
-
Method Details
-
isSuccess
public boolean isSuccess()- Specified by:
isSuccessin interfacecom.helger.commons.state.ISuccessIndicator
-
getAllAttachments
@Nonnull @ReturnsMutableCopy public com.helger.commons.collection.impl.ICommonsList<WSS4JAttachment> getAllAttachments() -
hasAttachments
public boolean hasAttachments() -
addAllAttachmentsTo
Add all attachments contained in this object onto the provided target collection.- Parameters:
aTarget- The target collection. May not benull.
-
getAsyncResponseURL
- Returns:
- The asynchronous response URL. May be
null.
-
hasAsyncResponseURL
public boolean hasAsyncResponseURL()- Returns:
trueif an asynchronous response URL is present,falseotherwise.
-
toString
-
createSuccess
- Returns:
- A new success object. No attachments, no nothing.
-
createSuccessExt
@Nonnull public static AS4MessageProcessorResult createSuccessExt(@Nullable com.helger.commons.collection.impl.ICommonsList<WSS4JAttachment> aAttachments, @Nullable String sAsyncResponseURL) Create a success message with optional attachments. Usually you don't need this. Just callcreateSuccess()and you are fine.- Parameters:
aAttachments- Optional list of RESPONSE (!) attachments. Don't put the incoming attachments here.sAsyncResponseURL- The optional asynchronous response URL.- Returns:
- Never
null. - Since:
- 0.9.7
- See Also:
-
createFailure
Create a negative response.- Returns:
- Never
null. - Since:
- 2.3.0
-