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


Java OptionMap.get方法代碼示例

本文整理匯總了Java中org.xnio.OptionMap.get方法的典型用法代碼示例。如果您正苦於以下問題:Java OptionMap.get方法的具體用法?Java OptionMap.get怎麽用?Java OptionMap.get使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.xnio.OptionMap的用法示例。


在下文中一共展示了OptionMap.get方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: handleConnected

import org.xnio.OptionMap; //導入方法依賴的package包/類
private void handleConnected(final StreamConnection connection, final ClientCallback<ClientConnection> listener, final Pool<ByteBuffer> bufferPool, final OptionMap options) {
    if (options.get(UndertowOptions.ENABLE_SPDY, false) && connection instanceof SslConnection && SpdyClientProvider.isEnabled()) {
        try {
            SpdyClientProvider.handlePotentialSpdyConnection(connection, listener, bufferPool, options, new ChannelListener<SslConnection>() {
                @Override
                public void handleEvent(SslConnection channel) {
                    listener.completed(new HttpClientConnection(connection, options, bufferPool));
                }
            });
        } catch (Exception e) {
            listener.failed(new IOException(e));
        }
    } else {
        listener.completed(new HttpClientConnection(connection, options, bufferPool));
    }
}
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:17,代碼來源:HttpClientProvider.java

示例2: AjpOpenListener

import org.xnio.OptionMap; //導入方法依賴的package包/類
public AjpOpenListener(final Pool<ByteBuffer> pool, final OptionMap undertowOptions) {
    this.undertowOptions = undertowOptions;
    this.bufferPool = pool;
    Pooled<ByteBuffer> buf = pool.allocate();
    this.bufferSize = buf.getResource().remaining();
    buf.free();
    parser = new AjpRequestParser(undertowOptions.get(URL_CHARSET, UTF_8), undertowOptions.get(DECODE_URL, true));
}
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:9,代碼來源:AjpOpenListener.java

示例3: HttpRequestParser

import org.xnio.OptionMap; //導入方法依賴的package包/類
public HttpRequestParser(OptionMap options) {
    maxParameters = options.get(UndertowOptions.MAX_PARAMETERS, 1000);
    maxHeaders = options.get(UndertowOptions.MAX_HEADERS, 200);
    allowEncodedSlash = options.get(UndertowOptions.ALLOW_ENCODED_SLASH, false);
    decode = options.get(UndertowOptions.DECODE_URL, true);
    charset = options.get(UndertowOptions.URL_CHARSET, "UTF-8");
}
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:8,代碼來源:HttpRequestParser.java

示例4: SpdyReceiveListener

import org.xnio.OptionMap; //導入方法依賴的package包/類
public SpdyReceiveListener(HttpHandler rootHandler, OptionMap undertowOptions, int bufferSize) {
    this.rootHandler = rootHandler;
    this.undertowOptions = undertowOptions;
    this.bufferSize = bufferSize;
    this.maxEntitySize = undertowOptions.get(UndertowOptions.MAX_ENTITY_SIZE, UndertowOptions.DEFAULT_MAX_ENTITY_SIZE);
    this.allowEncodingSlash = undertowOptions.get(UndertowOptions.ALLOW_ENCODED_SLASH, false);
    this.decode = undertowOptions.get(UndertowOptions.DECODE_URL, true);
    if (undertowOptions.get(UndertowOptions.DECODE_URL, true)) {
        this.encoding = undertowOptions.get(UndertowOptions.URL_CHARSET, "UTF-8");
    } else {
        this.encoding = null;
    }
}
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:14,代碼來源:SpdyReceiveListener.java

示例5: getQueryParamEncoding

import org.xnio.OptionMap; //導入方法依賴的package包/類
public static String getQueryParamEncoding(HttpServerExchange exchange) {
    String encoding = null;
    OptionMap undertowOptions = exchange.getConnection().getUndertowOptions();
    if(undertowOptions.get(UndertowOptions.DECODE_URL, true)) {
        encoding = undertowOptions.get(UndertowOptions.URL_CHARSET, "UTF-8");
    }
    return encoding;
}
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:9,代碼來源:QueryParameterUtils.java


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