本文整理汇总了Java中com.helger.peppol.smp.ESMPTransportProfile类的典型用法代码示例。如果您正苦于以下问题:Java ESMPTransportProfile类的具体用法?Java ESMPTransportProfile怎么用?Java ESMPTransportProfile使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ESMPTransportProfile类属于com.helger.peppol.smp包,在下文中一共展示了ESMPTransportProfile类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: _getReceiverEndpoint
import com.helger.peppol.smp.ESMPTransportProfile; //导入依赖的package包/类
/**
* @param aRecipientID
* PEPPOL Recipient ID
* @param aDocTypeID
* PEPPOL document type ID
* @param aProcessID
* PEPPOL process ID
* @return The access point URL to be used or <code>null</code>
* @throws OpenAS2Exception
* In case the endpoint address could not be resolved.
*/
@Nullable
private static EndpointType _getReceiverEndpoint (@Nullable final IParticipantIdentifier aRecipientID,
@Nullable final IDocumentTypeIdentifier aDocTypeID,
@Nullable final IProcessIdentifier aProcessID,
@Nonnull final String sMessageID) throws OpenAS2Exception
{
// Get configured client
final SMPClientReadOnly aSMPClient = AS2PeppolServletConfiguration.getSMPClient ();
if (aSMPClient == null)
throw new OpenAS2Exception (sMessageID + " No SMP client configured!");
if (aRecipientID == null || aDocTypeID == null || aProcessID == null)
return null;
try
{
if (s_aLogger.isDebugEnabled ())
{
s_aLogger.debug (sMessageID +
" Looking up the endpoint of recipient " +
aRecipientID.getURIEncoded () +
" at SMP URL '" +
aSMPClient.getSMPHostURI () +
"' for " +
aRecipientID.getURIEncoded () +
" and " +
aDocTypeID.getURIEncoded () +
" and " +
aProcessID.getURIEncoded ());
}
// Query the SMP
return aSMPClient.getEndpoint (aRecipientID, aDocTypeID, aProcessID, ESMPTransportProfile.TRANSPORT_PROFILE_AS2);
}
catch (final Throwable t)
{
throw new OpenAS2Exception (sMessageID +
" Failed to retrieve endpoint of recipient " +
aRecipientID.getURIEncoded (),
t);
}
}