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


Java CustomRequestDeserializer類代碼示例

本文整理匯總了Java中com.pkrete.xrd4j.server.deserializer.CustomRequestDeserializer的典型用法代碼示例。如果您正苦於以下問題:Java CustomRequestDeserializer類的具體用法?Java CustomRequestDeserializer怎麽用?Java CustomRequestDeserializer使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


CustomRequestDeserializer類屬於com.pkrete.xrd4j.server.deserializer包,在下文中一共展示了CustomRequestDeserializer類的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getRequestDeserializer

import com.pkrete.xrd4j.server.deserializer.CustomRequestDeserializer; //導入依賴的package包/類
/**
 * Returns a new CustomRequestDeserializer that converts the request from
 * SOAP to ServiceRequest object. The implementation of the
 * CustomRequestDeserializer is decided based on the given parameters.
 *
 * @param endpoint ProviderEndpoint that's processed using the deserializer
 * @return new CustomRequestDeserializer object
 * @throws XRd4JException
 */
private CustomRequestDeserializer getRequestDeserializer(ProviderEndpoint endpoint) throws XRd4JException {
    // Check is the request encrypted and create deserializer accordingly
    if (endpoint.isRequestEncrypted()) {
        // If asymmetric decrypter is null, there's nothing to do
        if (this.asymmetricDecrypter == null) {
            throw new XRd4JException("No private key available when decryption is required.");
        }
        return new DecryptingReqToMapRequestDeserializerImpl(asymmetricDecrypter);
    } else {
        return new ReqToMapRequestDeserializerImpl();
    }
}
 
開發者ID:educloudalliance,項目名稱:xroad-rest-gateway,代碼行數:22,代碼來源:ProviderGateway.java


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