1 /*******************************************************************************
2 * Copyright (c) 2009, 2010 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
.request
;
15 import org
.eclipse
.linuxtools
.tmf
.event
.TmfData
;
18 * <b><u>ITmfDataRequest</u></b>
20 * TODO: Implement me. Please.
22 public interface ITmfDataRequest
<T
extends TmfData
> {
24 // ------------------------------------------------------------------------
26 // ------------------------------------------------------------------------
28 public enum ExecutionType
{ BACKGROUND
, FOREGROUND
};
30 // ------------------------------------------------------------------------
32 // ------------------------------------------------------------------------
35 * @return request data type (T)
37 public Class
<T
> getDataType();
42 public int getRequestId();
47 public ExecutionType
getExecType();
50 * @return the index of the first event requested
52 public int getIndex();
55 * @return the number of requested events
57 public int getNbRequested();
60 * @return the number of events read so far
62 public int getNbRead();
64 // ------------------------------------------------------------------------
66 // ------------------------------------------------------------------------
68 public boolean isRunning();
69 public boolean isCompleted();
70 public boolean isFailed();
71 public boolean isCancelled();
73 // ------------------------------------------------------------------------
75 // ------------------------------------------------------------------------
77 public void handleData(T data
);
79 // ------------------------------------------------------------------------
81 // ------------------------------------------------------------------------
83 public void handleStarted();
84 public void handleCompleted();
85 public void handleSuccess();
86 public void handleFailure();
87 public void handleCancel();
90 * To suspend the client thread until the request completes
93 public void waitForCompletion() throws InterruptedException
;
95 // ------------------------------------------------------------------------
96 // Request state modifiers
97 // ------------------------------------------------------------------------
102 public void cancel();
This page took 0.036442 seconds and 5 git commands to generate.