Ejemplo n.º 1
0
  private boolean initPipeline(ChannelHandlerContext var1) {
    SslHandler var2 = (SslHandler) var1.pipeline().get(SslHandler.class);
    if (var2 == null) {
      throw new IllegalStateException("SslHandler is needed for SPDY");
    } else {
      SpdyOrHttpChooser.SelectedProtocol var3 = this.getProtocol(var2.engine());
      switch (SpdyOrHttpChooser.SyntheticClass_1
          .$SwitchMap$io$netty$handler$codec$spdy$SpdyOrHttpChooser$SelectedProtocol[
          var3.ordinal()]) {
        case 1:
          return false;
        case 2:
          this.addSpdyHandlers(var1, SpdyVersion.SPDY_3_1);
          break;
        case 3:
        case 4:
          this.addHttpHandlers(var1);
          break;
        default:
          throw new IllegalStateException("Unknown SelectedProtocol");
      }

      return true;
    }
  }
Ejemplo n.º 2
0
    public static SpdyOrHttpChooser.SelectedProtocol protocol(String var0) {
      SpdyOrHttpChooser.SelectedProtocol[] var1 = values();
      int var2 = var1.length;

      for (int var3 = 0; var3 < var2; ++var3) {
        SpdyOrHttpChooser.SelectedProtocol var4 = var1[var3];
        if (var4.protocolName().equals(var0)) {
          return var4;
        }
      }

      return UNKNOWN;
    }
Ejemplo n.º 3
0
  // $FF: synthetic class
  static class SyntheticClass_1 {
    // $FF: synthetic field
    static final int[] $SwitchMap$io$netty$handler$codec$spdy$SpdyOrHttpChooser$SelectedProtocol =
        new int[SpdyOrHttpChooser.SelectedProtocol.values().length];

    static {
      try {
        $SwitchMap$io$netty$handler$codec$spdy$SpdyOrHttpChooser$SelectedProtocol[
                SpdyOrHttpChooser.SelectedProtocol.UNKNOWN.ordinal()] =
            1;
      } catch (NoSuchFieldError var4) {;
      }

      try {
        $SwitchMap$io$netty$handler$codec$spdy$SpdyOrHttpChooser$SelectedProtocol[
                SpdyOrHttpChooser.SelectedProtocol.SPDY_3_1.ordinal()] =
            2;
      } catch (NoSuchFieldError var3) {;
      }

      try {
        $SwitchMap$io$netty$handler$codec$spdy$SpdyOrHttpChooser$SelectedProtocol[
                SpdyOrHttpChooser.SelectedProtocol.HTTP_1_0.ordinal()] =
            3;
      } catch (NoSuchFieldError var2) {;
      }

      try {
        $SwitchMap$io$netty$handler$codec$spdy$SpdyOrHttpChooser$SelectedProtocol[
                SpdyOrHttpChooser.SelectedProtocol.HTTP_1_1.ordinal()] =
            4;
      } catch (NoSuchFieldError var1) {;
      }
    }
  }
Ejemplo n.º 4
0
 protected SpdyOrHttpChooser.SelectedProtocol getProtocol(SSLEngine var1) {
   String[] var2 = StringUtil.split(var1.getSession().getProtocol(), ':');
   if (var2.length < 2) {
     return SpdyOrHttpChooser.SelectedProtocol.HTTP_1_1;
   } else {
     SpdyOrHttpChooser.SelectedProtocol var3 =
         SpdyOrHttpChooser.SelectedProtocol.protocol(var2[1]);
     return var3;
   }
 }