/** * Java Serialization API Method that provides a replacement to serialize, as the fields contained in this instance * are not serializable themselves. * * @return the GenericMessage to use as a replacement when serializing */ protected Object writeReplace() { return new GenericMessage<>(getIdentifier(), getPayload(), getMetaData()); } }
@Override protected SerializedMessage<T> withMetaData(MetaData metaData) { if (getMetaData().equals(metaData)) { return this; } return new SerializedMessage<>(this, new LazyDeserializingObject<>(metaData)); }
/** * Java Serialization API Method that provides a replacement to serialize, as the fields contained in this instance * are not serializable themselves. * * @return the GenericMessage to use as a replacement when serializing */ protected Object writeReplace() { return new GenericMessage<>(getIdentifier(), getPayload(), getMetaData()); } }
/** * Java Serialization API Method that provides a replacement to serialize, as the fields contained in this instance * are not serializable themselves. * * @return the GenericMessage to use as a replacement when serializing */ protected Object writeReplace() { return new GenericMessage<>(getIdentifier(), getPayload(), getMetaData()); } }
@Override protected SerializedMessage<T> withMetaData(MetaData metaData) { if (getMetaData().equals(metaData)) { return this; } return new SerializedMessage<>(this, new LazyDeserializingObject<>(metaData)); }
@Override protected SerializedMessage<T> withMetaData(MetaData metaData) { if (getMetaData().equals(metaData)) { return this; } return new SerializedMessage<>(this, new LazyDeserializingObject<>(metaData)); }