@Override public SessionID createIdentifier() { final UUID uuid = UUID.randomUUID(); ByteBuffer bb = ByteBuffer.wrap(new byte[16]); bb.putLong(uuid.getMostSignificantBits()); bb.putLong(uuid.getLeastSignificantBits()); return SessionID.createSessionID(bb.array()); }
@Override public SessionID readObject(ObjectInput input) throws IOException { byte[] encoded = new byte[input.readInt()]; input.readFully(encoded); return SessionID.createSessionID(encoded); }