Example usage for io.netty.handler.codec.stomp StompHeaders ACCEPT_VERSION

List of usage examples for io.netty.handler.codec.stomp StompHeaders ACCEPT_VERSION

Introduction

In this page you can find the example usage for io.netty.handler.codec.stomp StompHeaders ACCEPT_VERSION.

Prototype

AsciiString ACCEPT_VERSION

To view the source code for io.netty.handler.codec.stomp StompHeaders ACCEPT_VERSION.

Click Source Link

Usage

From source file:com.cmz.stomp.StompClientHandler.java

License:Apache License

@Override
public void channelActive(ChannelHandlerContext ctx) throws Exception {
    state = ClientState.AUTHENTICATING;//from   w ww. ja va 2  s .c  o  m
    StompFrame connFrame = new DefaultStompFrame(StompCommand.CONNECT);
    connFrame.headers().set(StompHeaders.ACCEPT_VERSION, "1.2");
    connFrame.headers().set(StompHeaders.HOST, StompClient.HOST);
    connFrame.headers().set(StompHeaders.LOGIN, StompClient.LOGIN);
    connFrame.headers().set(StompHeaders.PASSCODE, StompClient.PASSCODE);
    ctx.writeAndFlush(connFrame);
}

From source file:com.hop.hhxx.example.stomp.StompClientHandler.java

License:Apache License

@Override
public void channelActive(ChannelHandlerContext ctx) throws Exception {
    state = ClientState.AUTHENTICATING;/* w w w .j  a va2  s. c  om*/
    StompFrame connFrame = new DefaultStompFrame(StompCommand.CONNECT);
    connFrame.headers().set(StompHeaders.ACCEPT_VERSION, "1.2");
    connFrame.headers().set(StompHeaders.HOST, io.netty.example.stomp.StompClient.HOST);
    connFrame.headers().set(StompHeaders.LOGIN, io.netty.example.stomp.StompClient.LOGIN);
    connFrame.headers().set(StompHeaders.PASSCODE, io.netty.example.stomp.StompClient.PASSCODE);
    ctx.writeAndFlush(connFrame);
}