Example usage for io.netty.handler.codec.http HttpMessage getProtocolVersion

List of usage examples for io.netty.handler.codec.http HttpMessage getProtocolVersion

Introduction

In this page you can find the example usage for io.netty.handler.codec.http HttpMessage getProtocolVersion.

Prototype

@Deprecated
HttpVersion getProtocolVersion();

Source Link

Usage

From source file:sas.systems.imflux.session.rtsp.SimpleRtspSession.java

License:Apache License

/**
 * Checks if the message is a supported message and
 * sends the message through the channel.
 * //from   w  w  w .  ja  v  a 2s  .  c  o  m
 * @param message object to send
 * @param channel 
 * @return {@code true} if the message was send, {@code false} otherwise
 */
private boolean internalSend(HttpMessage message, Channel channel) {
    if (!message.getProtocolVersion().equals(rtspVersion)) {
        throw new IllegalArgumentException("Unsupported RTSP version!");
    }
    channel.writeAndFlush(message);
    return true;
}