Skip to content

Commit

Permalink
Improved docs
Browse files Browse the repository at this point in the history
  • Loading branch information
phax committed Oct 22, 2024
1 parent f70a2a9 commit 0707a67
Showing 1 changed file with 16 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@
import com.helger.phase4.util.AS4ResourceHelper;
import com.helger.phase4.util.AS4XMLHelper;
import com.helger.phase4.util.Phase4Exception;
import com.helger.phase4.v3.ChangePhase4V3;
import com.helger.photon.io.PhotonWorkerPool;
import com.helger.xml.serialize.write.XMLWriter;

Expand Down Expand Up @@ -297,6 +298,7 @@ public void applyToResponse (@Nonnull final IAS4ResponseAbstraction aHttpRespons
* @author Philip Helger
* @since 0.13.1
*/
@ChangePhase4V3 ("Rename")
public interface ISoapProcessingFinalizedCallback
{
/**
Expand Down Expand Up @@ -799,7 +801,9 @@ public final IAS4RequestHandlerErrorConsumer getErrorConsumer ()
/**
* Set an optional error consumer that is invoked with all errors determined
* during message processing. The consumed list MUST NOT be modified.<br>
* Note: the error consumer is ONLY called if the error list is non-empty.
* Note: the error consumer is ONLY called if the error list is non-empty.<br>
* Note: the AS4 error message is sent back automatically - this is just
* informational.
*
* @param aErrorConsumer
* The consumer to be used. May be <code>null</code>.
Expand Down Expand Up @@ -859,9 +863,8 @@ private void _invokeSPIsForIncoming (@Nonnull final HttpHeaderMap aHttpHeaders,
"Only one of User OR Signal Message may be present");

final boolean bIsUserMessage = aEbmsUserMessage != null;
final String sMessageID = bIsUserMessage ? aEbmsUserMessage.getMessageInfo ().getMessageId () : aEbmsSignalMessage
.getMessageInfo ()
.getMessageId ();
final String sMessageID = bIsUserMessage ? aEbmsUserMessage.getMessageInfo ().getMessageId ()
: aEbmsSignalMessage.getMessageInfo ().getMessageId ();

// Get all processors
final ICommonsList <IAS4IncomingMessageProcessorSPI> aAllProcessors = m_aProcessorSupplier.get ();
Expand Down Expand Up @@ -1084,8 +1087,8 @@ private void _invokeSPIsForResponse (@Nonnull final IAS4IncomingMessageState aIn
byte [] aResponsePayload = null;
if (aResponseFactory != null)
{
final HttpEntity aRealHttpEntity = aHttpEntity != null ? aHttpEntity : aResponseFactory.getHttpEntityForSending (
aMimeType);
final HttpEntity aRealHttpEntity = aHttpEntity != null ? aHttpEntity
: aResponseFactory.getHttpEntityForSending (aMimeType);
if (aRealHttpEntity.isRepeatable ())
{
int nContentLength = (int) aRealHttpEntity.getContentLength ();
Expand Down Expand Up @@ -1364,7 +1367,8 @@ private IAS4ResponseFactory _createResponseReceiptMessage (@Nonnull final IAS4In
aUserMessage,
aSoapDocument,
_isSendNonRepudiationInformation (aEffectiveLeg),
null).setMustUnderstand (true);
null)
.setMustUnderstand (true);

final ESoapVersion eResponseSoapVersion = aEffectiveLeg.getProtocol ().getSoapVersion ();
if (eResponseSoapVersion != eSoapVersion)
Expand Down Expand Up @@ -1836,8 +1840,9 @@ private IAS4ResponseFactory _handleSoapMessage (@Nonnull final HttpHeaderMap aHt
new ResponseHandlerXml ());
}
AS4HttpDebug.debug ( () -> "SEND-RESPONSE [async sent] received: " +
(aAsyncResponse == null ? "null" : XMLWriter.getNodeAsString (aAsyncResponse,
AS4HttpDebug.getDebugXMLWriterSettings ())));
(aAsyncResponse == null ? "null"
: XMLWriter.getNodeAsString (aAsyncResponse,
AS4HttpDebug.getDebugXMLWriterSettings ())));
};

final CompletableFuture <Void> aFuture = PhotonWorkerPool.getInstance ()
Expand Down Expand Up @@ -2055,8 +2060,8 @@ public void handleRequest (@Nonnull @WillClose final InputStream aRequestInputSt
if (aResponder != null)
{
// Response present -> send back
final IAS4OutgoingDumper aRealOutgoingDumper = m_aOutgoingDumper != null ? m_aOutgoingDumper : AS4DumpManager
.getOutgoingDumper ();
final IAS4OutgoingDumper aRealOutgoingDumper = m_aOutgoingDumper != null ? m_aOutgoingDumper
: AS4DumpManager.getOutgoingDumper ();
aResponder.applyToResponse (aHttpResponse, aRealOutgoingDumper);
}
else
Expand Down

0 comments on commit 0707a67

Please sign in to comment.