本文整理了Java中org.eclipse.jetty.client.api.Request.getRequestListeners
方法的一些代码示例,展示了Request.getRequestListeners
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.getRequestListeners
方法的具体详情如下:
包路径:org.eclipse.jetty.client.api.Request
类名称:Request
方法名:getRequestListeners
暂无
代码示例来源: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 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: census-instrumentation/opencensus-java
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
OcJettyHttpClient client = new OcJettyHttpClient();
request = client.newRequest("http://www.example.com/foo");
listener = request.getRequestListeners(HttpRequestListener.class).get(0);
// for onComplete() test
context = handler.handleStart(null, requestObj, responseObj);
listenerWithMockhandler = new HttpRequestListener(null, mockHandler);
}
内容来源于网络,如有侵权,请联系作者删除!