Java 类com.squareup.okhttp.internal.NamedRunnable 实例源码

项目:boohee_v5.6    文件:FramedConnection.java   
private void pushRequestLater(int streamId, List<Header> requestHeaders) {
    synchronized (this) {
        if (this.currentPushRequests.contains(Integer.valueOf(streamId))) {
            writeSynResetLater(streamId, ErrorCode.PROTOCOL_ERROR);
            return;
        }
        this.currentPushRequests.add(Integer.valueOf(streamId));
        final int i = streamId;
        final List<Header> list = requestHeaders;
        this.pushExecutor.execute(new NamedRunnable("OkHttp %s Push Request[%s]", new
                Object[]{this.hostName, Integer.valueOf(streamId)}) {
            public void execute() {
                if (FramedConnection.this.pushObserver.onRequest(i, list)) {
                    try {
                        FramedConnection.this.frameWriter.rstStream(i, ErrorCode.CANCEL);
                        synchronized (FramedConnection.this) {
                            FramedConnection.this.currentPushRequests.remove(Integer.valueOf
                                    (i));
                        }
                    } catch (IOException e) {
                    }
                }
            }
        });
    }
}
项目:boohee_v5.6    文件:FramedConnection.java   
private void pushHeadersLater(int streamId, List<Header> requestHeaders, boolean inFinished) {
    final int i = streamId;
    final List<Header> list = requestHeaders;
    final boolean z = inFinished;
    this.pushExecutor.execute(new NamedRunnable("OkHttp %s Push Headers[%s]", new
            Object[]{this.hostName, Integer.valueOf(streamId)}) {
        public void execute() {
            boolean cancel = FramedConnection.this.pushObserver.onHeaders(i, list, z);
            if (cancel) {
                try {
                    FramedConnection.this.frameWriter.rstStream(i, ErrorCode.CANCEL);
                } catch (IOException e) {
                    return;
                }
            }
            if (cancel || z) {
                synchronized (FramedConnection.this) {
                    FramedConnection.this.currentPushRequests.remove(Integer.valueOf(i));
                }
            }
        }
    });
}
项目:FMTech    文件:SpdyConnection.java   
final void writeSynResetLater(final int paramInt, final ErrorCode paramErrorCode)
{
  ExecutorService localExecutorService = executor;
  Object[] arrayOfObject = new Object[2];
  arrayOfObject[0] = this.hostName;
  arrayOfObject[1] = Integer.valueOf(paramInt);
  localExecutorService.submit(new NamedRunnable("OkHttp %s stream %d", arrayOfObject)
  {
    public final void execute()
    {
      try
      {
        SpdyConnection.this.writeSynReset(paramInt, paramErrorCode);
        return;
      }
      catch (IOException localIOException) {}
    }
  });
}
项目:FMTech    文件:SpdyConnection.java   
final void writeWindowUpdateLater(final int paramInt, final long paramLong)
{
  ExecutorService localExecutorService = executor;
  Object[] arrayOfObject = new Object[2];
  arrayOfObject[0] = this.hostName;
  arrayOfObject[1] = Integer.valueOf(paramInt);
  localExecutorService.submit(new NamedRunnable("OkHttp Window Update %s stream %d", arrayOfObject)
  {
    public final void execute()
    {
      try
      {
        SpdyConnection.this.frameWriter.windowUpdate(paramInt, paramLong);
        return;
      }
      catch (IOException localIOException) {}
    }
  });
}
项目:boohee_v5.6    文件:FramedConnection.java   
private void ackSettingsLater(final Settings peerSettings) {
    FramedConnection.executor.execute(new NamedRunnable("OkHttp %s ACK Settings", new
            Object[]{FramedConnection.this.hostName}) {
        public void execute() {
            try {
                FramedConnection.this.frameWriter.ackSettings(peerSettings);
            } catch (IOException e) {
            }
        }
    });
}
项目:boohee_v5.6    文件:FramedConnection.java   
void writeSynResetLater(int streamId, ErrorCode errorCode) {
    final int i = streamId;
    final ErrorCode errorCode2 = errorCode;
    executor.submit(new NamedRunnable("OkHttp %s stream %d", new Object[]{this.hostName,
            Integer.valueOf(streamId)}) {
        public void execute() {
            try {
                FramedConnection.this.writeSynReset(i, errorCode2);
            } catch (IOException e) {
            }
        }
    });
}
项目:boohee_v5.6    文件:FramedConnection.java   
void writeWindowUpdateLater(int streamId, long unacknowledgedBytesRead) {
    final int i = streamId;
    final long j = unacknowledgedBytesRead;
    executor.execute(new NamedRunnable("OkHttp Window Update %s stream %d", new Object[]{this
            .hostName, Integer.valueOf(streamId)}) {
        public void execute() {
            try {
                FramedConnection.this.frameWriter.windowUpdate(i, j);
            } catch (IOException e) {
            }
        }
    });
}
项目:boohee_v5.6    文件:FramedConnection.java   
private void writePingLater(boolean reply, int payload1, int payload2, Ping ping) {
    final boolean z = reply;
    final int i = payload1;
    final int i2 = payload2;
    final Ping ping2 = ping;
    executor.execute(new NamedRunnable("OkHttp %s ping %08x%08x", new Object[]{this.hostName,
            Integer.valueOf(payload1), Integer.valueOf(payload2)}) {
        public void execute() {
            try {
                FramedConnection.this.writePing(z, i, i2, ping2);
            } catch (IOException e) {
            }
        }
    });
}
项目:boohee_v5.6    文件:FramedConnection.java   
private void pushDataLater(int streamId, BufferedSource source, int byteCount, boolean
        inFinished) throws IOException {
    final Buffer buffer = new Buffer();
    source.require((long) byteCount);
    source.read(buffer, (long) byteCount);
    if (buffer.size() != ((long) byteCount)) {
        throw new IOException(buffer.size() + " != " + byteCount);
    }
    final int i = streamId;
    final int i2 = byteCount;
    final boolean z = inFinished;
    this.pushExecutor.execute(new NamedRunnable("OkHttp %s Push Data[%s]", new Object[]{this
            .hostName, Integer.valueOf(streamId)}) {
        public void execute() {
            try {
                boolean cancel = FramedConnection.this.pushObserver.onData(i, buffer, i2, z);
                if (cancel) {
                    FramedConnection.this.frameWriter.rstStream(i, ErrorCode.CANCEL);
                }
                if (cancel || z) {
                    synchronized (FramedConnection.this) {
                        FramedConnection.this.currentPushRequests.remove(Integer.valueOf(i));
                    }
                }
            } catch (IOException e) {
            }
        }
    });
}
项目:boohee_v5.6    文件:FramedConnection.java   
private void pushResetLater(int streamId, ErrorCode errorCode) {
    final int i = streamId;
    final ErrorCode errorCode2 = errorCode;
    this.pushExecutor.execute(new NamedRunnable("OkHttp %s Push Reset[%s]", new Object[]{this.hostName, Integer.valueOf(streamId)}) {
        public void execute() {
            FramedConnection.this.pushObserver.onReset(i, errorCode2);
            synchronized (FramedConnection.this) {
                FramedConnection.this.currentPushRequests.remove(Integer.valueOf(i));
            }
        }
    });
}
项目:LoRaWAN-Smart-Parking    文件:SpdyConnection.java   
void writeSynResetLater(final int streamId, final ErrorCode errorCode) {
  executor.submit(new NamedRunnable("OkHttp SPDY Writer %s stream %d", hostName, streamId) {
    @Override public void execute() {
      try {
        writeSynReset(streamId, errorCode);
      } catch (IOException ignored) {
      }
    }
  });
}
项目:LoRaWAN-Smart-Parking    文件:SpdyConnection.java   
void writeWindowUpdateLater(final int streamId, final int deltaWindowSize) {
  executor.submit(new NamedRunnable("OkHttp SPDY Writer %s stream %d", hostName, streamId) {
    @Override public void execute() {
      try {
        writeWindowUpdate(streamId, deltaWindowSize);
      } catch (IOException ignored) {
      }
    }
  });
}
项目:LoRaWAN-Smart-Parking    文件:SpdyConnection.java   
private void writePingLater(
    final boolean reply, final int payload1, final int payload2, final Ping ping) {
  executor.submit(new NamedRunnable("OkHttp SPDY Writer %s ping %08x%08x",
      hostName, payload1, payload2) {
    @Override public void execute() {
      try {
        writePing(reply, payload1, payload2, ping);
      } catch (IOException ignored) {
      }
    }
  });
}
项目:LoRaWAN-Smart-Parking    文件:SpdyConnection.java   
void writeSynResetLater(final int streamId, final ErrorCode errorCode) {
  executor.submit(new NamedRunnable("OkHttp SPDY Writer %s stream %d", hostName, streamId) {
    @Override public void execute() {
      try {
        writeSynReset(streamId, errorCode);
      } catch (IOException ignored) {
      }
    }
  });
}
项目:LoRaWAN-Smart-Parking    文件:SpdyConnection.java   
void writeWindowUpdateLater(final int streamId, final int deltaWindowSize) {
  executor.submit(new NamedRunnable("OkHttp SPDY Writer %s stream %d", hostName, streamId) {
    @Override public void execute() {
      try {
        writeWindowUpdate(streamId, deltaWindowSize);
      } catch (IOException ignored) {
      }
    }
  });
}
项目:LoRaWAN-Smart-Parking    文件:SpdyConnection.java   
private void writePingLater(
    final boolean reply, final int payload1, final int payload2, final Ping ping) {
  executor.submit(new NamedRunnable("OkHttp SPDY Writer %s ping %08x%08x",
      hostName, payload1, payload2) {
    @Override public void execute() {
      try {
        writePing(reply, payload1, payload2, ping);
      } catch (IOException ignored) {
      }
    }
  });
}
项目:smart-mirror-app    文件:SpdyConnection.java   
void writeSynResetLater(final int streamId, final ErrorCode errorCode) {
  executor.submit(new NamedRunnable("OkHttp SPDY Writer %s stream %d", hostName, streamId) {
    @Override public void execute() {
      try {
        writeSynReset(streamId, errorCode);
      } catch (IOException ignored) {
      }
    }
  });
}
项目:smart-mirror-app    文件:SpdyConnection.java   
void writeWindowUpdateLater(final int streamId, final int deltaWindowSize) {
  executor.submit(new NamedRunnable("OkHttp SPDY Writer %s stream %d", hostName, streamId) {
    @Override public void execute() {
      try {
        writeWindowUpdate(streamId, deltaWindowSize);
      } catch (IOException ignored) {
      }
    }
  });
}
项目:smart-mirror-app    文件:SpdyConnection.java   
private void writePingLater(
    final boolean reply, final int payload1, final int payload2, final Ping ping) {
  executor.submit(new NamedRunnable("OkHttp SPDY Writer %s ping %08x%08x",
      hostName, payload1, payload2) {
    @Override public void execute() {
      try {
        writePing(reply, payload1, payload2, ping);
      } catch (IOException ignored) {
      }
    }
  });
}
项目:cordova-plugin-background-mode    文件:SpdyConnection.java   
void writeSynResetLater(final int streamId, final ErrorCode errorCode) {
  executor.submit(new NamedRunnable("OkHttp SPDY Writer %s stream %d", hostName, streamId) {
    @Override public void execute() {
      try {
        writeSynReset(streamId, errorCode);
      } catch (IOException ignored) {
      }
    }
  });
}
项目:cordova-plugin-background-mode    文件:SpdyConnection.java   
void writeWindowUpdateLater(final int streamId, final int deltaWindowSize) {
  executor.submit(new NamedRunnable("OkHttp SPDY Writer %s stream %d", hostName, streamId) {
    @Override public void execute() {
      try {
        writeWindowUpdate(streamId, deltaWindowSize);
      } catch (IOException ignored) {
      }
    }
  });
}
项目:cordova-plugin-background-mode    文件:SpdyConnection.java   
private void writePingLater(
    final boolean reply, final int payload1, final int payload2, final Ping ping) {
  executor.submit(new NamedRunnable("OkHttp SPDY Writer %s ping %08x%08x",
      hostName, payload1, payload2) {
    @Override public void execute() {
      try {
        writePing(reply, payload1, payload2, ping);
      } catch (IOException ignored) {
      }
    }
  });
}
项目:wototoplayer    文件:SpdyConnection.java   
private void writePingLater(
    final boolean reply, final int payload1, final int payload2, final Ping ping) {
  executor.submit(new NamedRunnable("OkHttp SPDY Writer %s ping %08x%08x",
      hostName, payload1, payload2) {
    @Override public void execute() {
      try {
        writePing(reply, payload1, payload2, ping);
      } catch (IOException ignored) {
      }
    }
  });
}
项目:multirotorstuff-vtx-calc    文件:SpdyConnection.java   
void writeWindowUpdateLater(final int streamId, final int deltaWindowSize) {
  executor.submit(new NamedRunnable("OkHttp SPDY Writer %s stream %d", hostName, streamId) {
    @Override public void execute() {
      try {
        writeWindowUpdate(streamId, deltaWindowSize);
      } catch (IOException ignored) {
      }
    }
  });
}
项目:multirotorstuff-vtx-calc    文件:SpdyConnection.java   
private void writePingLater(
    final boolean reply, final int payload1, final int payload2, final Ping ping) {
  executor.submit(new NamedRunnable("OkHttp SPDY Writer %s ping %08x%08x",
      hostName, payload1, payload2) {
    @Override public void execute() {
      try {
        writePing(reply, payload1, payload2, ping);
      } catch (IOException ignored) {
      }
    }
  });
}
项目:L.TileLayer.Cordova    文件:SpdyConnection.java   
void writeSynResetLater(final int streamId, final ErrorCode errorCode) {
  executor.submit(new NamedRunnable("OkHttp SPDY Writer %s stream %d", hostName, streamId) {
    @Override public void execute() {
      try {
        writeSynReset(streamId, errorCode);
      } catch (IOException ignored) {
      }
    }
  });
}
项目:L.TileLayer.Cordova    文件:SpdyConnection.java   
void writeWindowUpdateLater(final int streamId, final int deltaWindowSize) {
  executor.submit(new NamedRunnable("OkHttp SPDY Writer %s stream %d", hostName, streamId) {
    @Override public void execute() {
      try {
        writeWindowUpdate(streamId, deltaWindowSize);
      } catch (IOException ignored) {
      }
    }
  });
}
项目:L.TileLayer.Cordova    文件:SpdyConnection.java   
private void writePingLater(
    final boolean reply, final int payload1, final int payload2, final Ping ping) {
  executor.submit(new NamedRunnable("OkHttp SPDY Writer %s ping %08x%08x",
      hostName, payload1, payload2) {
    @Override public void execute() {
      try {
        writePing(reply, payload1, payload2, ping);
      } catch (IOException ignored) {
      }
    }
  });
}
项目:cordova-android-tv    文件:SpdyConnection.java   
void writeSynResetLater(final int streamId, final ErrorCode errorCode) {
  executor.submit(new NamedRunnable("OkHttp SPDY Writer %s stream %d", hostName, streamId) {
    @Override public void execute() {
      try {
        writeSynReset(streamId, errorCode);
      } catch (IOException ignored) {
      }
    }
  });
}
项目:cordova-android-tv    文件:SpdyConnection.java   
void writeWindowUpdateLater(final int streamId, final int deltaWindowSize) {
  executor.submit(new NamedRunnable("OkHttp SPDY Writer %s stream %d", hostName, streamId) {
    @Override public void execute() {
      try {
        writeWindowUpdate(streamId, deltaWindowSize);
      } catch (IOException ignored) {
      }
    }
  });
}
项目:cordova-android-tv    文件:SpdyConnection.java   
private void writePingLater(
    final boolean reply, final int payload1, final int payload2, final Ping ping) {
  executor.submit(new NamedRunnable("OkHttp SPDY Writer %s ping %08x%08x",
      hostName, payload1, payload2) {
    @Override public void execute() {
      try {
        writePing(reply, payload1, payload2, ping);
      } catch (IOException ignored) {
      }
    }
  });
}
项目:Cordova-Locale-Plugin    文件:SpdyConnection.java   
void writeSynResetLater(final int streamId, final ErrorCode errorCode) {
  executor.submit(new NamedRunnable("OkHttp SPDY Writer %s stream %d", hostName, streamId) {
    @Override public void execute() {
      try {
        writeSynReset(streamId, errorCode);
      } catch (IOException ignored) {
      }
    }
  });
}
项目:wototoplayer    文件:SpdyConnection.java   
void writeSynResetLater(final int streamId, final ErrorCode errorCode) {
  executor.submit(new NamedRunnable("OkHttp SPDY Writer %s stream %d", hostName, streamId) {
    @Override public void execute() {
      try {
        writeSynReset(streamId, errorCode);
      } catch (IOException ignored) {
      }
    }
  });
}
项目:Cordova-Locale-Plugin    文件:SpdyConnection.java   
private void writePingLater(
    final boolean reply, final int payload1, final int payload2, final Ping ping) {
  executor.submit(new NamedRunnable("OkHttp SPDY Writer %s ping %08x%08x",
      hostName, payload1, payload2) {
    @Override public void execute() {
      try {
        writePing(reply, payload1, payload2, ping);
      } catch (IOException ignored) {
      }
    }
  });
}
项目:pubnub-rpi-smart-parking    文件:SpdyConnection.java   
void writeSynResetLater(final int streamId, final ErrorCode errorCode) {
  executor.submit(new NamedRunnable("OkHttp SPDY Writer %s stream %d", hostName, streamId) {
    @Override public void execute() {
      try {
        writeSynReset(streamId, errorCode);
      } catch (IOException ignored) {
      }
    }
  });
}
项目:pubnub-rpi-smart-parking    文件:SpdyConnection.java   
void writeWindowUpdateLater(final int streamId, final int deltaWindowSize) {
  executor.submit(new NamedRunnable("OkHttp SPDY Writer %s stream %d", hostName, streamId) {
    @Override public void execute() {
      try {
        writeWindowUpdate(streamId, deltaWindowSize);
      } catch (IOException ignored) {
      }
    }
  });
}
项目:pubnub-rpi-smart-parking    文件:SpdyConnection.java   
private void writePingLater(
    final boolean reply, final int payload1, final int payload2, final Ping ping) {
  executor.submit(new NamedRunnable("OkHttp SPDY Writer %s ping %08x%08x",
      hostName, payload1, payload2) {
    @Override public void execute() {
      try {
        writePing(reply, payload1, payload2, ping);
      } catch (IOException ignored) {
      }
    }
  });
}
项目:IoTgo_Android_App    文件:SpdyConnection.java   
void writeSynResetLater(final int streamId, final ErrorCode errorCode) {
  executor.submit(new NamedRunnable("OkHttp SPDY Writer %s stream %d", hostName, streamId) {
    @Override public void execute() {
      try {
        writeSynReset(streamId, errorCode);
      } catch (IOException ignored) {
      }
    }
  });
}
项目:IoTgo_Android_App    文件:SpdyConnection.java   
void writeWindowUpdateLater(final int streamId, final int deltaWindowSize) {
  executor.submit(new NamedRunnable("OkHttp SPDY Writer %s stream %d", hostName, streamId) {
    @Override public void execute() {
      try {
        writeWindowUpdate(streamId, deltaWindowSize);
      } catch (IOException ignored) {
      }
    }
  });
}
项目:IoTgo_Android_App    文件:SpdyConnection.java   
private void writePingLater(
    final boolean reply, final int payload1, final int payload2, final Ping ping) {
  executor.submit(new NamedRunnable("OkHttp SPDY Writer %s ping %08x%08x",
      hostName, payload1, payload2) {
    @Override public void execute() {
      try {
        writePing(reply, payload1, payload2, ping);
      } catch (IOException ignored) {
      }
    }
  });
}