Package io.netty.channel.embedded

Examples of io.netty.channel.embedded.EmbeddedChannel.pipeline()


    public void shouldLogChannelUserEvent() throws Exception {
        String userTriggered = "iAmCustom!";
        appender.doAppend(matchesLog(".+USER_EVENT: " + userTriggered + '$'));
        replay(appender);
        EmbeddedChannel channel = new EmbeddedChannel(new LoggingHandler());
        channel.pipeline().fireUserEventTriggered(new String(userTriggered));
        verify(appender);
    }

    @Test
    public void shouldLogChannelException() throws Exception {
View Full Code Here


        String msg = "illegalState";
        Throwable cause = new IllegalStateException(msg);
        appender.doAppend(matchesLog(".+EXCEPTION: " + cause.getClass().getCanonicalName() + ": " + msg + '$'));
        replay(appender);
        EmbeddedChannel channel = new EmbeddedChannel(new LoggingHandler());
        channel.pipeline().fireExceptionCaught(cause);
        verify(appender);
    }

    @Test
    public void shouldLogDataWritten() throws Exception {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.