Java Code Examples for io.netty.util.AsciiString#contentEquals()
The following examples show how to use
io.netty.util.AsciiString#contentEquals() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: StringMultimap.java From armeria with Apache License 2.0 | 6 votes |
@Override public final boolean contains(IN_NAME name, String value) { requireNonNull(name, "name"); requireNonNull(value, "value"); final int h = hashName(name); final int i = index(h); Entry e = entries[i]; while (e != null) { if (e.hash == h) { final NAME currentName = e.key; if (currentName != null && nameEquals(currentName, name) && AsciiString.contentEquals(e.value, value)) { return true; } } e = e.next; } return false; }
Example 2
Source File: Http2ServerInitializer.java From netty-4.1.22 with Apache License 2.0 | 5 votes |
@Override public UpgradeCodec newUpgradeCodec(CharSequence protocol) { if (AsciiString.contentEquals(Http2CodecUtil.HTTP_UPGRADE_PROTOCOL_NAME, protocol)) { return new Http2ServerUpgradeCodec( Http2MultiplexCodecBuilder.forServer(new HelloWorldHttp2Handler()).build()); } else { return null; } }
Example 3
Source File: Http2ServerInitializer.java From netty-4.1.22 with Apache License 2.0 | 5 votes |
@Override public UpgradeCodec newUpgradeCodec(CharSequence protocol) { if (AsciiString.contentEquals(Http2CodecUtil.HTTP_UPGRADE_PROTOCOL_NAME, protocol)) { return new Http2ServerUpgradeCodec(new HelloWorldHttp2HandlerBuilder().build()); } else { return null; } }
Example 4
Source File: Http2ServerInitializer.java From netty-4.1.22 with Apache License 2.0 | 5 votes |
@Override public UpgradeCodec newUpgradeCodec(CharSequence protocol) { if (AsciiString.contentEquals(Http2CodecUtil.HTTP_UPGRADE_PROTOCOL_NAME, protocol)) { return new Http2ServerUpgradeCodec( Http2FrameCodecBuilder.forServer().build(), new HelloWorldHttp2Handler()); } else { return null; } }
Example 5
Source File: Http2ServerInitializer.java From netty-4.1.22 with Apache License 2.0 | 5 votes |
@Override public UpgradeCodec newUpgradeCodec(CharSequence protocol) { if (AsciiString.contentEquals(Http2CodecUtil.HTTP_UPGRADE_PROTOCOL_NAME, protocol)) { return new Http2ServerUpgradeCodec(new HelloWorldHttp2HandlerBuilder().build()); } else { return null; } }
Example 6
Source File: MediaTypeCodecs.java From xrpc with Apache License 2.0 | 5 votes |
protected T get(CharSequence contentType) { for (T item : collection) { if (AsciiString.contentEquals(contentType, item.mediaType())) { return item; } } return null; }
Example 7
Source File: HttpServerConfig.java From reactor-netty with Apache License 2.0 | 5 votes |
@Override @Nullable public HttpServerUpgradeHandler.UpgradeCodec newUpgradeCodec(CharSequence protocol) { if (AsciiString.contentEquals(Http2CodecUtil.HTTP_UPGRADE_PROTOCOL_NAME, protocol)) { return new Http2ServerUpgradeCodec(http2FrameCodec, new Http2MultiplexHandler(this)); } else { return null; } }