1 /**********************************************************************
2 * Copyright (c) 2014 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 * Matthew Khouzam - Initial implementation
11 **********************************************************************/
13 package org
.eclipse
.tracecompass
.internal
.lttng2
.control
.core
.relayd
;
15 import java
.io
.IOException
;
16 import java
.util
.List
;
18 import org
.eclipse
.tracecompass
.internal
.lttng2
.control
.core
.relayd
.lttngviewerCommands
.AttachSessionResponse
;
19 import org
.eclipse
.tracecompass
.internal
.lttng2
.control
.core
.relayd
.lttngviewerCommands
.CreateSessionResponse
;
20 import org
.eclipse
.tracecompass
.internal
.lttng2
.control
.core
.relayd
.lttngviewerCommands
.IndexResponse
;
21 import org
.eclipse
.tracecompass
.internal
.lttng2
.control
.core
.relayd
.lttngviewerCommands
.SessionResponse
;
22 import org
.eclipse
.tracecompass
.internal
.lttng2
.control
.core
.relayd
.lttngviewerCommands
.StreamResponse
;
23 import org
.eclipse
.tracecompass
.internal
.lttng2
.control
.core
.relayd
.lttngviewerCommands
.TracePacketResponse
;
26 * Connector for Lttng Relayd
28 * @author Matthew Khouzam
30 public interface ILttngRelaydConnector
extends AutoCloseable
{
33 * Gets a list of active Lttng sessions
35 * @return the session List (we need the get function)
39 List
<SessionResponse
> getSessions() throws IOException
;
44 * @return create session response
48 CreateSessionResponse
createSession() throws IOException
;
51 * Attach the trace viewer to a Session
53 * @param lttngViewerSession
55 * @return An AttachSessionResponse
59 AttachSessionResponse
attachToSession(SessionResponse lttngViewerSession
) throws IOException
;
62 * Get the metadata from the relayd
64 * @param attachedSession
65 * the attached session
66 * @return a chunk of TSDL metadata
70 String
getMetadata(AttachSessionResponse attachedSession
) throws IOException
;
77 * @return the stream input packet entry
81 IndexResponse
getNextIndex(StreamResponse stream
) throws IOException
;
84 * Get the next packet in a stream
88 * @return the packet response
92 TracePacketResponse
getNextPacket(StreamResponse stream
) throws IOException
;
95 * Gets the packet from the stream
98 * the index of the stream
101 * @return the packet response
102 * @throws IOException
105 TracePacketResponse
getPacketFromStream(IndexResponse index
, long id
) throws IOException
;
108 * Gets the new streams
110 * @return a list of stream responses
111 * @throws IOException
114 Iterable
<StreamResponse
> getNewStreams() throws IOException
;
117 void close() throws IOException
;