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 block size (for BG requests)
62 public int getBlockSize();
65 * @return the number of events read so far
67 public int getNbRead();
69 // ------------------------------------------------------------------------
71 // ------------------------------------------------------------------------
73 public boolean isRunning();
74 public boolean isCompleted();
75 public boolean isFailed();
76 public boolean isCancelled();
78 // ------------------------------------------------------------------------
80 // ------------------------------------------------------------------------
82 public void handleData(T data
);
84 // ------------------------------------------------------------------------
86 // ------------------------------------------------------------------------
88 public void handleStarted();
89 public void handleCompleted();
90 public void handleSuccess();
91 public void handleFailure();
92 public void handleCancel();
95 * To suspend the client thread until the request completes
98 public void waitForCompletion() throws InterruptedException
;
100 // ------------------------------------------------------------------------
101 // Request state modifiers
102 // ------------------------------------------------------------------------
107 public void cancel();
This page took 0.058651 seconds and 5 git commands to generate.