Package com.helger.phase4.sender
Class AbstractAS4UserMessageBuilderMIMEPayload<IMPLTYPE extends AbstractAS4UserMessageBuilderMIMEPayload<IMPLTYPE>>
java.lang.Object
com.helger.phase4.sender.AbstractAS4MessageBuilder<IMPLTYPE>
com.helger.phase4.sender.AbstractAS4UserMessageBuilder<IMPLTYPE>
com.helger.phase4.sender.AbstractAS4UserMessageBuilderMIMEPayload<IMPLTYPE>
- Type Parameters:
IMPLTYPE- The implementation type
- All Implemented Interfaces:
com.helger.commons.traits.IGenericImplTrait<IMPLTYPE>
- Direct Known Subclasses:
AS4Sender.BuilderUserMessage
@NotThreadSafe
public abstract class AbstractAS4UserMessageBuilderMIMEPayload<IMPLTYPE extends AbstractAS4UserMessageBuilderMIMEPayload<IMPLTYPE>>
extends AbstractAS4UserMessageBuilder<IMPLTYPE>
Abstract builder base class for a user messages that put the payload in a
MIME part.
- Since:
- 0.10.0
- Author:
- Philip Helger
-
Nested Class Summary
Nested classes/interfaces inherited from class com.helger.phase4.sender.AbstractAS4UserMessageBuilder
AbstractAS4UserMessageBuilder.ESimpleUserMessageSendResult -
Field Summary
FieldsFields inherited from class com.helger.phase4.sender.AbstractAS4UserMessageBuilder
m_aAttachments, m_aMessageProperties, m_aPMode, m_aSignalMsgConsumer, m_bForceMimeMessage, m_sAction, m_sAgreementRef, m_sConversationID, m_sEndpointURL, m_sFromPartyID, m_sFromPartyIDType, m_sFromRole, m_sPModeID, m_sService, m_sServiceType, m_sToPartyID, m_sToPartyIDType, m_sToRoleFields inherited from class com.helger.phase4.sender.AbstractAS4MessageBuilder
DEFAULT_LOCALE, m_aBuildMessageCallback, m_aCryptoFactoryCrypt, m_aCryptoFactorySign, m_aCryptParams, m_aCustomHttpPoster, m_aDecryptParameterModifier, m_aHttpClientFactory, m_aHttpRetrySettings, m_aIncomingDumper, m_aLocale, m_aOutgoingDumper, m_aResponseConsumer, m_aRetryCallback, m_aSendingDateTime, m_aSendingDTConsumer, m_aSigningParams, m_eSoapVersion, m_sMessageID, m_sRefToMessageID -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreate a new builder, with some fields already set as outlined inAbstractAS4UserMessageBuilder() -
Method Summary
Modifier and TypeMethodDescriptionprotected WSS4JAttachmentcreateMainAttachment(AS4OutgoingAttachment aPayload, AS4ResourceHelper aResHelper) Create the main attachment.protected WSS4JAttachmentcreateOtherAttachment(AS4OutgoingAttachment aPayload, AS4ResourceHelper aResHelper, int nAttachmentIndex) Create another attachment that is not "main".booleanprotected final voidSynchronously send the AS4 message.final AS4OutgoingAttachmentpayload()final IMPLTYPEpayload(AS4OutgoingAttachment aPayload) Set the payload to be send out.final IMPLTYPEpayload(AS4OutgoingAttachment.Builder aBuilder) Set the payload to be send out.Methods inherited from class com.helger.phase4.sender.AbstractAS4UserMessageBuilder
action, addAttachment, addAttachment, addMessageProperty, addMessageProperty, addMessageProperty, agreementRef, applyToUserMessage, attachment, attachment, attachments, attachments, conversationID, endpointURL, forceMimeMessage, fromPartyID, fromPartyIDType, fromRole, messageProperties, messageProperties, messageProperty, messageProperty, messageProperty, pmode, pmode, pmodeID, receiverCertificate, receiverCertificateAlias, sendMessageAndCheckForReceipt, sendMessageAndCheckForReceipt, service, service, signalMsgConsumer, toPartyID, toPartyIDType, toRoleMethods inherited from class com.helger.phase4.sender.AbstractAS4MessageBuilder
afterSuccessfulSending, buildMessageCallback, cryptoFactory, cryptoFactory, cryptoFactoryCrypt, cryptoFactoryCrypt, cryptoFactorySign, cryptoFactorySign, cryptParams, customHttpPoster, customHttpPoster, customizeBeforeSending, decryptRequestDataModifier, finishFields, httpClientFactory, httpClientFactory, httpClientFactory, httpRetrySettings, incomingAttachmentFactory, incomingAttachmentFactory, incomingDumper, incomingProfileSelector, incomingProfileSelector, locale, messageID, outgoingDumper, pmodeResolver, pmodeResolver, rawResponseConsumer, refToMessageID, retryCallback, senderInterrupt, senderInterrupt, sendingDateTime, sendingDateTimeConsumer, sendingDateTimeConsumer, sendMessage, signingParams, soapVersion, soapVersion, withCryptParams, withSigningParamsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.helger.commons.traits.IGenericImplTrait
thisAsT
-
Field Details
-
m_aPayload
-
-
Constructor Details
-
AbstractAS4UserMessageBuilderMIMEPayload
protected AbstractAS4UserMessageBuilderMIMEPayload()Create a new builder, with some fields already set as outlined inAbstractAS4UserMessageBuilder()
-
-
Method Details
-
payload
Set the payload to be send out.- Parameters:
aBuilder- The payload builder to be used. May benull.- Returns:
- this for chaining
-
payload
Set the payload to be send out.- Parameters:
aPayload- The payload to be used. May benull.- Returns:
- this for chaining
-
payload
- Returns:
- The currently set outgoing attachment payload. May be
null. - Since:
- 2.5.0
-
isEveryRequiredFieldSet
- Overrides:
isEveryRequiredFieldSetin classAbstractAS4UserMessageBuilder<IMPLTYPE extends AbstractAS4UserMessageBuilderMIMEPayload<IMPLTYPE>>
-
createMainAttachment
@Nullable @OverrideOnDemand protected WSS4JAttachment createMainAttachment(@Nonnull AS4OutgoingAttachment aPayload, @Nonnull AS4ResourceHelper aResHelper) throws IOException Create the main attachment. This is mainly intended for ENTSOG/BDEW to add some custom properties.- Parameters:
aPayload- The outgoing main attachment as provided to the builder. Nevernull.saResHelper- The resource helper to use for temporary files etc. Nevernull.- Returns:
- May be
nullto indicate not to use the main payload - Throws:
IOException- in case of error- Since:
- 2.2.2
-
createOtherAttachment
@Nullable @OverrideOnDemand protected WSS4JAttachment createOtherAttachment(@Nonnull AS4OutgoingAttachment aPayload, @Nonnull AS4ResourceHelper aResHelper, @Nonnegative int nAttachmentIndex) throws IOException Create another attachment that is not "main". This is mainly intended for ENTSOG to add some custom properties.- Parameters:
aPayload- The outgoing main attachment as provided to the builder. Nevernull.saResHelper- The resource helper to use for temporary files etc. Nevernull.nAttachmentIndex- 0-based attachment index. Always ≥ 0.- Returns:
- May be
nullto indicate not to use the payload - Throws:
IOException- in case of error- Since:
- 2.4.0
-
mainSendMessage
Description copied from class:AbstractAS4MessageBuilderSynchronously send the AS4 message. This method may only be called byAbstractAS4MessageBuilder.sendMessage()- Specified by:
mainSendMessagein classAbstractAS4MessageBuilder<IMPLTYPE extends AbstractAS4UserMessageBuilderMIMEPayload<IMPLTYPE>>- Throws:
Phase4Exception- In case of any error
-