org.eclipse.jetty.client.HttpClient.getRequestListeners()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(12.8k)|赞(0)|评价(0)|浏览(118)

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

HttpClient.getRequestListeners介绍

[英]Returns a non thread-safe list of org.eclipse.jetty.client.api.Request.Listeners that can be modified before performing requests.
[中]返回组织的线程安全列表。日食码头。客户应用程序编程接口。要求可以在执行请求之前修改的侦听器。

代码示例

代码示例来源:origin: org.eclipse.jetty/jetty-client

public void notifyQueued(Request request)
{
  // Optimized to avoid allocations of iterator instances
  List<Request.RequestListener> requestListeners = request.getRequestListeners(null);
  for (int i = 0; i < requestListeners.size(); ++i)
  {
    Request.RequestListener listener = requestListeners.get(i);
    if (listener instanceof Request.QueuedListener)
      notifyQueued((Request.QueuedListener)listener, request);
  }
  List<Request.Listener> listeners = client.getRequestListeners();
  for (int i = 0; i < listeners.size(); ++i)
  {
    Request.Listener listener = listeners.get(i);
    notifyQueued(listener, request);
  }
}

代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9

public void notifyQueued(Request request)
{
  // Optimized to avoid allocations of iterator instances
  List<Request.RequestListener> requestListeners = request.getRequestListeners(null);
  for (int i = 0; i < requestListeners.size(); ++i)
  {
    Request.RequestListener listener = requestListeners.get(i);
    if (listener instanceof Request.QueuedListener)
      notifyQueued((Request.QueuedListener)listener, request);
  }
  List<Request.Listener> listeners = client.getRequestListeners();
  for (int i = 0; i < listeners.size(); ++i)
  {
    Request.Listener listener = listeners.get(i);
    notifyQueued(listener, request);
  }
}

代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9

public void notifyCommit(Request request)
{
  // Optimized to avoid allocations of iterator instances
  List<Request.RequestListener> requestListeners = request.getRequestListeners(null);
  for (int i = 0; i < requestListeners.size(); ++i)
  {
    Request.RequestListener listener = requestListeners.get(i);
    if (listener instanceof Request.CommitListener)
      notifyCommit((Request.CommitListener)listener, request);
  }
  List<Request.Listener> listeners = client.getRequestListeners();
  for (int i = 0; i < listeners.size(); ++i)
  {
    Request.Listener listener = listeners.get(i);
    notifyCommit(listener, request);
  }
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9

public void notifyBegin(Request request)
{
  // Optimized to avoid allocations of iterator instances
  List<Request.RequestListener> requestListeners = request.getRequestListeners(null);
  for (int i = 0; i < requestListeners.size(); ++i)
  {
    Request.RequestListener listener = requestListeners.get(i);
    if (listener instanceof Request.BeginListener)
      notifyBegin((Request.BeginListener)listener, request);
  }
  List<Request.Listener> listeners = client.getRequestListeners();
  for (int i = 0; i < listeners.size(); ++i)
  {
    Request.Listener listener = listeners.get(i);
    notifyBegin(listener, request);
  }
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9

public void notifyCommit(Request request)
{
  // Optimized to avoid allocations of iterator instances
  List<Request.RequestListener> requestListeners = request.getRequestListeners(null);
  for (int i = 0; i < requestListeners.size(); ++i)
  {
    Request.RequestListener listener = requestListeners.get(i);
    if (listener instanceof Request.CommitListener)
      notifyCommit((Request.CommitListener)listener, request);
  }
  List<Request.Listener> listeners = client.getRequestListeners();
  for (int i = 0; i < listeners.size(); ++i)
  {
    Request.Listener listener = listeners.get(i);
    notifyCommit(listener, request);
  }
}

代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9

public void notifySuccess(Request request)
{
  // Optimized to avoid allocations of iterator instances
  List<Request.RequestListener> requestListeners = request.getRequestListeners(null);
  for (int i = 0; i < requestListeners.size(); ++i)
  {
    Request.RequestListener listener = requestListeners.get(i);
    if (listener instanceof Request.SuccessListener)
      notifySuccess((Request.SuccessListener)listener, request);
  }
  List<Request.Listener> listeners = client.getRequestListeners();
  for (int i = 0; i < listeners.size(); ++i)
  {
    Request.Listener listener = listeners.get(i);
    notifySuccess(listener, request);
  }
}

代码示例来源:origin: org.eclipse.jetty/jetty-client

public void notifyHeaders(Request request)
{
  // Optimized to avoid allocations of iterator instances
  List<Request.RequestListener> requestListeners = request.getRequestListeners(null);
  for (int i = 0; i < requestListeners.size(); ++i)
  {
    Request.RequestListener listener = requestListeners.get(i);
    if (listener instanceof Request.HeadersListener)
      notifyHeaders((Request.HeadersListener)listener, request);
  }
  List<Request.Listener> listeners = client.getRequestListeners();
  for (int i = 0; i < listeners.size(); ++i)
  {
    Request.Listener listener = listeners.get(i);
    notifyHeaders(listener, request);
  }
}

代码示例来源:origin: org.eclipse.jetty/jetty-client

public void notifyCommit(Request request)
{
  // Optimized to avoid allocations of iterator instances
  List<Request.RequestListener> requestListeners = request.getRequestListeners(null);
  for (int i = 0; i < requestListeners.size(); ++i)
  {
    Request.RequestListener listener = requestListeners.get(i);
    if (listener instanceof Request.CommitListener)
      notifyCommit((Request.CommitListener)listener, request);
  }
  List<Request.Listener> listeners = client.getRequestListeners();
  for (int i = 0; i < listeners.size(); ++i)
  {
    Request.Listener listener = listeners.get(i);
    notifyCommit(listener, request);
  }
}

代码示例来源:origin: org.eclipse.jetty/jetty-client

public void notifySuccess(Request request)
{
  // Optimized to avoid allocations of iterator instances
  List<Request.RequestListener> requestListeners = request.getRequestListeners(null);
  for (int i = 0; i < requestListeners.size(); ++i)
  {
    Request.RequestListener listener = requestListeners.get(i);
    if (listener instanceof Request.SuccessListener)
      notifySuccess((Request.SuccessListener)listener, request);
  }
  List<Request.Listener> listeners = client.getRequestListeners();
  for (int i = 0; i < listeners.size(); ++i)
  {
    Request.Listener listener = listeners.get(i);
    notifySuccess(listener, request);
  }
}

代码示例来源:origin: org.eclipse.jetty/jetty-client

public void notifyFailure(Request request, Throwable failure)
{
  // Optimized to avoid allocations of iterator instances
  List<Request.RequestListener> requestListeners = request.getRequestListeners(null);
  for (int i = 0; i < requestListeners.size(); ++i)
  {
    Request.RequestListener listener = requestListeners.get(i);
    if (listener instanceof Request.FailureListener)
      notifyFailure((Request.FailureListener)listener, request, failure);
  }
  List<Request.Listener> listeners = client.getRequestListeners();
  for (int i = 0; i < listeners.size(); ++i)
  {
    Request.Listener listener = listeners.get(i);
    notifyFailure(listener, request, failure);
  }
}

代码示例来源:origin: org.eclipse.jetty/jetty-client

public void notifyBegin(Request request)
{
  // Optimized to avoid allocations of iterator instances
  List<Request.RequestListener> requestListeners = request.getRequestListeners(null);
  for (int i = 0; i < requestListeners.size(); ++i)
  {
    Request.RequestListener listener = requestListeners.get(i);
    if (listener instanceof Request.BeginListener)
      notifyBegin((Request.BeginListener)listener, request);
  }
  List<Request.Listener> listeners = client.getRequestListeners();
  for (int i = 0; i < listeners.size(); ++i)
  {
    Request.Listener listener = listeners.get(i);
    notifyBegin(listener, request);
  }
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9

public void notifyHeaders(Request request)
{
  // Optimized to avoid allocations of iterator instances
  List<Request.RequestListener> requestListeners = request.getRequestListeners(null);
  for (int i = 0; i < requestListeners.size(); ++i)
  {
    Request.RequestListener listener = requestListeners.get(i);
    if (listener instanceof Request.HeadersListener)
      notifyHeaders((Request.HeadersListener)listener, request);
  }
  List<Request.Listener> listeners = client.getRequestListeners();
  for (int i = 0; i < listeners.size(); ++i)
  {
    Request.Listener listener = listeners.get(i);
    notifyHeaders(listener, request);
  }
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9

public void notifyContent(Request request, ByteBuffer content)
{
  // Optimized to avoid allocations of iterator instances
  List<Request.RequestListener> requestListeners = request.getRequestListeners(null);
  for (int i = 0; i < requestListeners.size(); ++i)
  {
    Request.RequestListener listener = requestListeners.get(i);
    if (listener instanceof Request.ContentListener)
      notifyContent((Request.ContentListener)listener, request, content);
  }
  List<Request.Listener> listeners = client.getRequestListeners();
  for (int i = 0; i < listeners.size(); ++i)
  {
    Request.Listener listener = listeners.get(i);
    notifyContent(listener, request, content);
  }
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9

public void notifySuccess(Request request)
{
  // Optimized to avoid allocations of iterator instances
  List<Request.RequestListener> requestListeners = request.getRequestListeners(null);
  for (int i = 0; i < requestListeners.size(); ++i)
  {
    Request.RequestListener listener = requestListeners.get(i);
    if (listener instanceof Request.SuccessListener)
      notifySuccess((Request.SuccessListener)listener, request);
  }
  List<Request.Listener> listeners = client.getRequestListeners();
  for (int i = 0; i < listeners.size(); ++i)
  {
    Request.Listener listener = listeners.get(i);
    notifySuccess(listener, request);
  }
}

代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9

public void notifyHeaders(Request request)
{
  // Optimized to avoid allocations of iterator instances
  List<Request.RequestListener> requestListeners = request.getRequestListeners(null);
  for (int i = 0; i < requestListeners.size(); ++i)
  {
    Request.RequestListener listener = requestListeners.get(i);
    if (listener instanceof Request.HeadersListener)
      notifyHeaders((Request.HeadersListener)listener, request);
  }
  List<Request.Listener> listeners = client.getRequestListeners();
  for (int i = 0; i < listeners.size(); ++i)
  {
    Request.Listener listener = listeners.get(i);
    notifyHeaders(listener, request);
  }
}

代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9

public void notifyContent(Request request, ByteBuffer content)
{
  // Optimized to avoid allocations of iterator instances
  List<Request.RequestListener> requestListeners = request.getRequestListeners(null);
  for (int i = 0; i < requestListeners.size(); ++i)
  {
    Request.RequestListener listener = requestListeners.get(i);
    if (listener instanceof Request.ContentListener)
      notifyContent((Request.ContentListener)listener, request, content);
  }
  List<Request.Listener> listeners = client.getRequestListeners();
  for (int i = 0; i < listeners.size(); ++i)
  {
    Request.Listener listener = listeners.get(i);
    notifyContent(listener, request, content);
  }
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9

public void notifyQueued(Request request)
{
  // Optimized to avoid allocations of iterator instances
  List<Request.RequestListener> requestListeners = request.getRequestListeners(null);
  for (int i = 0; i < requestListeners.size(); ++i)
  {
    Request.RequestListener listener = requestListeners.get(i);
    if (listener instanceof Request.QueuedListener)
      notifyQueued((Request.QueuedListener)listener, request);
  }
  List<Request.Listener> listeners = client.getRequestListeners();
  for (int i = 0; i < listeners.size(); ++i)
  {
    Request.Listener listener = listeners.get(i);
    notifyQueued(listener, request);
  }
}

代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9

public void notifyFailure(Request request, Throwable failure)
{
  // Optimized to avoid allocations of iterator instances
  List<Request.RequestListener> requestListeners = request.getRequestListeners(null);
  for (int i = 0; i < requestListeners.size(); ++i)
  {
    Request.RequestListener listener = requestListeners.get(i);
    if (listener instanceof Request.FailureListener)
      notifyFailure((Request.FailureListener)listener, request, failure);
  }
  List<Request.Listener> listeners = client.getRequestListeners();
  for (int i = 0; i < listeners.size(); ++i)
  {
    Request.Listener listener = listeners.get(i);
    notifyFailure(listener, request, failure);
  }
}

代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9

public void notifyBegin(Request request)
{
  // Optimized to avoid allocations of iterator instances
  List<Request.RequestListener> requestListeners = request.getRequestListeners(null);
  for (int i = 0; i < requestListeners.size(); ++i)
  {
    Request.RequestListener listener = requestListeners.get(i);
    if (listener instanceof Request.BeginListener)
      notifyBegin((Request.BeginListener)listener, request);
  }
  List<Request.Listener> listeners = client.getRequestListeners();
  for (int i = 0; i < listeners.size(); ++i)
  {
    Request.Listener listener = listeners.get(i);
    notifyBegin(listener, request);
  }
}

代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9

public void notifyFailure(Request request, Throwable failure)
{
  // Optimized to avoid allocations of iterator instances
  List<Request.RequestListener> requestListeners = request.getRequestListeners(null);
  for (int i = 0; i < requestListeners.size(); ++i)
  {
    Request.RequestListener listener = requestListeners.get(i);
    if (listener instanceof Request.FailureListener)
      notifyFailure((Request.FailureListener)listener, request, failure);
  }
  List<Request.Listener> listeners = client.getRequestListeners();
  for (int i = 0; i < listeners.size(); ++i)
  {
    Request.Listener listener = listeners.get(i);
    notifyFailure(listener, request, failure);
  }
}

相关文章

HttpClient类方法