Class AS4EndpointDetailProviderBDXR2

java.lang.Object
com.helger.phase4.dynamicdiscovery.AS4EndpointDetailProviderBDXR2
All Implemented Interfaces:
IAS4EndpointDetailProvider

public class AS4EndpointDetailProviderBDXR2 extends Object implements IAS4EndpointDetailProvider
Implementation of IAS4EndpointDetailProvider using an OASIS BDXR SMP v2 Client to determine this information from an endpoint.
Since:
0.10.6
Author:
Philip Helger
  • Field Details

    • DEFAULT_TRANSPORT_PROFILE

      public static final com.helger.peppol.smp.ISMPTransportProfile DEFAULT_TRANSPORT_PROFILE
  • Constructor Details

    • AS4EndpointDetailProviderBDXR2

      public AS4EndpointDetailProviderBDXR2(@Nonnull com.helger.smpclient.bdxr2.IBDXR2ServiceMetadataProvider aSMPClient)
  • Method Details

    • getServiceMetadataProvider

      @Nonnull public final com.helger.smpclient.bdxr2.IBDXR2ServiceMetadataProvider getServiceMetadataProvider()
      Returns:
      The service metadata provider passed in the constructor. Never null.
    • getTransportProfile

      @Nonnull public final com.helger.peppol.smp.ISMPTransportProfile getTransportProfile()
      Returns:
      The transport profile to be used. Defaults to DEFAULT_TRANSPORT_PROFILE.
    • setTransportProfile

      @Nonnull public final AS4EndpointDetailProviderBDXR2 setTransportProfile(@Nonnull com.helger.peppol.smp.ISMPTransportProfile aTP)
      Change the transport profile to be used. This only has an effect if it is called prior to init(IDocumentTypeIdentifier, IProcessIdentifier, IParticipantIdentifier).
      Parameters:
      aTP - The transport profile to be used. May not be null.
      Returns:
      this for chaining.
    • getEndpoint

      @Nullable public final com.helger.xsds.bdxr.smp2.ac.EndpointType getEndpoint()
      Returns:
      The endpoint resolved. May only be non-null if init(IDocumentTypeIdentifier, IProcessIdentifier, IParticipantIdentifier) was called.
    • init

      public void init(@Nonnull com.helger.peppolid.IDocumentTypeIdentifier aDocTypeID, @Nonnull com.helger.peppolid.IProcessIdentifier aProcID, @Nonnull com.helger.peppolid.IParticipantIdentifier aReceiverID) throws com.helger.phase4.util.Phase4Exception
      Description copied from interface: IAS4EndpointDetailProvider
      The initialization method is always called, before the details are queried. This method may be called multiple times, so you may cache internally.
      Specified by:
      init in interface IAS4EndpointDetailProvider
      Parameters:
      aDocTypeID - document type ID. May not be null.
      aProcID - Process ID. May not be null.
      aReceiverID - Participant ID of the receiver. May not be null.
      Throws:
      com.helger.phase4.util.Phase4Exception - in case of error
    • getReceiverAPCertificate

      @Nullable public X509Certificate getReceiverAPCertificate() throws com.helger.phase4.util.Phase4Exception
      Specified by:
      getReceiverAPCertificate in interface IAS4EndpointDetailProvider
      Returns:
      The X509 AP Certificate of the receiver. May be null if it could not be acquired.
      Throws:
      com.helger.phase4.util.Phase4Exception - In case of an error in determining the certificate.
    • getReceiverAPEndpointURL

      @Nonnull @Nonempty public String getReceiverAPEndpointURL() throws com.helger.phase4.util.Phase4Exception
      Specified by:
      getReceiverAPEndpointURL in interface IAS4EndpointDetailProvider
      Returns:
      The AS4 endpoint URL of the receiver. May neither be null nor empty.
      Throws:
      com.helger.phase4.util.Phase4Exception - In case of an error in determining the endpoint URL.