예제 #1
0
    @Override
    public Builder<T> setArg3(ByteBuf arg3) {
      if (arg3 != null && this.body != null) {
        throw new IllegalStateException("Cannot set both `arg3` and `body`.");
      }

      super.setArg3(arg3);
      return this;
    }
예제 #2
0
    @Override
    public Builder<T> setArg2(ByteBuf arg2) {
      if (arg2 != null && !this.headers.isEmpty()) {
        throw new IllegalStateException("Cannot set both `arg2` and `headers`.");
      }

      super.setArg2(arg2);
      return this;
    }
예제 #3
0
    public Builder<T> validate() {
      super.validate();
      this.validateHeader();
      this.validateBody();

      if (responseCode == null) {
        throw new IllegalStateException("`responseCode` cannot be null.");
      }

      return this;
    }