當前位置: 首頁>>代碼示例>>Java>>正文


Java ESMPTransportProfile類代碼示例

本文整理匯總了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);
  }
}
 
開發者ID:phax,項目名稱:as2-peppol-servlet,代碼行數:54,代碼來源:AS2ServletSBDModule.java


注:本文中的com.helger.peppol.smp.ESMPTransportProfile類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。