use of org.eclipse.wst.internet.monitor.core.internal.provisional.Request in project webtools.servertools by eclipse.
the class HTTPConnection method getRequestResponse.
/**
*/
protected Request getRequestResponse(int i) {
synchronized (this) {
while (i >= requests.size()) {
Request request = new HTTPRequest((Monitor) monitor, monitor.getLocalPort(), monitor.getRemoteHost(), monitor.getRemotePort());
requests.add(request);
return request;
}
return requests.get(i);
}
}
use of org.eclipse.wst.internet.monitor.core.internal.provisional.Request in project webtools.servertools by eclipse.
the class RequestComparator method compare.
/*
* @see ViewerSorter#compare(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
*/
public int compare(Viewer viewer, Object o1, Object o2) {
if (o1 instanceof Request && o2 instanceof Request) {
Request r1 = (Request) o1;
Request r2 = (Request) o2;
if (r1.getResponseTime() < r2.getResponseTime())
return -1;
return 1;
}
return super.compare(viewer, o1, o2);
}
Aggregations