Search in sources :

Example 11 with Request

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);
    }
}
Also used : Request(org.eclipse.wst.internet.monitor.core.internal.provisional.Request)

Example 12 with Request

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);
}
Also used : Request(org.eclipse.wst.internet.monitor.core.internal.provisional.Request)

Aggregations

Request (org.eclipse.wst.internet.monitor.core.internal.provisional.Request)12 ResendHTTPRequest (org.eclipse.wst.internet.monitor.core.internal.http.ResendHTTPRequest)6 StructuredSelection (org.eclipse.jface.viewers.StructuredSelection)3 TreeViewer (org.eclipse.jface.viewers.TreeViewer)3 ArrayList (java.util.ArrayList)2 InputStream (java.io.InputStream)1 Iterator (java.util.Iterator)1 List (java.util.List)1 GroupMarker (org.eclipse.jface.action.GroupMarker)1 IMenuListener (org.eclipse.jface.action.IMenuListener)1 IMenuManager (org.eclipse.jface.action.IMenuManager)1 MenuManager (org.eclipse.jface.action.MenuManager)1 ISelection (org.eclipse.jface.viewers.ISelection)1 ISelectionChangedListener (org.eclipse.jface.viewers.ISelectionChangedListener)1 IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)1 SelectionChangedEvent (org.eclipse.jface.viewers.SelectionChangedEvent)1 SashForm (org.eclipse.swt.custom.SashForm)1 SelectionEvent (org.eclipse.swt.events.SelectionEvent)1 SelectionListener (org.eclipse.swt.events.SelectionListener)1 GridData (org.eclipse.swt.layout.GridData)1