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