Example #1
0
 /**
  * Creates a new session handler.
  *
  * @param version the protocol version
  * @param server {@code true} if and only if this session handler should handle the server
  *     endpoint of the connection. {@code false} if and only if this session handler should handle
  *     the client endpoint of the connection.
  */
 public SpdySessionHandler(SpdyVersion version, boolean server) {
   if (version == null) {
     throw new NullPointerException("version");
   }
   this.server = server;
   minorVersion = version.getMinorVersion();
 }
 protected SpdyFrameDecoder(
     SpdyVersion version, int maxChunkSize, SpdyHeaderBlockDecoder headerBlockDecoder) {
   if (version == null) {
     throw new NullPointerException("version");
   }
   if (maxChunkSize <= 0) {
     throw new IllegalArgumentException(
         "maxChunkSize must be a positive integer: " + maxChunkSize);
   }
   spdyVersion = version.getVersion();
   this.maxChunkSize = maxChunkSize;
   this.headerBlockDecoder = headerBlockDecoder;
   state = State.READ_COMMON_HEADER;
 }
Example #3
0
 /**
  * Creates a new instance.
  *
  * @param version the protocol version
  */
 public SpdyHttpEncoder(SpdyVersion version) {
   if (version == null) {
     throw new NullPointerException("version");
   }
   spdyVersion = version.getVersion();
 }