T
- the type of the object to writepublic interface ObjectDataWriter<T>
OutputConverter
which than is
passed into an OutputDataSource
that is able to write the serialized data a
certain source.Modifier and Type | Method and Description |
---|---|
GluonObservableObject<T> |
newGluonObservableObject()
Provide an instance of a GluonObservableObject.
|
java.util.Optional<T> |
writeObject(T object)
Writes the object and optionally returns one.
|
GluonObservableObject<T> newGluonObservableObject()
DataProvider.storeObject(Object, ObjectDataWriter)
to get a GluonObservableObject that will contain the actual object when the store operation has completed
successfully. Most implementations will just return an instance of GluonObservableObject itself. Note that it is
perfectly valid to return existing instances of GluonObservableObject.java.util.Optional<T> writeObject(T object) throws java.io.IOException
DataProvider.storeObject(Object, ObjectDataWriter)
to initiate the actual write process. The returned
object will be set on the final GluonObservableObject that is provided by this writer's
newGluonObservableObject()
method. The returned object can be the same as the provided object or it
can be a completely new object. An empty Optional can be returned as well, which is the same as returning the
provided object.object
- the object to writejava.io.IOException
- when an exception occurred during the write process