当前位置: 首页>>代码示例>>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;未经允许,请勿转载。