org.apache.http.impl.conn.tsccm.WaitingThreadAborter.<init>()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(4.8k)|赞(0)|评价(0)|浏览(112)

本文整理了Java中org.apache.http.impl.conn.tsccm.WaitingThreadAborter.<init>()方法的一些代码示例,展示了WaitingThreadAborter.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WaitingThreadAborter.<init>()方法的具体详情如下:
包路径:org.apache.http.impl.conn.tsccm.WaitingThreadAborter
类名称:WaitingThreadAborter
方法名:<init>

WaitingThreadAborter.<init>介绍

暂无

代码示例

代码示例来源:origin: robovm/robovm

  1. @Override
  2. public PoolEntryRequest requestPoolEntry(
  3. final HttpRoute route,
  4. final Object state) {
  5. final WaitingThreadAborter aborter = new WaitingThreadAborter();
  6. return new PoolEntryRequest() {
  7. public void abortRequest() {
  8. poolLock.lock();
  9. try {
  10. aborter.abort();
  11. } finally {
  12. poolLock.unlock();
  13. }
  14. }
  15. public BasicPoolEntry getPoolEntry(
  16. long timeout,
  17. TimeUnit tunit)
  18. throws InterruptedException, ConnectionPoolTimeoutException {
  19. return getEntryBlocking(route, state, timeout, tunit, aborter);
  20. }
  21. };
  22. }

代码示例来源:origin: MobiVM/robovm

  1. @Override
  2. public PoolEntryRequest requestPoolEntry(
  3. final HttpRoute route,
  4. final Object state) {
  5. final WaitingThreadAborter aborter = new WaitingThreadAborter();
  6. return new PoolEntryRequest() {
  7. public void abortRequest() {
  8. poolLock.lock();
  9. try {
  10. aborter.abort();
  11. } finally {
  12. poolLock.unlock();
  13. }
  14. }
  15. public BasicPoolEntry getPoolEntry(
  16. long timeout,
  17. TimeUnit tunit)
  18. throws InterruptedException, ConnectionPoolTimeoutException {
  19. return getEntryBlocking(route, state, timeout, tunit, aborter);
  20. }
  21. };
  22. }

代码示例来源:origin: Nextdoor/bender

  1. @Override
  2. public PoolEntryRequest requestPoolEntry(
  3. final HttpRoute route,
  4. final Object state) {
  5. final WaitingThreadAborter aborter = new WaitingThreadAborter();
  6. return new PoolEntryRequest() {
  7. @Override
  8. public void abortRequest() {
  9. poolLock.lock();
  10. try {
  11. aborter.abort();
  12. } finally {
  13. poolLock.unlock();
  14. }
  15. }
  16. @Override
  17. public BasicPoolEntry getPoolEntry(
  18. final long timeout,
  19. final TimeUnit tunit)
  20. throws InterruptedException, ConnectionPoolTimeoutException {
  21. return getEntryBlocking(route, state, timeout, tunit, aborter);
  22. }
  23. };
  24. }

代码示例来源:origin: com.gluonhq/robovm-rt

  1. @Override
  2. public PoolEntryRequest requestPoolEntry(
  3. final HttpRoute route,
  4. final Object state) {
  5. final WaitingThreadAborter aborter = new WaitingThreadAborter();
  6. return new PoolEntryRequest() {
  7. public void abortRequest() {
  8. poolLock.lock();
  9. try {
  10. aborter.abort();
  11. } finally {
  12. poolLock.unlock();
  13. }
  14. }
  15. public BasicPoolEntry getPoolEntry(
  16. long timeout,
  17. TimeUnit tunit)
  18. throws InterruptedException, ConnectionPoolTimeoutException {
  19. return getEntryBlocking(route, state, timeout, tunit, aborter);
  20. }
  21. };
  22. }

代码示例来源:origin: com.mobidevelop.robovm/robovm-rt

  1. @Override
  2. public PoolEntryRequest requestPoolEntry(
  3. final HttpRoute route,
  4. final Object state) {
  5. final WaitingThreadAborter aborter = new WaitingThreadAborter();
  6. return new PoolEntryRequest() {
  7. public void abortRequest() {
  8. poolLock.lock();
  9. try {
  10. aborter.abort();
  11. } finally {
  12. poolLock.unlock();
  13. }
  14. }
  15. public BasicPoolEntry getPoolEntry(
  16. long timeout,
  17. TimeUnit tunit)
  18. throws InterruptedException, ConnectionPoolTimeoutException {
  19. return getEntryBlocking(route, state, timeout, tunit, aborter);
  20. }
  21. };
  22. }

代码示例来源:origin: com.hynnet/httpclient

  1. @Override
  2. public PoolEntryRequest requestPoolEntry(
  3. final HttpRoute route,
  4. final Object state) {
  5. final WaitingThreadAborter aborter = new WaitingThreadAborter();
  6. return new PoolEntryRequest() {
  7. public void abortRequest() {
  8. poolLock.lock();
  9. try {
  10. aborter.abort();
  11. } finally {
  12. poolLock.unlock();
  13. }
  14. }
  15. public BasicPoolEntry getPoolEntry(
  16. final long timeout,
  17. final TimeUnit tunit)
  18. throws InterruptedException, ConnectionPoolTimeoutException {
  19. return getEntryBlocking(route, state, timeout, tunit, aborter);
  20. }
  21. };
  22. }

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/org.apache.httpcomponents.httpclient

  1. @Override
  2. public PoolEntryRequest requestPoolEntry(
  3. final HttpRoute route,
  4. final Object state) {
  5. final WaitingThreadAborter aborter = new WaitingThreadAborter();
  6. return new PoolEntryRequest() {
  7. public void abortRequest() {
  8. poolLock.lock();
  9. try {
  10. aborter.abort();
  11. } finally {
  12. poolLock.unlock();
  13. }
  14. }
  15. public BasicPoolEntry getPoolEntry(
  16. final long timeout,
  17. final TimeUnit tunit)
  18. throws InterruptedException, ConnectionPoolTimeoutException {
  19. return getEntryBlocking(route, state, timeout, tunit, aborter);
  20. }
  21. };
  22. }

代码示例来源:origin: com.impetus.fabric/fabric-jdbc-driver-shaded

  1. @Override
  2. public PoolEntryRequest requestPoolEntry(
  3. final HttpRoute route,
  4. final Object state) {
  5. final WaitingThreadAborter aborter = new WaitingThreadAborter();
  6. return new PoolEntryRequest() {
  7. @Override
  8. public void abortRequest() {
  9. poolLock.lock();
  10. try {
  11. aborter.abort();
  12. } finally {
  13. poolLock.unlock();
  14. }
  15. }
  16. @Override
  17. public BasicPoolEntry getPoolEntry(
  18. final long timeout,
  19. final TimeUnit tunit)
  20. throws InterruptedException, ConnectionPoolTimeoutException {
  21. return getEntryBlocking(route, state, timeout, tunit, aborter);
  22. }
  23. };
  24. }

代码示例来源:origin: FlexoVM/flexovm

  1. @Override
  2. public PoolEntryRequest requestPoolEntry(
  3. final HttpRoute route,
  4. final Object state) {
  5. final WaitingThreadAborter aborter = new WaitingThreadAborter();
  6. return new PoolEntryRequest() {
  7. public void abortRequest() {
  8. poolLock.lock();
  9. try {
  10. aborter.abort();
  11. } finally {
  12. poolLock.unlock();
  13. }
  14. }
  15. public BasicPoolEntry getPoolEntry(
  16. long timeout,
  17. TimeUnit tunit)
  18. throws InterruptedException, ConnectionPoolTimeoutException {
  19. return getEntryBlocking(route, state, timeout, tunit, aborter);
  20. }
  21. };
  22. }

相关文章