public abstract class AbstractODataBatchResponseItem extends Object implements ODataBatchResponseItem
| Modifier and Type | Field and Description |
|---|---|
protected ODataBatchLineIterator |
batchLineIterator
Batch response line iterator.
|
protected String |
boundary
Batch boundary.
|
protected boolean |
breaking |
protected boolean |
closed
Gives information about the batch response item status.
|
protected ODataResponse |
current
Last cached OData response.
|
protected Iterator<ODataResponse> |
expectedItemsIterator
Expected OData responses iterator.
|
protected static org.slf4j.Logger |
LOG
Logger.
|
protected Map<String,ODataResponse> |
responses
Expected OData responses for the current batch response item.
|
| Constructor and Description |
|---|
AbstractODataBatchResponseItem(boolean isChangeset)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addResponse(String contentId,
ODataResponse res)
Adds the given OData response template to the current OData batch response item.
|
void |
close()
Closes the current batch responses item including all wrapped OData responses.
|
protected ODataResponse |
getResponse(String contentId)
Gets response about the given contentId.
|
protected Iterator<ODataResponse> |
getResponseIterator()
Gets OData responses iterator.
|
boolean |
hasNext() |
void |
initFromBatch(ODataBatchLineIterator batchLineIterator,
String boundary)
Initializes ODataResponse template from batch response item part.
|
boolean |
isBreaking()
Checks if the current item is a breaking item like as error item or asynchronous response part.
|
boolean |
isChangeset()
Checks if the current batch response item is a changeset.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemaining, next, removeprotected static final org.slf4j.Logger LOG
protected final Map<String,ODataResponse> responses
protected Iterator<ODataResponse> expectedItemsIterator
protected ODataBatchLineIterator batchLineIterator
protected String boundary
protected boolean closed
protected ODataResponse current
protected boolean breaking
public AbstractODataBatchResponseItem(boolean isChangeset)
isChangeset - 'TRUE' if the current batch response item is a changeset.public void addResponse(String contentId, ODataResponse res)
addResponse in interface ODataBatchResponseItemcontentId - changeset contentId in case of changeset; '__RETRIEVE__' in case of retrieve item.res - OData response template to be added.public void initFromBatch(ODataBatchLineIterator batchLineIterator, String boundary)
initFromBatch in interface ODataBatchResponseItembatchLineIterator - batch response line iterator.boundary - batch response boundary.protected ODataResponse getResponse(String contentId)
contentId - response identifier (a specific contentId in case of changeset item).protected Iterator<ODataResponse> getResponseIterator()
public boolean hasNext()
hasNext in interface Iterator<ODataResponse>public boolean isBreaking()
isBreaking in interface ODataBatchResponseItempublic final boolean isChangeset()
isChangeset in interface ODataBatchResponseItempublic void close()
close in interface ODataBatchResponseItemCopyright © 2023. All rights reserved.