Example usage for io.netty.util.internal AppendableCharSequence AppendableCharSequence

List of usage examples for io.netty.util.internal AppendableCharSequence AppendableCharSequence

Introduction

In this page you can find the example usage for io.netty.util.internal AppendableCharSequence AppendableCharSequence.

Prototype

private AppendableCharSequence(char[] chars) 

Source Link

Usage

From source file:singh.jatinder.client.Client.java

License:Open Source License

public static void main(String[] args) throws Exception {
    final Client c = new Client();
    c.init();/*from  w  w  w.  j av a  2s. co  m*/
    Deferred<FullHttpResponse> def = c.execute("127.0.0.1", 9900, new DefaultFullHttpRequest(
            HttpVersion.HTTP_1_1, HttpMethod.GET, new AppendableCharSequence("/hello")));
    def.addCallback(new Callback<Object, FullHttpResponse>() {
        public Object call(FullHttpResponse arg) throws Exception {
            c.lineParser.parse(arg.content());
            System.out.println(c.lineParser.getParsedLine());
            return null;
        }
    });
    c.shutDownGracefully();
}