本文整理匯總了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));
}
}
示例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));
}
示例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");
}
示例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;
}
}
示例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;
}