Class AS4EndpointDetailProviderBDXR2
java.lang.Object
com.helger.phase4.dynamicdiscovery.AS4EndpointDetailProviderBDXR2
- All Implemented Interfaces:
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final com.helger.peppol.smp.ISMPTransportProfile -
Constructor Summary
ConstructorsConstructorDescriptionAS4EndpointDetailProviderBDXR2(com.helger.smpclient.bdxr2.IBDXR2ServiceMetadataProvider aSMPClient) -
Method Summary
Modifier and TypeMethodDescriptionfinal com.helger.xsds.bdxr.smp2.ac.EndpointTypefinal com.helger.smpclient.bdxr2.IBDXR2ServiceMetadataProviderfinal com.helger.peppol.smp.ISMPTransportProfilevoidinit(com.helger.peppolid.IDocumentTypeIdentifier aDocTypeID, com.helger.peppolid.IProcessIdentifier aProcID, com.helger.peppolid.IParticipantIdentifier aReceiverID) The initialization method is always called, before the details are queried.setTransportProfile(com.helger.peppol.smp.ISMPTransportProfile aTP) Change the transport profile to be used.
-
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
- 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 toinit(IDocumentTypeIdentifier, IProcessIdentifier, IParticipantIdentifier).- Parameters:
aTP- The transport profile to be used. May not benull.- Returns:
- this for chaining.
-
getEndpoint
- Returns:
- The endpoint resolved. May only be non-
nullifinit(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:IAS4EndpointDetailProviderThe initialization method is always called, before the details are queried. This method may be called multiple times, so you may cache internally.- Specified by:
initin interfaceIAS4EndpointDetailProvider- Parameters:
aDocTypeID- document type ID. May not benull.aProcID- Process ID. May not benull.aReceiverID- Participant ID of the receiver. May not benull.- Throws:
com.helger.phase4.util.Phase4Exception- in case of error
-
getReceiverAPCertificate
@Nullable public X509Certificate getReceiverAPCertificate() throws com.helger.phase4.util.Phase4Exception- Specified by:
getReceiverAPCertificatein interfaceIAS4EndpointDetailProvider- Returns:
- The X509 AP Certificate of the receiver. May be
nullif 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:
getReceiverAPEndpointURLin interfaceIAS4EndpointDetailProvider- Returns:
- The AS4 endpoint URL of the receiver. May neither be
nullnor empty. - Throws:
com.helger.phase4.util.Phase4Exception- In case of an error in determining the endpoint URL.
-