io.netty.channel.ChannelMetadata Java Examples

The following examples show how to use io.netty.channel.ChannelMetadata. 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: SmartHttpContentDecompressorTest.java    From riposte with Apache License 2.0 5 votes vote down vote up
@DataProvider(value = {
    "GZIP",
    "X_GZIP",
    "DEFLATE",
    "X_DEFLATE",
    "CONTENT_ENCODING_THAT_DOES_NOT_REPRESENT_COMPRESSED_PAYLOAD",
    "ENDPOINT_DOES_NOT_WANT_DECOMPRESS",
    "NULL_ENDPOINT"
})
@Test
public void newContentDecoder_works_as_expected(NewContentDecoderScenario scenario) throws Exception {
    // given
    SmartHttpContentDecompressor decompressor = new SmartHttpContentDecompressor();
    TestUtil.ChannelHandlerContextMocks mocks = TestUtil.mockChannelHandlerContext();
    Whitebox.setInternalState(decompressor, "ctx", mocks.mockContext);
    ChannelMetadata channelMetadata = new ChannelMetadata(false);
    ChannelConfig channelConfigMock = mock(ChannelConfig.class);

    doReturn(scenario.endpoint).when(mocks.mockHttpProcessingState).getEndpointForExecution();
    doReturn(channelMetadata).when(mocks.mockChannel).metadata();
    doReturn(channelConfigMock).when(mocks.mockChannel).config();

    // when
    EmbeddedChannel result = decompressor.newContentDecoder(scenario.contentEncoding);

    // then
    if (scenario.expectValidDecompressor) {
        assertThat(result).isNotNull();
    }
    else {
        assertThat(result).isNull();
    }
}
 
Example #2
Source File: NioSocketChannel.java    From netty4.0.27Learn with Apache License 2.0 4 votes vote down vote up
@Override
public ChannelMetadata metadata() {
    return METADATA;
}
 
Example #3
Source File: EpollDatagramChannel.java    From netty4.0.27Learn with Apache License 2.0 4 votes vote down vote up
@Override
public ChannelMetadata metadata() {
    return METADATA;
}
 
Example #4
Source File: NioSctpServerChannel.java    From netty4.0.27Learn with Apache License 2.0 4 votes vote down vote up
@Override
public ChannelMetadata metadata() {
    return METADATA;
}
 
Example #5
Source File: OioSctpChannel.java    From netty4.0.27Learn with Apache License 2.0 4 votes vote down vote up
@Override
public ChannelMetadata metadata() {
    return METADATA;
}
 
Example #6
Source File: AbstractOioByteChannel.java    From netty4.0.27Learn with Apache License 2.0 4 votes vote down vote up
@Override
public ChannelMetadata metadata() {
    return METADATA;
}
 
Example #7
Source File: EmbeddedChannel.java    From netty4.0.27Learn with Apache License 2.0 4 votes vote down vote up
@Override
public ChannelMetadata metadata() {
    return METADATA;
}
 
Example #8
Source File: OioSctpServerChannel.java    From netty4.0.27Learn with Apache License 2.0 4 votes vote down vote up
@Override
public ChannelMetadata metadata() {
    return METADATA;
}
 
Example #9
Source File: AbstractRequestContextBuilder.java    From armeria with Apache License 2.0 4 votes vote down vote up
@Override
public ChannelMetadata metadata() {
    throw new UnsupportedOperationException();
}
 
Example #10
Source File: FailedChannel.java    From couchbase-jvm-core with Apache License 2.0 4 votes vote down vote up
@Override
public ChannelMetadata metadata() {
    return METADATA;
}
 
Example #11
Source File: ChannelAdapter.java    From onos with Apache License 2.0 4 votes vote down vote up
@Override
public ChannelMetadata metadata() {
    return null;
}
 
Example #12
Source File: ChannelAdapter.java    From onos with Apache License 2.0 4 votes vote down vote up
@Override
public ChannelMetadata metadata() {
    return null;
}
 
Example #13
Source File: ChannelAdapter.java    From onos with Apache License 2.0 4 votes vote down vote up
@Override
public ChannelMetadata metadata() {
    return null;
}
 
Example #14
Source File: AbstractXnioSocketChannel.java    From netty-xnio-transport with Apache License 2.0 4 votes vote down vote up
@Override
public ChannelMetadata metadata() {
    return META_DATA;
}
 
Example #15
Source File: DelayableWriteChannel.java    From crate with Apache License 2.0 4 votes vote down vote up
@Override
public ChannelMetadata metadata() {
    return delegate.metadata();
}
 
Example #16
Source File: AbstractEpollChannel.java    From netty4.0.27Learn with Apache License 2.0 4 votes vote down vote up
@Override
public ChannelMetadata metadata() {
    return DATA;
}
 
Example #17
Source File: LocalChannel.java    From netty4.0.27Learn with Apache License 2.0 4 votes vote down vote up
@Override
public ChannelMetadata metadata() {
    return METADATA;
}
 
Example #18
Source File: NioDatagramChannel.java    From netty4.0.27Learn with Apache License 2.0 4 votes vote down vote up
@Override
public ChannelMetadata metadata() {
    return METADATA;
}
 
Example #19
Source File: NioServerSocketChannel.java    From netty4.0.27Learn with Apache License 2.0 4 votes vote down vote up
@Override
public ChannelMetadata metadata() {
    return METADATA;
}
 
Example #20
Source File: OioServerSocketChannel.java    From netty4.0.27Learn with Apache License 2.0 4 votes vote down vote up
@Override
public ChannelMetadata metadata() {
    return METADATA;
}
 
Example #21
Source File: OioDatagramChannel.java    From netty4.0.27Learn with Apache License 2.0 4 votes vote down vote up
@Override
public ChannelMetadata metadata() {
    return METADATA;
}
 
Example #22
Source File: NioUdtByteConnectorChannel.java    From netty4.0.27Learn with Apache License 2.0 4 votes vote down vote up
@Override
public ChannelMetadata metadata() {
    return METADATA;
}
 
Example #23
Source File: NioUdtMessageAcceptorChannel.java    From netty4.0.27Learn with Apache License 2.0 4 votes vote down vote up
@Override
public ChannelMetadata metadata() {
    return METADATA;
}
 
Example #24
Source File: NioUdtMessageConnectorChannel.java    From netty4.0.27Learn with Apache License 2.0 4 votes vote down vote up
@Override
public ChannelMetadata metadata() {
    return METADATA;
}
 
Example #25
Source File: NioUdtByteAcceptorChannel.java    From netty4.0.27Learn with Apache License 2.0 4 votes vote down vote up
@Override
public ChannelMetadata metadata() {
    return METADATA;
}
 
Example #26
Source File: NullChannel.java    From AnnihilationPro with MIT License 4 votes vote down vote up
@Override
public ChannelMetadata metadata() {
	return null;
}
 
Example #27
Source File: NullChannel.java    From AnnihilationPro with MIT License 4 votes vote down vote up
@Override
public ChannelMetadata metadata() {
	return null;
}
 
Example #28
Source File: UdpChannel.java    From UdpServerSocketChannel with GNU Lesser General Public License v3.0 4 votes vote down vote up
@Override
public ChannelMetadata metadata() {
	return metadata;
}
 
Example #29
Source File: ClosedLoopChannel.java    From aws-sdk-java-v2 with Apache License 2.0 4 votes vote down vote up
@Override
public ChannelMetadata metadata() {
    return metadata;
}
 
Example #30
Source File: UkcpServerChannel.java    From kcp-netty with MIT License 4 votes vote down vote up
@Override
public ChannelMetadata metadata() {
    return METADATA;
}