| 1 | /******************************************************************************* |
| 2 | * Copyright (c) 2009, 2010 Ericsson |
| 3 | * |
| 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 |
| 8 | * |
| 9 | * Contributors: |
| 10 | * Francois Chouinard - Initial API and implementation |
| 11 | *******************************************************************************/ |
| 12 | |
| 13 | package org.eclipse.linuxtools.tmf.core.component; |
| 14 | |
| 15 | import org.eclipse.linuxtools.tmf.core.event.ITmfEvent; |
| 16 | import org.eclipse.linuxtools.tmf.core.request.ITmfDataRequest; |
| 17 | import org.eclipse.linuxtools.tmf.core.trace.ITmfContext; |
| 18 | |
| 19 | /** |
| 20 | * <b><u>ITmfDataRequest</u></b> |
| 21 | * <p> |
| 22 | * TODO: Implement me. Please. |
| 23 | */ |
| 24 | public interface ITmfDataProvider<T extends ITmfEvent> extends ITmfComponent { |
| 25 | |
| 26 | /** |
| 27 | * Queues the request for processing. |
| 28 | * |
| 29 | * If the request can't be serviced, it will fail (i.e. isFailed() will be set). |
| 30 | * |
| 31 | * @param request The request to process |
| 32 | */ |
| 33 | public void sendRequest(ITmfDataRequest<T> request); |
| 34 | public void fireRequest(); |
| 35 | public void notifyPendingRequest(boolean isIncrement); |
| 36 | |
| 37 | /** |
| 38 | * Return the next event based on the context supplied. The context |
| 39 | * will be updated for the subsequent read. |
| 40 | * |
| 41 | * @param context the trace read context (updated) |
| 42 | * @return the event referred to by context |
| 43 | */ |
| 44 | public T getNext(ITmfContext context); |
| 45 | } |