1 /*******************************************************************************
2 * Copyright (c) 2012 Ericsson
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * Francois Chouinard - Initial API and implementation
11 *******************************************************************************/
13 package org
.eclipse
.linuxtools
.tmf
.tests
.stubs
.request
;
15 import org
.eclipse
.linuxtools
.tmf
.core
.event
.ITmfEvent
;
16 import org
.eclipse
.linuxtools
.tmf
.core
.event
.TmfTimeRange
;
17 import org
.eclipse
.linuxtools
.tmf
.core
.request
.TmfRequest
;
20 * <b><u>TmfRequestStub</u></b>
22 public class TmfRequestStub
extends TmfRequest
{
25 * Constructor for all the events at normal priority
27 public TmfRequestStub() {
32 * Constructor for all the events at the specified priority
34 * @param priority the request priority
36 public TmfRequestStub(TmfRequestPriority priority
) {
41 * Constructor for all the events in a time range
43 * @param timeRange The time range
45 public TmfRequestStub(TmfTimeRange timeRange
) {
50 * Constructor for all the events in a block
52 * @param startIndex The start index
53 * @param nbRequested The number of events requested
55 public TmfRequestStub(long startIndex
, long nbRequested
) {
56 super(startIndex
, nbRequested
);
60 * Standard constructor
62 * @param timeRange The time range
63 * @param startIndex The start index
64 * @param nbRequested The number of events requested
66 public TmfRequestStub(TmfTimeRange timeRange
, long startIndex
, long nbRequested
) {
67 super(timeRange
, startIndex
, nbRequested
);
73 * @param timeRange Time range of interest
74 * @param nbRequested Number of events requested
75 * @param startIndex Index of the first event requested
76 * @param priority Request priority
78 public TmfRequestStub(TmfTimeRange timeRange
, long startIndex
, long nbRequested
, TmfRequestPriority priority
) {
79 super(timeRange
, startIndex
, nbRequested
, priority
);
85 * @param other the other request
87 public TmfRequestStub(TmfRequestStub other
) {
92 * @param timeRange the time range
95 public void setTimeRange(TmfTimeRange timeRange
) {
96 super.setTimeRange(timeRange
);
100 * @param nbRequested the number of events requested
103 public void setNbRequested(long nbRequested
) {
104 super.setNbRequested(nbRequested
);
108 * @param index the index of the first event requested
111 public void setStartIndex(long index
) {
112 super.setStartIndex(index
);
116 * @see org.eclipse.linuxtools.tmf.core.request.TmfRequest#handleEvent(org.eclipse.linuxtools.tmf.core.event.ITmfEvent)
119 public synchronized void handleEvent(final ITmfEvent data
) {
120 super.handleEvent(data
);