- private void registerToSessiond() throws IOException {
- byte data[] = new byte[16];
- ByteBuffer buf = ByteBuffer.wrap(data);
- String pid = ManagementFactory.getRuntimeMXBean().getName().split("@")[0];
-
- buf.putInt(logAgent.getDomain().value());
- buf.putInt(Integer.parseInt(pid));
- buf.putInt(protocolMajorVersion);
- buf.putInt(protocolMinorVersion);
- this.outToSessiond.write(data, 0, data.length);
- this.outToSessiond.flush();
- }