コード例 #1
0
  @Override
  public void write(ObjectOutputStream out) throws IOException {
    super.write(out);

    SerializationUtils.writeCollection(remoteDestinations, out);
    SerializationUtils.writeCollection(throughPeers, out);
    out.writeBoolean(directBroadcast);
  }
コード例 #2
0
  @Override
  public void read(ObjectInputStream in) throws IOException {
    super.read(in);

    SerializationUtils.readPeers(remoteDestinations, in);
    SerializationUtils.readPeers(throughPeers, in);
    SerializationUtils.setFinalField(
        RemoteMulticastMessage.class, this, "directBroadcast", in.readBoolean());
  }