public class JsonDeltaStreamWriter extends DeltaStreamWriter
A response stream writer for OData JSON delta responses.
Constructor and Description |
---|
JsonDeltaStreamWriter(CharStream stream,
DataQuery query,
EntityValueList result,
DataContext context)
Construct a new JSON delta stream writer.
|
Modifier and Type | Method and Description |
---|---|
void |
finish(java.lang.RuntimeException error)
Finish writing stream.
|
void |
start()
Start writing stream.
|
void |
writeEntity(EntityValue entity)
Write a changed entity to this stream.
|
void |
writeLink(ChangedLink link)
Write a changed link to this stream.
|
public JsonDeltaStreamWriter(CharStream stream, DataQuery query, EntityValueList result, DataContext context)
Construct a new JSON delta stream writer.
stream
- Character stream to receive streamed response.query
- Delta query.result
- Result buffer.context
- Data context.public void finish(java.lang.RuntimeException error)
Finish writing stream.
finish
in class DeltaStreamWriter
error
- (nullable) Optional error. If null
, the stream is valid. If non-null
, the stream (received by client) will be intentionally malformed.public void start()
Start writing stream.
start
in class DeltaStreamWriter
public void writeEntity(EntityValue entity)
Write a changed entity to this stream.
writeEntity
in class DeltaStreamWriter
entity
- Changed entity.public void writeLink(ChangedLink link)
Write a changed link to this stream.
writeLink
in class DeltaStreamWriter
link
- Changed link.