Remove all existing @since annotations
[deliverable/tracecompass.git] / org.eclipse.tracecompass.lttng2.control.core / src / org / eclipse / tracecompass / internal / lttng2 / control / core / relayd / lttngviewerCommands / NewStreamsRequest.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 and API
11 * Marc-Andre Laperle - Initial implementation and API
12 **********************************************************************/
13
9bc60be7 14package org.eclipse.tracecompass.internal.lttng2.control.core.relayd.lttngviewerCommands;
8e15b929
MK
15
16import java.nio.ByteBuffer;
17import java.nio.ByteOrder;
18
19/**
20 * LTTNG_VIEWER_GET_NEW_STREAMS payload.
21 *
22 * @author Matthew Khouzam
8e15b929
MK
23 */
24public class NewStreamsRequest implements IRelayCommand {
25
26 /**
8adfbb73 27 * Command size (fSessionId)
8e15b929
MK
28 */
29 public static final int SIZE = Long.SIZE / 8;
30
31 /** session ID */
32 private final long fSessionId;
33
34 /**
35 * Constructor
36 *
37 * @param sessionId
38 * the session id we want
39 */
40 public NewStreamsRequest(long sessionId) {
41 fSessionId = sessionId;
42 }
43
44 @Override
45 public byte[] serialize() {
46 byte data[] = new byte[SIZE];
47 ByteBuffer bb = ByteBuffer.wrap(data);
48 bb.order(ByteOrder.BIG_ENDIAN);
49 bb.putLong(fSessionId);
50 return data;
51 }
6fd3c6e9 52}
This page took 0.038902 seconds and 5 git commands to generate.