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
.linuxtools
.internal
.lttng2
.control
.core
.relayd
;
15 import java
.io
.IOException
;
16 import java
.util
.List
;
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
;
26 * Connector for Lttng Relayd
28 * @author Matthew Khouzam
31 public interface ILttngRelaydConnector
extends AutoCloseable
{
34 * Gets a list of active Lttng sessions
36 * @return the session List (we need the get function)
40 List
<SessionResponse
> getSessions() throws IOException
;
45 * @return create session response
49 CreateSessionResponse
createSession() throws IOException
;
52 * Attach the trace viewer to a Session
54 * @param lttngViewerSession
56 * @return An AttachSessionResponse
60 AttachSessionResponse
attachToSession(SessionResponse lttngViewerSession
) throws IOException
;
63 * Get the metadata from the relayd
65 * @param attachedSession
66 * the attached session
67 * @return a chunk of TSDL metadata
71 String
getMetadata(AttachSessionResponse attachedSession
) throws IOException
;
78 * @return the stream input packet entry
82 IndexResponse
getNextIndex(StreamResponse stream
) throws IOException
;
85 * Get the next packet in a stream
89 * @return the packet response
93 TracePacketResponse
getNextPacket(StreamResponse stream
) throws IOException
;
96 * Gets the packet from the stream
99 * the index of the stream
102 * @return the packet response
103 * @throws IOException
106 TracePacketResponse
getPacketFromStream(IndexResponse index
, long id
) throws IOException
;
109 * Gets the new streams
111 * @return a list of stream responses
112 * @throws IOException
115 Iterable
<StreamResponse
> getNewStreams() throws IOException
;
118 void close() throws IOException
;