2 * Copyright (C) 2013 - David Goulet <dgoulet@efficios.com>
4 * This library is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU Lesser General Public License, version 2.1 only,
6 * as published by the Free Software Foundation.
8 * This library is distributed in the hope that it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this library; if not, write to the Free Software Foundation,
15 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 package org
.lttng
.ust
.agent
.client
;
20 import java
.nio
.ByteBuffer
;
21 import java
.nio
.ByteOrder
;
23 class SessiondHeaderCommand
implements ISessiondCommand
{
25 /** ABI size of command header. */
26 public static final int HEADER_SIZE
= 16;
28 /** Payload size in bytes following this header. */
29 private long dataSize
;
31 private LttngAgentCommand cmd
;
34 public void populate(byte[] data
) {
35 ByteBuffer buf
= ByteBuffer
.wrap(data
);
36 buf
.order(ByteOrder
.BIG_ENDIAN
);
38 dataSize
= buf
.getLong();
39 cmd
= LttngAgentCommand
.values()[buf
.getInt() - 1];
40 buf
.getInt(); // command version, currently unused
43 public long getDataSize() {
47 public LttngAgentCommand
getCommandType() {
This page took 0.031297 seconds and 4 git commands to generate.