pcap: Rename packages to org.eclipse.tracecompass.*
[deliverable/tracecompass.git] / org.eclipse.tracecompass.lttng2.control.core / src / org / eclipse / linuxtools / internal / lttng2 / control / core / relayd / ILttngRelaydConnector.java
1 /**********************************************************************
2 * Copyright (c) 2014 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 * Matthew Khouzam - Initial implementation
11 **********************************************************************/
12
13 package org.eclipse.linuxtools.internal.lttng2.control.core.relayd;
14
15 import java.io.IOException;
16 import java.util.List;
17
18 import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.AttachSessionResponse;
19 import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.CreateSessionResponse;
20 import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.IndexResponse;
21 import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.SessionResponse;
22 import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.StreamResponse;
23 import org.eclipse.linuxtools.internal.lttng2.control.core.relayd.lttngviewerCommands.TracePacketResponse;
24
25 /**
26 * Connector for Lttng Relayd
27 *
28 * @author Matthew Khouzam
29 * @since 3.0
30 */
31 public interface ILttngRelaydConnector extends AutoCloseable {
32
33 /**
34 * Gets a list of active Lttng sessions
35 *
36 * @return the session List (we need the get function)
37 * @throws IOException
38 * timeout and such
39 */
40 List<SessionResponse> getSessions() throws IOException;
41
42 /**
43 * Create a session
44 *
45 * @return create session response
46 * @throws IOException
47 * timeout and such
48 */
49 CreateSessionResponse createSession() throws IOException;
50
51 /**
52 * Attach the trace viewer to a Session
53 *
54 * @param lttngViewerSession
55 * viewer session
56 * @return An AttachSessionResponse
57 * @throws IOException
58 * timeout and such
59 */
60 AttachSessionResponse attachToSession(SessionResponse lttngViewerSession) throws IOException;
61
62 /**
63 * Get the metadata from the relayd
64 *
65 * @param attachedSession
66 * the attached session
67 * @return a chunk of TSDL metadata
68 * @throws IOException
69 * timeout and such
70 */
71 String getMetadata(AttachSessionResponse attachedSession) throws IOException;
72
73 /**
74 * Get the next index
75 *
76 * @param stream
77 * the stream
78 * @return the stream input packet entry
79 * @throws IOException
80 * timeout and such
81 */
82 IndexResponse getNextIndex(StreamResponse stream) throws IOException;
83
84 /**
85 * Get the next packet in a stream
86 *
87 * @param stream
88 * the stream response
89 * @return the packet response
90 * @throws IOException
91 * timeout and such
92 */
93 TracePacketResponse getNextPacket(StreamResponse stream) throws IOException;
94
95 /**
96 * Gets the packet from the stream
97 *
98 * @param index
99 * the index of the stream
100 * @param id
101 * the stream id
102 * @return the packet response
103 * @throws IOException
104 * timeout and such
105 */
106 TracePacketResponse getPacketFromStream(IndexResponse index, long id) throws IOException;
107
108 /**
109 * Gets the new streams
110 *
111 * @return a list of stream responses
112 * @throws IOException
113 * timeout and such
114 */
115 Iterable<StreamResponse> getNewStreams() throws IOException;
116
117 @Override
118 void close() throws IOException;
119 }
This page took 0.033911 seconds and 5 git commands to generate.