You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by sk...@apache.org on 2014/05/22 12:35:47 UTC

[04/19] git commit: batch method and manager renaming

batch method and manager renaming


Project: http://git-wip-us.apache.org/repos/asf/olingo-odata4/repo
Commit: http://git-wip-us.apache.org/repos/asf/olingo-odata4/commit/8ad67fed
Tree: http://git-wip-us.apache.org/repos/asf/olingo-odata4/tree/8ad67fed
Diff: http://git-wip-us.apache.org/repos/asf/olingo-odata4/diff/8ad67fed

Branch: refs/heads/olingo-266-tecsvc
Commit: 8ad67fede040ad8936d7bd25437f7632caff2505
Parents: 7d6c587
Author: fmartelli <fa...@gmail.com>
Authored: Tue May 20 14:37:43 2014 +0200
Committer: fmartelli <fa...@gmail.com>
Committed: Tue May 20 14:37:43 2014 +0200

----------------------------------------------------------------------
 .../olingo/ext/proxy/commons/ContainerImpl.java |   4 +-
 .../apache/olingo/fit/v3/AsyncTestITCase.java   |   2 +-
 .../apache/olingo/fit/v3/BatchTestITCase.java   |  32 ++---
 .../olingo/fit/v3/MediaEntityTestITCase.java    |   6 +-
 .../apache/olingo/fit/v4/BatchTestITCase.java   |  56 +++-----
 .../olingo/fit/v4/MediaEntityTestITCase.java    |   4 +-
 .../request/ODataPayloadManager.java            |  57 ++++++++
 .../request/ODataStreamManager.java             |  57 --------
 .../request/ODataStreamedRequest.java           |   6 +-
 .../request/batch/BatchManager.java             |  43 ++++++
 .../request/batch/BatchStreamManager.java       |  42 ------
 .../request/batch/v3/BatchManager.java          |  25 ++++
 .../request/batch/v3/BatchStreamManager.java    |  26 ----
 .../request/batch/v3/ODataBatchRequest.java     |   2 +-
 .../request/batch/v4/BatchManager.java          |  35 +++++
 .../request/batch/v4/BatchStreamManager.java    |  34 -----
 .../request/batch/v4/ODataBatchRequest.java     |   2 +-
 .../MediaEntityCreateStreamManager.java         |   4 +-
 .../MediaEntityUpdateStreamManager.java         |   4 +-
 .../streamed/ODataStreamedEntityRequest.java    |   4 +-
 .../streamed/StreamUpdateStreamManager.java     |   4 +-
 .../request/v4/AsyncBatchRequestWrapper.java    |  15 +-
 .../request/AbstractODataStreamManager.java     |   4 +-
 .../request/batch/AbstractBatchManager.java     | 139 +++++++++++++++++++
 .../batch/AbstractBatchStreamManager.java       | 138 ------------------
 .../batch/AbstractODataBatchRequest.java        |   6 +-
 .../request/batch/v3/ODataBatchRequestImpl.java |  22 +--
 .../request/batch/v4/ODataBatchRequestImpl.java |  27 ++--
 .../AbstractODataStreamedEntityRequest.java     |   4 +-
 .../streamed/AbstractODataStreamedRequest.java  |  20 +--
 .../ODataMediaEntityCreateRequestImpl.java      |   8 +-
 .../ODataMediaEntityUpdateRequestImpl.java      |   8 +-
 .../streamed/ODataStreamUpdateRequestImpl.java  |   8 +-
 .../v4/AsyncBatchRequestWrapperImpl.java        |  21 ++-
 34 files changed, 424 insertions(+), 445 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/8ad67fed/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/ContainerImpl.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/ContainerImpl.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/ContainerImpl.java
index 675e104..abc7052 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/ContainerImpl.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/commons/ContainerImpl.java
@@ -34,7 +34,7 @@ import org.apache.olingo.client.api.CommonEdmEnabledODataClient;
 import org.apache.olingo.client.api.communication.header.ODataPreferences;
 import org.apache.olingo.client.api.communication.request.ODataRequest;
 import org.apache.olingo.client.api.communication.request.ODataStreamedRequest;
-import org.apache.olingo.client.api.communication.request.batch.BatchStreamManager;
+import org.apache.olingo.client.api.communication.request.batch.BatchManager;
 import org.apache.olingo.client.api.communication.request.batch.CommonODataBatchRequest;
 import org.apache.olingo.client.api.communication.request.batch.ODataBatchResponseItem;
 import org.apache.olingo.client.api.communication.request.batch.ODataChangeset;
@@ -90,7 +90,7 @@ class ContainerImpl implements Container {
     final CommonODataBatchRequest request = client.getBatchRequestFactory().getBatchRequest(client.getServiceRoot());
     ((ODataRequest) request).setAccept(client.getConfiguration().getDefaultBatchAcceptFormat());
 
-    final BatchStreamManager streamManager = (BatchStreamManager) ((ODataStreamedRequest) request).execute();
+    final BatchManager streamManager = (BatchManager) ((ODataStreamedRequest) request).payloadManager();
 
     final ODataChangeset changeset = streamManager.addChangeset();
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/8ad67fed/fit/src/test/java/org/apache/olingo/fit/v3/AsyncTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v3/AsyncTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v3/AsyncTestITCase.java
index 5b10eb1..a0d4d91 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v3/AsyncTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v3/AsyncTestITCase.java
@@ -101,7 +101,7 @@ public class AsyncTestITCase extends AbstractTestITCase {
     final ODataMediaEntityCreateRequest<ODataEntity> createReq =
             client.getStreamedRequestFactory().getMediaEntityCreateRequest(builder.build(), input);
 
-    final MediaEntityCreateStreamManager<ODataEntity> streamManager = createReq.execute();
+    final MediaEntityCreateStreamManager<ODataEntity> streamManager = createReq.payloadManager();
     final Future<ODataMediaEntityCreateResponse<ODataEntity>> futureCreateRes = streamManager.getAsyncResponse();
 
     while (!futureCreateRes.isDone()) {

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/8ad67fed/fit/src/test/java/org/apache/olingo/fit/v3/BatchTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v3/BatchTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v3/BatchTestITCase.java
index 3b73671..e623c26 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v3/BatchTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v3/BatchTestITCase.java
@@ -30,11 +30,10 @@ import java.util.concurrent.Future;
 import java.util.concurrent.TimeUnit;
 import org.apache.http.HttpResponse;
 import org.apache.olingo.client.api.ODataBatchConstants;
-import org.apache.olingo.client.api.communication.request.ODataStreamManager;
-import org.apache.olingo.client.api.communication.request.batch.BatchStreamManager;
+import org.apache.olingo.client.api.communication.request.ODataPayloadManager;
+import org.apache.olingo.client.api.communication.request.batch.BatchManager;
 import org.apache.olingo.client.api.communication.request.batch.ODataBatchResponseItem;
 import org.apache.olingo.client.api.communication.request.batch.ODataChangeset;
-import org.apache.olingo.client.api.communication.request.batch.ODataRetrieve;
 import org.apache.olingo.client.api.communication.request.batch.v3.ODataBatchRequest;
 import org.apache.olingo.client.api.communication.request.cud.ODataDeleteRequest;
 import org.apache.olingo.client.api.communication.request.cud.ODataEntityCreateRequest;
@@ -90,7 +89,7 @@ public class BatchTestITCase extends AbstractTestITCase {
     // create your request
     final ODataBatchRequest request = client.getBatchRequestFactory().getBatchRequest(testStaticServiceRootURL);
 
-    final BatchStreamManager payload = request.execute();
+    final BatchManager payload = request.payloadManager();
     final ODataBatchResponse response = payload.getResponse();
 
     assertEquals(202, response.getStatusCode());
@@ -105,7 +104,7 @@ public class BatchTestITCase extends AbstractTestITCase {
     // create your request
     final ODataBatchRequest request = client.getBatchRequestFactory().getBatchRequest(testStaticServiceRootURL);
 
-    final BatchStreamManager payload = request.execute();
+    final BatchManager payload = request.payloadManager();
     final ODataChangeset changeset = payload.addChangeset();
 
     URIBuilder targetURI;
@@ -158,7 +157,7 @@ public class BatchTestITCase extends AbstractTestITCase {
   public void changesetWithReference() throws EdmPrimitiveTypeException {
     // create your request
     final ODataBatchRequest request = client.getBatchRequestFactory().getBatchRequest(testStaticServiceRootURL);
-    final BatchStreamManager streamManager = request.execute();
+    final BatchManager streamManager = request.payloadManager();
 
     final ODataChangeset changeset = streamManager.addChangeset();
     ODataEntity customer = getSampleCustomerProfile(20, "sample customer", false);
@@ -234,7 +233,7 @@ public class BatchTestITCase extends AbstractTestITCase {
   public void updateLinkWithReference() throws EdmPrimitiveTypeException {
     // create your request
     final ODataBatchRequest request = client.getBatchRequestFactory().getBatchRequest(testStaticServiceRootURL);
-    final BatchStreamManager streamManager = request.execute();
+    final BatchManager streamManager = request.payloadManager();
 
     final ODataChangeset changeset = streamManager.addChangeset();
 
@@ -294,9 +293,9 @@ public class BatchTestITCase extends AbstractTestITCase {
 
     final ODataEntityRequest<ODataEntity> req = client.getRetrieveRequestFactory().getEntityRequest(
             URIUtils.getURI(testStaticServiceRootURL, uriBuilder.build() + "/Info"));
-    
+
     final ODataEntity navigatedInfo = req.execute().getBody();
-    
+
     assertEquals(infoEntity.getProperty("CustomerInfoId").getPrimitiveValue().toCastValue(Integer.class),
             navigatedInfo.getProperty("CustomerInfoId").getPrimitiveValue().toCastValue(Integer.class));
   }
@@ -307,13 +306,11 @@ public class BatchTestITCase extends AbstractTestITCase {
     // create your request
     final ODataBatchRequest request = client.getBatchRequestFactory().getBatchRequest(testStaticServiceRootURL);
 
-    final BatchStreamManager streamManager = request.execute();
+    final BatchManager streamManager = request.payloadManager();
 
     // -------------------------------------------
     // Add retrieve item
     // -------------------------------------------
-    ODataRetrieve retrieve = streamManager.addRetrieve();
-
     // prepare URI
     URIBuilder targetURI = client.getURIBuilder(testStaticServiceRootURL);
     targetURI.appendEntitySetSegment("Customer").appendKeySegment(-10).
@@ -323,7 +320,7 @@ public class BatchTestITCase extends AbstractTestITCase {
     ODataEntityRequest<ODataEntity> queryReq = client.getRetrieveRequestFactory().getEntityRequest(targetURI.build());
     queryReq.setFormat(ODataPubFormat.ATOM);
 
-    retrieve.setRequest(queryReq);
+    streamManager.addRetrieve(queryReq);
     // -------------------------------------------
 
     // -------------------------------------------
@@ -368,7 +365,6 @@ public class BatchTestITCase extends AbstractTestITCase {
     // -------------------------------------------
     // Add retrieve item
     // -------------------------------------------
-    retrieve = streamManager.addRetrieve();
 
     // prepare URI
     targetURI = client.getURIBuilder(testStaticServiceRootURL).
@@ -377,7 +373,7 @@ public class BatchTestITCase extends AbstractTestITCase {
     // create new request
     queryReq = client.getRetrieveRequestFactory().getEntityRequest(targetURI.build());
 
-    retrieve.setRequest(queryReq);
+    streamManager.addRetrieve(queryReq);
     // -------------------------------------------
 
     final ODataBatchResponse response = streamManager.getResponse();
@@ -448,7 +444,7 @@ public class BatchTestITCase extends AbstractTestITCase {
       super(new Wrapper<Future<HttpResponse>>());
     }
 
-    public ODataStreamManager<ODataBatchResponse> addObject(byte[] src) {
+    public ODataPayloadManager<ODataBatchResponse> addObject(byte[] src) {
       stream(src);
       return this;
     }
@@ -499,9 +495,9 @@ public class BatchTestITCase extends AbstractTestITCase {
 
   private static class BatchStreamingThread extends Thread {
 
-    private final BatchStreamManager streaming;
+    private final BatchManager streaming;
 
-    public BatchStreamingThread(final BatchStreamManager streaming) {
+    public BatchStreamingThread(final BatchManager streaming) {
       this.streaming = streaming;
     }
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/8ad67fed/fit/src/test/java/org/apache/olingo/fit/v3/MediaEntityTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v3/MediaEntityTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v3/MediaEntityTestITCase.java
index 4907378..f4a8ae0 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v3/MediaEntityTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v3/MediaEntityTestITCase.java
@@ -93,7 +93,7 @@ public class MediaEntityTestITCase extends AbstractTestITCase {
             client.getStreamedRequestFactory().getMediaEntityUpdateRequest(builder.build(), input);
     updateReq.setFormat(format);
 
-    final MediaEntityUpdateStreamManager<ODataEntity> streamManager = updateReq.execute();
+    final MediaEntityUpdateStreamManager<ODataEntity> streamManager = updateReq.payloadManager();
     final ODataMediaEntityUpdateResponse<ODataEntity> updateRes = streamManager.getResponse();
     assertEquals(204, updateRes.getStatusCode());
 
@@ -121,7 +121,7 @@ public class MediaEntityTestITCase extends AbstractTestITCase {
             client.getStreamedRequestFactory().getMediaEntityCreateRequest(builder.build(), input);
     createReq.setFormat(format);
 
-    final MediaEntityCreateStreamManager<ODataEntity> streamManager = createReq.execute();
+    final MediaEntityCreateStreamManager<ODataEntity> streamManager = createReq.payloadManager();
     final ODataMediaEntityCreateResponse<ODataEntity> createRes = streamManager.getResponse();
     assertEquals(201, createRes.getStatusCode());
 
@@ -172,7 +172,7 @@ public class MediaEntityTestITCase extends AbstractTestITCase {
     final ODataStreamUpdateRequest updateReq =
             client.getStreamedRequestFactory().getStreamUpdateRequest(builder.build(), input);
 
-    final StreamUpdateStreamManager streamManager = updateReq.execute();
+    final StreamUpdateStreamManager streamManager = updateReq.payloadManager();
     final ODataStreamUpdateResponse updateRes = streamManager.getResponse();
     updateRes.close();
     assertEquals(204, updateRes.getStatusCode());

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/8ad67fed/fit/src/test/java/org/apache/olingo/fit/v4/BatchTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/BatchTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/BatchTestITCase.java
index e4dc769..b711e18 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/BatchTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/BatchTestITCase.java
@@ -34,13 +34,11 @@ import java.util.concurrent.TimeUnit;
 import org.apache.http.HttpResponse;
 import org.apache.olingo.client.api.ODataBatchConstants;
 import org.apache.olingo.client.api.communication.header.HeaderName;
-import org.apache.olingo.client.api.communication.request.ODataStreamManager;
+import org.apache.olingo.client.api.communication.request.ODataPayloadManager;
 import org.apache.olingo.client.api.communication.request.batch.ODataBatchResponseItem;
 import org.apache.olingo.client.api.communication.request.batch.ODataChangeset;
-import org.apache.olingo.client.api.communication.request.batch.ODataRetrieve;
-import org.apache.olingo.client.api.communication.request.batch.v4.BatchStreamManager;
+import org.apache.olingo.client.api.communication.request.batch.v4.BatchManager;
 import org.apache.olingo.client.api.communication.request.batch.v4.ODataBatchRequest;
-import org.apache.olingo.client.api.communication.request.batch.v4.ODataOutsideUpdate;
 import org.apache.olingo.client.api.communication.request.cud.ODataEntityCreateRequest;
 import org.apache.olingo.client.api.communication.request.cud.ODataEntityUpdateRequest;
 import org.apache.olingo.client.api.communication.request.cud.v4.UpdateType;
@@ -103,7 +101,7 @@ public class BatchTestITCase extends AbstractTestITCase {
     final ODataBatchRequest request = client.getBatchRequestFactory().getBatchRequest(testStaticServiceRootURL);
     request.setAccept(ACCEPT);
 
-    final BatchStreamManager payload = request.execute();
+    final BatchManager payload = request.payloadManager();
     final ODataBatchResponse response = payload.getResponse();
 
     assertEquals(200, response.getStatusCode());
@@ -119,7 +117,7 @@ public class BatchTestITCase extends AbstractTestITCase {
     final ODataBatchRequest request = client.getBatchRequestFactory().getBatchRequest(testStaticServiceRootURL);
     request.setAccept(ACCEPT);
 
-    final BatchStreamManager payload = request.execute();
+    final BatchManager payload = request.payloadManager();
     final ODataChangeset changeset = payload.addChangeset();
 
     URIBuilder targetURI;
@@ -181,13 +179,11 @@ public class BatchTestITCase extends AbstractTestITCase {
     request.setAccept(ACCEPT);
     request.continueOnError();
 
-    final BatchStreamManager streamManager = request.execute();
+    final BatchManager streamManager = request.payloadManager();
 
     // -------------------------------------------
     // Add retrieve item
     // -------------------------------------------
-    ODataRetrieve retrieve = streamManager.addRetrieve();
-
     // prepare URI
     URIBuilder targetURI = client.getURIBuilder(testStaticServiceRootURL);
     targetURI.appendEntitySetSegment("UnexistinfEntitySet").appendKeySegment(1);
@@ -196,21 +192,19 @@ public class BatchTestITCase extends AbstractTestITCase {
     ODataEntityRequest<ODataEntity> queryReq = client.getRetrieveRequestFactory().getEntityRequest(targetURI.build());
     queryReq.setFormat(ODataPubFormat.JSON);
 
-    retrieve.setRequest(queryReq);
+    streamManager.addRetrieve(queryReq);
     // -------------------------------------------
 
     // -------------------------------------------
     // Add retrieve item
     // -------------------------------------------
-    retrieve = streamManager.addRetrieve();
-
     // prepare URI
     targetURI = client.getURIBuilder(testStaticServiceRootURL).appendEntitySetSegment("Customers").appendKeySegment(1);
 
     // create new request
     queryReq = client.getRetrieveRequestFactory().getEntityRequest(targetURI.build());
 
-    retrieve.setRequest(queryReq);
+    streamManager.addRetrieve(queryReq);
     // -------------------------------------------
 
     final ODataBatchResponse response = streamManager.getResponse();
@@ -245,7 +239,7 @@ public class BatchTestITCase extends AbstractTestITCase {
     // create your request
     final ODataBatchRequest request = client.getBatchRequestFactory().getBatchRequest(testStaticServiceRootURL);
     request.setAccept(ACCEPT);
-    final BatchStreamManager streamManager = request.execute();
+    final BatchManager streamManager = request.payloadManager();
 
     final ODataChangeset changeset = streamManager.addChangeset();
     ODataEntity order = newOrder(20);
@@ -329,13 +323,11 @@ public class BatchTestITCase extends AbstractTestITCase {
     // create your request
     final ODataBatchRequest request = client.getBatchRequestFactory().getBatchRequest(testStaticServiceRootURL);
     request.setAccept(ACCEPT);
-    final BatchStreamManager streamManager = request.execute();
+    final BatchManager streamManager = request.payloadManager();
 
     // -------------------------------------------
     // Add retrieve item
     // -------------------------------------------
-    ODataRetrieve retrieve = streamManager.addRetrieve();
-
     // prepare URI
     URIBuilder targetURI = client.getURIBuilder(testStaticServiceRootURL);
     targetURI.appendEntitySetSegment("Customers").appendKeySegment(1).
@@ -345,21 +337,19 @@ public class BatchTestITCase extends AbstractTestITCase {
     ODataEntityRequest<ODataEntity> queryReq = client.getRetrieveRequestFactory().getEntityRequest(targetURI.build());
     queryReq.setFormat(ODataPubFormat.JSON);
 
-    retrieve.setRequest(queryReq);
+    streamManager.addRetrieve(queryReq);
     // -------------------------------------------
 
     // -------------------------------------------
     // Add new order with outside item
     // -------------------------------------------
-    final ODataOutsideUpdate outside = streamManager.addOutsideUpdate();
-
     // prepare URI
     targetURI = client.getURIBuilder(testStaticServiceRootURL).appendEntitySetSegment("Orders");
     final ODataEntity original = newOrder(2000);
     final ODataEntityCreateRequest<ODataEntity> createReq =
             client.getCUDRequestFactory().getEntityCreateRequest(targetURI.build(), original);
     createReq.setFormat(ODataPubFormat.JSON);
-    outside.setRequest(createReq);
+    streamManager.addOutsideUpdate(createReq);
     // -------------------------------------------
 
     final ODataBatchResponse response = streamManager.getResponse();
@@ -401,13 +391,11 @@ public class BatchTestITCase extends AbstractTestITCase {
     final ODataBatchRequest request = client.getBatchRequestFactory().getBatchRequest(testStaticServiceRootURL);
     request.setAccept(ACCEPT);
 
-    final BatchStreamManager streamManager = request.execute();
+    final BatchManager streamManager = request.payloadManager();
 
     // -------------------------------------------
     // Add retrieve item
     // -------------------------------------------
-    ODataRetrieve retrieve = streamManager.addRetrieve();
-
     // prepare URI
     URIBuilder targetURI = client.getURIBuilder(testStaticServiceRootURL);
     targetURI.appendEntitySetSegment("Customers").appendKeySegment(1);
@@ -416,7 +404,7 @@ public class BatchTestITCase extends AbstractTestITCase {
     ODataEntityRequest<ODataEntity> queryReq = client.getRetrieveRequestFactory().getEntityRequest(targetURI.build());
     queryReq.setFormat(ODataPubFormat.JSON);
 
-    retrieve.setRequest(queryReq);
+    streamManager.addRetrieve(queryReq);
     // -------------------------------------------
 
     // -------------------------------------------
@@ -454,15 +442,13 @@ public class BatchTestITCase extends AbstractTestITCase {
     // -------------------------------------------
     // Add retrieve item
     // -------------------------------------------
-    retrieve = streamManager.addRetrieve();
-
     // prepare URI
     targetURI = client.getURIBuilder(testStaticServiceRootURL).appendEntitySetSegment("Customers").appendKeySegment(1);
 
     // create new request
     queryReq = client.getRetrieveRequestFactory().getEntityRequest(targetURI.build());
 
-    retrieve.setRequest(queryReq);
+    streamManager.addRetrieve(queryReq);
     // -------------------------------------------
 
     final ODataBatchResponse response = streamManager.getResponse();
@@ -534,8 +520,6 @@ public class BatchTestITCase extends AbstractTestITCase {
     // -------------------------------------------
     // Add retrieve item
     // -------------------------------------------
-    ODataRetrieve retrieve = async.addRetrieve();
-
     // prepare URI
     URIBuilder targetURI = client.getURIBuilder(testStaticServiceRootURL);
     targetURI.appendEntitySetSegment("People").appendKeySegment(5);
@@ -544,21 +528,19 @@ public class BatchTestITCase extends AbstractTestITCase {
     ODataEntityRequest<ODataEntity> queryReq = client.getRetrieveRequestFactory().getEntityRequest(targetURI.build());
     queryReq.setFormat(ODataPubFormat.JSON);
 
-    retrieve.setRequest(queryReq);
+    async.addRetrieve(queryReq);
     // -------------------------------------------
 
     // -------------------------------------------
     // Add retrieve item
     // -------------------------------------------
-    retrieve = async.addRetrieve();
-
     // prepare URI
     targetURI = client.getURIBuilder(testStaticServiceRootURL).appendEntitySetSegment("Customers").appendKeySegment(1);
 
     // create new request
     queryReq = client.getRetrieveRequestFactory().getEntityRequest(targetURI.build());
 
-    retrieve.setRequest(queryReq);
+    async.addRetrieve(queryReq);
     // -------------------------------------------
 
     final AsyncResponseWrapper<ODataBatchResponse> responseWrapper = async.execute();
@@ -599,7 +581,7 @@ public class BatchTestITCase extends AbstractTestITCase {
       super(new Wrapper<Future<HttpResponse>>());
     }
 
-    public ODataStreamManager<ODataBatchResponse> addObject(final byte[] src) {
+    public ODataPayloadManager<ODataBatchResponse> addObject(final byte[] src) {
       stream(src);
       return this;
     }
@@ -651,9 +633,9 @@ public class BatchTestITCase extends AbstractTestITCase {
 
   private static class BatchStreamingThread extends Thread {
 
-    private final BatchStreamManager streaming;
+    private final BatchManager streaming;
 
-    public BatchStreamingThread(final BatchStreamManager streaming) {
+    public BatchStreamingThread(final BatchManager streaming) {
       super();
       this.streaming = streaming;
     }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/8ad67fed/fit/src/test/java/org/apache/olingo/fit/v4/MediaEntityTestITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/v4/MediaEntityTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/v4/MediaEntityTestITCase.java
index 63c77ac..9a37a82 100644
--- a/fit/src/test/java/org/apache/olingo/fit/v4/MediaEntityTestITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/v4/MediaEntityTestITCase.java
@@ -101,7 +101,7 @@ public class MediaEntityTestITCase extends AbstractTestITCase {
     final URI uri = client.getURIBuilder(testDemoServiceRootURL).appendEntitySetSegment("Advertisements").build();
     final ODataMediaEntityCreateRequest<ODataEntity> createReq =
             client.getStreamedRequestFactory().getMediaEntityCreateRequest(uri, input);
-    final MediaEntityCreateStreamManager<ODataEntity> streamManager = createReq.execute();
+    final MediaEntityCreateStreamManager<ODataEntity> streamManager = createReq.payloadManager();
 
     final ODataMediaEntityCreateResponse<ODataEntity> createRes = streamManager.getResponse();
     assertEquals(201, createRes.getStatusCode());
@@ -155,7 +155,7 @@ public class MediaEntityTestITCase extends AbstractTestITCase {
             getMediaEntityUpdateRequest(uri, IOUtils.toInputStream(random));
     updateReq.setFormat(format);
 
-    final MediaEntityUpdateStreamManager<ODataEntity> streamManager = updateReq.execute();
+    final MediaEntityUpdateStreamManager<ODataEntity> streamManager = updateReq.payloadManager();
     final ODataMediaEntityUpdateResponse<ODataEntity> createRes = streamManager.getResponse();
     assertEquals(204, createRes.getStatusCode());
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/8ad67fed/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/ODataPayloadManager.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/ODataPayloadManager.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/ODataPayloadManager.java
new file mode 100644
index 0000000..478bb59
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/ODataPayloadManager.java
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.client.api.communication.request;
+
+import java.io.InputStream;
+import java.util.concurrent.Future;
+import org.apache.olingo.client.api.communication.response.ODataResponse;
+
+/**
+ * OData request payload management abstract class.
+ *
+ * @param <T> OData response type corresponding to the request implementation.
+ */
+public interface ODataPayloadManager<T extends ODataResponse> extends ODataStreamer {
+
+  /**
+   * Gets payload stream.
+   *
+   * @return payload stream.
+   */
+  InputStream getBody();
+
+  /**
+   * Closes piped output stream.
+   */
+  void finalizeBody();
+
+  /**
+   * Closes the payload input stream and gets the OData response back.
+   *
+   * @return OData response.
+   */
+  T getResponse();
+
+  /**
+   * Closes the payload input stream and ask for an asynchronous response.
+   *
+   * @return <code>Future&lt;ODataResponse&gt;</code> about the executed request.
+   */
+  Future<T> getAsyncResponse();
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/8ad67fed/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/ODataStreamManager.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/ODataStreamManager.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/ODataStreamManager.java
deleted file mode 100644
index a371f1d..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/ODataStreamManager.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.client.api.communication.request;
-
-import java.io.InputStream;
-import java.util.concurrent.Future;
-import org.apache.olingo.client.api.communication.response.ODataResponse;
-
-/**
- * OData request payload management abstract class.
- *
- * @param <T> OData response type corresponding to the request implementation.
- */
-public interface ODataStreamManager<T extends ODataResponse> extends ODataStreamer {
-
-  /**
-   * Gets payload stream.
-   *
-   * @return payload stream.
-   */
-  InputStream getBody();
-
-  /**
-   * Closes piped output stream.
-   */
-  void finalizeBody();
-
-  /**
-   * Closes the payload input stream and gets the OData response back.
-   *
-   * @return OData response.
-   */
-  T getResponse();
-
-  /**
-   * Closes the payload input stream and ask for an asynchronous response.
-   *
-   * @return <code>Future&lt;ODataResponse&gt;</code> about the executed request.
-   */
-  Future<T> getAsyncResponse();
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/8ad67fed/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/ODataStreamedRequest.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/ODataStreamedRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/ODataStreamedRequest.java
index 5a3a193..978dc35 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/ODataStreamedRequest.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/ODataStreamedRequest.java
@@ -26,13 +26,13 @@ import org.apache.olingo.client.api.communication.response.ODataResponse;
  * @param <V> OData response type corresponding to the request implementation.
  * @param <T> OData request payload type corresponding to the request implementation.
  */
-public interface ODataStreamedRequest<V extends ODataResponse, T extends ODataStreamManager<V>>
+public interface ODataStreamedRequest<V extends ODataResponse, T extends ODataPayloadManager<V>>
         extends ODataRequest {
 
     /**
-     * Streamed request execute.
+     * Streamed payload manager.
      *
      * @return OData request payload manager object.
      */
-    T execute();
+    T payloadManager();
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/8ad67fed/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/BatchManager.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/BatchManager.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/BatchManager.java
new file mode 100644
index 0000000..75e6b85
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/BatchManager.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.client.api.communication.request.batch;
+
+import org.apache.olingo.client.api.communication.request.ODataBatchableRequest;
+import org.apache.olingo.client.api.communication.request.ODataPayloadManager;
+import org.apache.olingo.client.api.communication.response.ODataBatchResponse;
+
+/**
+ * Batch request payload management.
+ */
+public interface BatchManager extends ODataPayloadManager<ODataBatchResponse> {
+
+  /**
+   * Gets a changeset batch item instance. A changeset can be submitted embedded into a batch request only.
+   *
+   * @return ODataChangeset instance.
+   */
+  ODataChangeset addChangeset();
+
+  /**
+   * Adds a retrieve batch item instance. A retrieve item can be submitted embedded into a batch request only.
+   *
+   * @param request retrieve request to batch.
+   */
+  void addRetrieve(final ODataBatchableRequest request);
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/8ad67fed/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/BatchStreamManager.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/BatchStreamManager.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/BatchStreamManager.java
deleted file mode 100644
index e448b57..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/BatchStreamManager.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.client.api.communication.request.batch;
-
-import org.apache.olingo.client.api.communication.request.ODataStreamManager;
-import org.apache.olingo.client.api.communication.response.ODataBatchResponse;
-
-/**
- * Batch request payload management.
- */
-public interface BatchStreamManager extends ODataStreamManager<ODataBatchResponse> {
-
-  /**
-   * Gets a changeset batch item instance. A changeset can be submitted embedded into a batch request only.
-   *
-   * @return ODataChangeset instance.
-   */
-  ODataChangeset addChangeset();
-
-  /**
-   * Gets a retrieve batch item instance. A retrieve item can be submitted embedded into a batch request only.
-   *
-   * @return ODataRetrieve instance.
-   */
-  ODataRetrieve addRetrieve();
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/8ad67fed/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/v3/BatchManager.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/v3/BatchManager.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/v3/BatchManager.java
new file mode 100644
index 0000000..a9d0bff
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/v3/BatchManager.java
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.client.api.communication.request.batch.v3;
+
+/**
+ * Batch request payload management.
+ */
+public interface BatchManager extends org.apache.olingo.client.api.communication.request.batch.BatchManager {
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/8ad67fed/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/v3/BatchStreamManager.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/v3/BatchStreamManager.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/v3/BatchStreamManager.java
deleted file mode 100644
index 0dd5bfb..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/v3/BatchStreamManager.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.client.api.communication.request.batch.v3;
-
-/**
- * Batch request payload management.
- */
-public interface BatchStreamManager
-        extends org.apache.olingo.client.api.communication.request.batch.BatchStreamManager {
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/8ad67fed/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/v3/ODataBatchRequest.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/v3/ODataBatchRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/v3/ODataBatchRequest.java
index 6d45b0c..b7ee6cc 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/v3/ODataBatchRequest.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/v3/ODataBatchRequest.java
@@ -26,5 +26,5 @@ import org.apache.olingo.client.api.communication.response.ODataBatchResponse;
  * This class implements a batch request.
  */
 public interface ODataBatchRequest
-        extends CommonODataBatchRequest, ODataStreamedRequest<ODataBatchResponse, BatchStreamManager> {
+        extends CommonODataBatchRequest, ODataStreamedRequest<ODataBatchResponse, BatchManager> {
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/8ad67fed/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/v4/BatchManager.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/v4/BatchManager.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/v4/BatchManager.java
new file mode 100644
index 0000000..108e85c
--- /dev/null
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/v4/BatchManager.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.client.api.communication.request.batch.v4;
+
+import org.apache.olingo.client.api.communication.request.ODataBatchableRequest;
+
+/**
+ * Batch request payload management.
+ */
+public interface BatchManager extends org.apache.olingo.client.api.communication.request.batch.BatchManager {
+
+  /**
+   * Adds an outside update batch item instance. An outside update item can be submitted embedded into a batch request
+   * only.
+   *
+   * @param request update request to batch.
+   */
+  void addOutsideUpdate(final ODataBatchableRequest request);
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/8ad67fed/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/v4/BatchStreamManager.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/v4/BatchStreamManager.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/v4/BatchStreamManager.java
deleted file mode 100644
index 8caaf7a..0000000
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/v4/BatchStreamManager.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.client.api.communication.request.batch.v4;
-
-/**
- * Batch request payload management.
- */
-public interface BatchStreamManager
-        extends org.apache.olingo.client.api.communication.request.batch.BatchStreamManager {
-
-  /**
-   * Gets an outside update batch item instance. An outside update item can be submitted embedded into a batch request
-   * only.
-   *
-   * @return ODataOutsideUpdate instance.
-   */
-  ODataOutsideUpdate addOutsideUpdate();
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/8ad67fed/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/v4/ODataBatchRequest.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/v4/ODataBatchRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/v4/ODataBatchRequest.java
index 8175465..a12732d 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/v4/ODataBatchRequest.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/batch/v4/ODataBatchRequest.java
@@ -26,7 +26,7 @@ import org.apache.olingo.client.api.communication.response.ODataBatchResponse;
  * This class implements a batch request.
  */
 public interface ODataBatchRequest
-        extends CommonODataBatchRequest, ODataStreamedRequest<ODataBatchResponse, BatchStreamManager> {
+        extends CommonODataBatchRequest, ODataStreamedRequest<ODataBatchResponse, BatchManager> {
 
   ODataBatchRequest continueOnError();
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/8ad67fed/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/MediaEntityCreateStreamManager.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/MediaEntityCreateStreamManager.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/MediaEntityCreateStreamManager.java
index 7b24fb4..74d5827 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/MediaEntityCreateStreamManager.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/MediaEntityCreateStreamManager.java
@@ -18,7 +18,7 @@
  */
 package org.apache.olingo.client.api.communication.request.streamed;
 
-import org.apache.olingo.client.api.communication.request.ODataStreamManager;
+import org.apache.olingo.client.api.communication.request.ODataPayloadManager;
 import org.apache.olingo.client.api.communication.response.ODataMediaEntityCreateResponse;
 import org.apache.olingo.commons.api.domain.CommonODataEntity;
 
@@ -28,5 +28,5 @@ import org.apache.olingo.commons.api.domain.CommonODataEntity;
  * @param <E> concrete ODataEntity implementation
  */
 public interface MediaEntityCreateStreamManager<E extends CommonODataEntity>
-        extends ODataStreamManager<ODataMediaEntityCreateResponse<E>> {
+        extends ODataPayloadManager<ODataMediaEntityCreateResponse<E>> {
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/8ad67fed/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/MediaEntityUpdateStreamManager.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/MediaEntityUpdateStreamManager.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/MediaEntityUpdateStreamManager.java
index 230fab1..0fa37d5 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/MediaEntityUpdateStreamManager.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/MediaEntityUpdateStreamManager.java
@@ -18,7 +18,7 @@
  */
 package org.apache.olingo.client.api.communication.request.streamed;
 
-import org.apache.olingo.client.api.communication.request.ODataStreamManager;
+import org.apache.olingo.client.api.communication.request.ODataPayloadManager;
 import org.apache.olingo.client.api.communication.response.ODataMediaEntityUpdateResponse;
 import org.apache.olingo.commons.api.domain.CommonODataEntity;
 
@@ -28,5 +28,5 @@ import org.apache.olingo.commons.api.domain.CommonODataEntity;
  * @param <E> concrete ODataEntity implementation
  */
 public interface MediaEntityUpdateStreamManager<E extends CommonODataEntity>
-        extends ODataStreamManager<ODataMediaEntityUpdateResponse<E>> {
+        extends ODataPayloadManager<ODataMediaEntityUpdateResponse<E>> {
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/8ad67fed/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/ODataStreamedEntityRequest.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/ODataStreamedEntityRequest.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/ODataStreamedEntityRequest.java
index 7d898f5..1af787e 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/ODataStreamedEntityRequest.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/ODataStreamedEntityRequest.java
@@ -18,7 +18,7 @@
  */
 package org.apache.olingo.client.api.communication.request.streamed;
 
-import org.apache.olingo.client.api.communication.request.ODataStreamManager;
+import org.apache.olingo.client.api.communication.request.ODataPayloadManager;
 import org.apache.olingo.client.api.communication.request.ODataStreamedRequest;
 import org.apache.olingo.client.api.communication.response.ODataResponse;
 import org.apache.olingo.commons.api.format.ODataPubFormat;
@@ -29,7 +29,7 @@ import org.apache.olingo.commons.api.format.ODataPubFormat;
  * @param <V> OData response type corresponding to the request implementation.
  * @param <T> OData request payload type corresponding to the request implementation.
  */
-public interface ODataStreamedEntityRequest<V extends ODataResponse, T extends ODataStreamManager<V>>
+public interface ODataStreamedEntityRequest<V extends ODataResponse, T extends ODataPayloadManager<V>>
         extends ODataStreamedRequest<V, T> {
 
   /**

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/8ad67fed/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/StreamUpdateStreamManager.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/StreamUpdateStreamManager.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/StreamUpdateStreamManager.java
index af1e259..73c8858 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/StreamUpdateStreamManager.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/streamed/StreamUpdateStreamManager.java
@@ -18,11 +18,11 @@
  */
 package org.apache.olingo.client.api.communication.request.streamed;
 
-import org.apache.olingo.client.api.communication.request.ODataStreamManager;
+import org.apache.olingo.client.api.communication.request.ODataPayloadManager;
 import org.apache.olingo.client.api.communication.response.ODataStreamUpdateResponse;
 
 /**
  * Streamed entity payload object.
  */
-public interface StreamUpdateStreamManager extends ODataStreamManager<ODataStreamUpdateResponse> {
+public interface StreamUpdateStreamManager extends ODataPayloadManager<ODataStreamUpdateResponse> {
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/8ad67fed/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/v4/AsyncBatchRequestWrapper.java
----------------------------------------------------------------------
diff --git a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/v4/AsyncBatchRequestWrapper.java b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/v4/AsyncBatchRequestWrapper.java
index 9efa0fd..65f98ec 100644
--- a/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/v4/AsyncBatchRequestWrapper.java
+++ b/lib/client-api/src/main/java/org/apache/olingo/client/api/communication/request/v4/AsyncBatchRequestWrapper.java
@@ -18,9 +18,8 @@
  */
 package org.apache.olingo.client.api.communication.request.v4;
 
+import org.apache.olingo.client.api.communication.request.ODataBatchableRequest;
 import org.apache.olingo.client.api.communication.request.batch.ODataChangeset;
-import org.apache.olingo.client.api.communication.request.batch.ODataRetrieve;
-import org.apache.olingo.client.api.communication.request.batch.v4.ODataOutsideUpdate;
 import org.apache.olingo.client.api.communication.response.ODataBatchResponse;
 
 public interface AsyncBatchRequestWrapper extends AsyncRequestWrapper<ODataBatchResponse> {
@@ -33,16 +32,16 @@ public interface AsyncBatchRequestWrapper extends AsyncRequestWrapper<ODataBatch
   ODataChangeset addChangeset();
 
   /**
-   * Gets a retrieve batch item instance. A retrieve item can be submitted embedded into a batch request only.
+   * Adds a retrieve batch item instance. A retrieve item can be submitted embedded into a batch request only.
    *
-   * @return ODataRetrieve instance.
+   * @param request retrieve request to batch.
    */
-  ODataRetrieve addRetrieve();
+  void addRetrieve(final ODataBatchableRequest request);
 
   /**
-   * Gets an outside change batch item instance. An outside item can be submitted embedded into a batch request only.
+   * Adds an outside change batch item instance. An outside item can be submitted embedded into a batch request only.
    *
-   * @return ODataOutsideUpdate instance.
+   * @param request update request to batch outside a changeset.
    */
-  ODataOutsideUpdate addOutsideUpdate();
+  void addOutsideUpdate(final ODataBatchableRequest request);
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/8ad67fed/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AbstractODataStreamManager.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AbstractODataStreamManager.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AbstractODataStreamManager.java
index 94f49d1..ef48fcd 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AbstractODataStreamManager.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/AbstractODataStreamManager.java
@@ -28,7 +28,7 @@ import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 import org.apache.commons.io.IOUtils;
 import org.apache.http.HttpResponse;
-import org.apache.olingo.client.api.communication.request.ODataStreamManager;
+import org.apache.olingo.client.api.communication.request.ODataPayloadManager;
 import org.apache.olingo.client.api.communication.response.ODataResponse;
 import org.apache.olingo.client.api.http.HttpClientException;
 
@@ -38,7 +38,7 @@ import org.apache.olingo.client.api.http.HttpClientException;
  * @param <T> OData response type corresponding to the request implementation.
  */
 public abstract class AbstractODataStreamManager<T extends ODataResponse> extends AbstractODataStreamer
-        implements ODataStreamManager<T> {
+        implements ODataPayloadManager<T> {
 
   /**
    * Body input stream.

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/8ad67fed/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/AbstractBatchManager.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/AbstractBatchManager.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/AbstractBatchManager.java
new file mode 100644
index 0000000..9f9d962
--- /dev/null
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/AbstractBatchManager.java
@@ -0,0 +1,139 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.olingo.client.core.communication.request.batch;
+
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+import org.apache.http.HttpResponse;
+import org.apache.olingo.client.api.communication.request.ODataBatchableRequest;
+import org.apache.olingo.client.api.communication.request.batch.CommonODataBatchRequest;
+import org.apache.olingo.client.api.communication.request.batch.ODataBatchRequestItem;
+import org.apache.olingo.client.api.communication.request.batch.ODataChangeset;
+import org.apache.olingo.client.api.communication.request.batch.ODataRetrieve;
+import org.apache.olingo.client.api.communication.response.ODataBatchResponse;
+import org.apache.olingo.client.core.communication.request.AbstractODataStreamManager;
+import org.apache.olingo.client.core.communication.request.Wrapper;
+
+/**
+ * Batch request payload management.
+ */
+public abstract class AbstractBatchManager extends AbstractODataStreamManager<ODataBatchResponse> {
+
+  /**
+   * Batch request current item.
+   */
+  protected ODataBatchRequestItem currentItem = null;
+
+  /**
+   * batch request reference.
+   */
+  protected final CommonODataBatchRequest req;
+
+  /**
+   * Private constructor.
+   *
+   * @param req batch request reference.
+   */
+  protected AbstractBatchManager(
+          final CommonODataBatchRequest req, final Wrapper<Future<HttpResponse>> futureWrap) {
+    super(futureWrap);
+    this.req = req;
+  }
+
+  /**
+   * Gets a changeset batch item instance. A changeset can be submitted embedded into a batch request only.
+   *
+   * @return ODataChangeset instance.
+   */
+  public ODataChangeset addChangeset() {
+    closeCurrentItem();
+
+    // stream dash boundary
+    streamDashBoundary();
+
+    final ODataChangesetResponseItem expectedResItem = new ODataChangesetResponseItem();
+    ((AbstractODataBatchRequest) req).addExpectedResItem(expectedResItem);
+
+    currentItem = new ODataChangesetImpl(req, expectedResItem);
+
+    return (ODataChangeset) currentItem;
+  }
+
+  /**
+   * Adds a retrieve batch item instance. A retrieve item can be submitted embedded into a batch request only.
+   *
+   * @param request retrieve request to batch.
+   */
+  public void addRetrieve(final ODataBatchableRequest request) {
+    closeCurrentItem();
+
+    // stream dash boundary
+    streamDashBoundary();
+
+    final ODataRetrieveResponseItem expectedResItem = new ODataRetrieveResponseItem();
+    currentItem = new ODataRetrieveImpl(req, expectedResItem);
+
+    ((AbstractODataBatchRequest) req).addExpectedResItem(expectedResItem);
+
+    ((ODataRetrieve) currentItem).setRequest(request);
+  }
+
+  /**
+   * Close the current streamed item.
+   */
+  protected void closeCurrentItem() {
+    if (currentItem != null) {
+      currentItem.close();
+    }
+  }
+
+  /**
+   * {@inheritDoc }
+   */
+  @Override
+  protected ODataBatchResponse getResponse(final long timeout, final TimeUnit unit) {
+    closeCurrentItem();
+    streamCloseDelimiter();
+    finalizeBody();
+    return getResponseInstance(timeout, unit);
+  }
+
+  protected abstract ODataBatchResponse getResponseInstance(final long timeout, final TimeUnit unit);
+
+  /**
+   * Streams dash boundary.
+   */
+  protected void streamDashBoundary() {
+    // preamble
+    newLine();
+
+    // stream batch-boundary
+    stream(("--" + ((AbstractODataBatchRequest) req).boundary).getBytes());
+    newLine();
+  }
+
+  /**
+   * Streams close delimiter.
+   */
+  protected void streamCloseDelimiter() {
+    // stream close-delimiter
+    newLine();
+    stream(("--" + ((AbstractODataBatchRequest) req).boundary + "--").getBytes());
+  }
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/8ad67fed/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/AbstractBatchStreamManager.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/AbstractBatchStreamManager.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/AbstractBatchStreamManager.java
deleted file mode 100644
index 52c40e6..0000000
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/AbstractBatchStreamManager.java
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.olingo.client.core.communication.request.batch;
-
-import java.util.concurrent.Future;
-import java.util.concurrent.TimeUnit;
-import org.apache.http.HttpResponse;
-import org.apache.olingo.client.api.communication.request.batch.CommonODataBatchRequest;
-import org.apache.olingo.client.api.communication.request.batch.ODataBatchRequestItem;
-import org.apache.olingo.client.api.communication.request.batch.ODataChangeset;
-import org.apache.olingo.client.api.communication.request.batch.ODataRetrieve;
-import org.apache.olingo.client.api.communication.response.ODataBatchResponse;
-import org.apache.olingo.client.core.communication.request.AbstractODataStreamManager;
-import org.apache.olingo.client.core.communication.request.Wrapper;
-
-/**
- * Batch request payload management.
- */
-public abstract class AbstractBatchStreamManager extends AbstractODataStreamManager<ODataBatchResponse> {
-
-  /**
-   * Batch request current item.
-   */
-  protected ODataBatchRequestItem currentItem = null;
-
-  /**
-   * batch request reference.
-   */
-  protected final CommonODataBatchRequest req;
-
-  /**
-   * Private constructor.
-   *
-   * @param req batch request reference.
-   */
-  protected AbstractBatchStreamManager(
-          final CommonODataBatchRequest req, final Wrapper<Future<HttpResponse>> futureWrap) {
-    super(futureWrap);
-    this.req = req;
-  }
-
-  /**
-   * Gets a changeset batch item instance. A changeset can be submitted embedded into a batch request only.
-   *
-   * @return ODataChangeset instance.
-   */
-  public ODataChangeset addChangeset() {
-    closeCurrentItem();
-
-    // stream dash boundary
-    streamDashBoundary();
-
-    final ODataChangesetResponseItem expectedResItem = new ODataChangesetResponseItem();
-    ((AbstractODataBatchRequest) req).addExpectedResItem(expectedResItem);
-
-    currentItem = new ODataChangesetImpl(req, expectedResItem);
-
-    return (ODataChangeset) currentItem;
-  }
-
-  /**
-   * Gets a retrieve batch item instance. A retrieve item can be submitted embedded into a batch request only.
-   *
-   * @return ODataRetrieve instance.
-   */
-  public ODataRetrieve addRetrieve() {
-    closeCurrentItem();
-
-    // stream dash boundary
-    streamDashBoundary();
-
-    final ODataRetrieveResponseItem expectedResItem = new ODataRetrieveResponseItem();
-    currentItem = new ODataRetrieveImpl(req, expectedResItem);
-
-    ((AbstractODataBatchRequest) req).addExpectedResItem(expectedResItem);
-
-    return (ODataRetrieve) currentItem;
-  }
-
-  /**
-   * Close the current streamed item.
-   */
-  protected void closeCurrentItem() {
-    if (currentItem != null) {
-      currentItem.close();
-    }
-  }
-
-  /**
-   * {@inheritDoc }
-   */
-  @Override
-  protected ODataBatchResponse getResponse(final long timeout, final TimeUnit unit) {
-    closeCurrentItem();
-    streamCloseDelimiter();
-    finalizeBody();
-    return getResponseInstance(timeout, unit);
-  }
-
-  protected abstract ODataBatchResponse getResponseInstance(final long timeout, final TimeUnit unit);
-
-  /**
-   * Streams dash boundary.
-   */
-  protected void streamDashBoundary() {
-    // preamble
-    newLine();
-
-    // stream batch-boundary
-    stream(("--" + ((AbstractODataBatchRequest) req).boundary).getBytes());
-    newLine();
-  }
-
-  /**
-   * Streams close delimiter.
-   */
-  protected void streamCloseDelimiter() {
-    // stream close-delimiter
-    newLine();
-    stream(("--" + ((AbstractODataBatchRequest) req).boundary + "--").getBytes());
-  }
-}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/8ad67fed/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/AbstractODataBatchRequest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/AbstractODataBatchRequest.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/AbstractODataBatchRequest.java
index 382cbd1..df03f49 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/AbstractODataBatchRequest.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/AbstractODataBatchRequest.java
@@ -25,7 +25,7 @@ import java.util.List;
 import java.util.UUID;
 import org.apache.olingo.client.api.ODataBatchConstants;
 import org.apache.olingo.client.api.CommonODataClient;
-import org.apache.olingo.client.api.communication.request.ODataStreamManager;
+import org.apache.olingo.client.api.communication.request.ODataPayloadManager;
 import org.apache.olingo.client.api.communication.request.batch.CommonODataBatchRequest;
 import org.apache.olingo.client.api.communication.request.batch.ODataBatchResponseItem;
 import org.apache.olingo.client.api.communication.response.ODataResponse;
@@ -36,7 +36,7 @@ import org.apache.olingo.commons.api.format.ContentType;
 /**
  * This class implements a batch request.
  */
-public abstract class AbstractODataBatchRequest<V extends ODataResponse, T extends ODataStreamManager<V>>
+public abstract class AbstractODataBatchRequest<V extends ODataResponse, T extends ODataPayloadManager<V>>
         extends AbstractODataStreamedRequest<V, T> {
 
   /**
@@ -73,7 +73,7 @@ public abstract class AbstractODataBatchRequest<V extends ODataResponse, T exten
    * {@inheritDoc }
    */
   public PipedOutputStream getOutputStream() {
-    return getStreamManager().getBodyStreamWriter();
+    return getPayloadManager().getBodyStreamWriter();
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/8ad67fed/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/v3/ODataBatchRequestImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/v3/ODataBatchRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/v3/ODataBatchRequestImpl.java
index c005019..8afa479 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/v3/ODataBatchRequestImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/v3/ODataBatchRequestImpl.java
@@ -26,11 +26,11 @@ import org.apache.http.HttpResponse;
 import org.apache.http.client.HttpClient;
 import org.apache.olingo.client.api.communication.request.ODataStreamedRequest;
 import org.apache.olingo.client.api.communication.request.batch.ODataBatchResponseItem;
-import org.apache.olingo.client.api.communication.request.batch.v3.BatchStreamManager;
+import org.apache.olingo.client.api.communication.request.batch.v3.BatchManager;
 import org.apache.olingo.client.api.communication.request.batch.v3.ODataBatchRequest;
 import org.apache.olingo.client.api.communication.response.ODataBatchResponse;
 import org.apache.olingo.client.api.v3.ODataClient;
-import org.apache.olingo.client.core.communication.request.batch.AbstractBatchStreamManager;
+import org.apache.olingo.client.core.communication.request.batch.AbstractBatchManager;
 import org.apache.olingo.client.core.communication.request.batch.AbstractODataBatchRequest;
 import org.apache.olingo.client.core.communication.request.batch.v3.ODataBatchRequestImpl.BatchStreamManagerImpl;
 import org.apache.olingo.client.core.communication.request.batch.v3.ODataBatchRequestImpl.ODataBatchResponseImpl;
@@ -41,8 +41,8 @@ import org.apache.olingo.client.core.communication.response.batch.ODataBatchResp
  * This class implements a batch request.
  */
 public class ODataBatchRequestImpl
-        extends AbstractODataBatchRequest<ODataBatchResponse, BatchStreamManager>
-        implements ODataBatchRequest, ODataStreamedRequest<ODataBatchResponse, BatchStreamManager> {
+        extends AbstractODataBatchRequest<ODataBatchResponse, BatchManager>
+        implements ODataBatchRequest, ODataStreamedRequest<ODataBatchResponse, BatchManager> {
 
   public ODataBatchRequestImpl(final ODataClient odataClient, final URI uri) {
     super(odataClient, uri);
@@ -50,11 +50,11 @@ public class ODataBatchRequestImpl
   }
 
   @Override
-  protected BatchStreamManager getStreamManager() {
-    if (streamManager == null) {
-      streamManager = new BatchStreamManagerImpl(this);
+  protected BatchManager getPayloadManager() {
+    if (payloadManager == null) {
+      payloadManager = new BatchStreamManagerImpl(this);
     }
-    return (BatchStreamManager) streamManager;
+    return (BatchManager) payloadManager;
   }
 
   /**
@@ -62,7 +62,7 @@ public class ODataBatchRequestImpl
    */
   @Override
   public ODataBatchRequest rawAppend(final byte[] toBeStreamed) throws IOException {
-    getStreamManager().getBodyStreamWriter().write(toBeStreamed);
+    getPayloadManager().getBodyStreamWriter().write(toBeStreamed);
     return this;
   }
 
@@ -71,14 +71,14 @@ public class ODataBatchRequestImpl
    */
   @Override
   public ODataBatchRequest rawAppend(final byte[] toBeStreamed, int off, int len) throws IOException {
-    getStreamManager().getBodyStreamWriter().write(toBeStreamed, off, len);
+    getPayloadManager().getBodyStreamWriter().write(toBeStreamed, off, len);
     return this;
   }
 
   /**
    * Batch request payload management.
    */
-  public class BatchStreamManagerImpl extends AbstractBatchStreamManager implements BatchStreamManager {
+  public class BatchStreamManagerImpl extends AbstractBatchManager implements BatchManager {
 
     public BatchStreamManagerImpl(final ODataBatchRequest req) {
       super(req, ODataBatchRequestImpl.this.futureWrapper);

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/8ad67fed/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/v4/ODataBatchRequestImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/v4/ODataBatchRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/v4/ODataBatchRequestImpl.java
index 497a4e8..88bbbea 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/v4/ODataBatchRequestImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/batch/v4/ODataBatchRequestImpl.java
@@ -26,13 +26,14 @@ import org.apache.http.HttpResponse;
 import org.apache.http.client.HttpClient;
 import org.apache.olingo.client.api.communication.header.HeaderName;
 import org.apache.olingo.client.api.communication.header.ODataPreferences;
+import org.apache.olingo.client.api.communication.request.ODataBatchableRequest;
 import org.apache.olingo.client.api.communication.request.batch.ODataBatchResponseItem;
-import org.apache.olingo.client.api.communication.request.batch.v4.BatchStreamManager;
+import org.apache.olingo.client.api.communication.request.batch.v4.BatchManager;
 import org.apache.olingo.client.api.communication.request.batch.v4.ODataBatchRequest;
 import org.apache.olingo.client.api.communication.request.batch.v4.ODataOutsideUpdate;
 import org.apache.olingo.client.api.communication.response.ODataBatchResponse;
 import org.apache.olingo.client.api.v4.ODataClient;
-import org.apache.olingo.client.core.communication.request.batch.AbstractBatchStreamManager;
+import org.apache.olingo.client.core.communication.request.batch.AbstractBatchManager;
 import org.apache.olingo.client.core.communication.request.batch.AbstractODataBatchRequest;
 import org.apache.olingo.client.core.communication.response.AbstractODataResponse;
 import org.apache.olingo.client.core.communication.response.batch.ODataBatchResponseManager;
@@ -41,7 +42,7 @@ import org.apache.olingo.client.core.communication.response.batch.ODataBatchResp
  * This class implements a batch request.
  */
 public class ODataBatchRequestImpl
-        extends AbstractODataBatchRequest<ODataBatchResponse, BatchStreamManager>
+        extends AbstractODataBatchRequest<ODataBatchResponse, BatchManager>
         implements ODataBatchRequest {
 
   private boolean continueOnError = false;
@@ -52,11 +53,11 @@ public class ODataBatchRequestImpl
   }
 
   @Override
-  protected BatchStreamManager getStreamManager() {
-    if (streamManager == null) {
-      streamManager = new BatchStreamManagerImpl(this);
+  protected BatchManager getPayloadManager() {
+    if (payloadManager == null) {
+      payloadManager = new BatchManagerImpl(this);
     }
-    return (BatchStreamManager) streamManager;
+    return (BatchManager) payloadManager;
   }
 
   /**
@@ -64,7 +65,7 @@ public class ODataBatchRequestImpl
    */
   @Override
   public ODataBatchRequest rawAppend(final byte[] toBeStreamed) throws IOException {
-    getStreamManager().getBodyStreamWriter().write(toBeStreamed);
+    getPayloadManager().getBodyStreamWriter().write(toBeStreamed);
     return this;
   }
 
@@ -73,7 +74,7 @@ public class ODataBatchRequestImpl
    */
   @Override
   public ODataBatchRequest rawAppend(final byte[] toBeStreamed, int off, int len) throws IOException {
-    getStreamManager().getBodyStreamWriter().write(toBeStreamed, off, len);
+    getPayloadManager().getBodyStreamWriter().write(toBeStreamed, off, len);
     return this;
   }
 
@@ -87,9 +88,9 @@ public class ODataBatchRequestImpl
   /**
    * Batch request payload management.
    */
-  public class BatchStreamManagerImpl extends AbstractBatchStreamManager implements BatchStreamManager {
+  public class BatchManagerImpl extends AbstractBatchManager implements BatchManager {
 
-    public BatchStreamManagerImpl(final ODataBatchRequest req) {
+    public BatchManagerImpl(final ODataBatchRequest req) {
       super(req, ODataBatchRequestImpl.this.futureWrapper);
     }
 
@@ -99,7 +100,7 @@ public class ODataBatchRequestImpl
     }
 
     @Override
-    public ODataOutsideUpdate addOutsideUpdate() {
+    public void addOutsideUpdate(final ODataBatchableRequest request) {
       closeCurrentItem();
 
       // stream dash boundary
@@ -110,7 +111,7 @@ public class ODataBatchRequestImpl
 
       ((ODataBatchRequestImpl) req).expectedResItems.add(expectedResItem);
 
-      return (ODataOutsideUpdate) currentItem;
+      ((ODataOutsideUpdate) currentItem).setRequest(request);
     }
   }
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/8ad67fed/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/AbstractODataStreamedEntityRequest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/AbstractODataStreamedEntityRequest.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/AbstractODataStreamedEntityRequest.java
index ec5f773..e04d5d2 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/AbstractODataStreamedEntityRequest.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/AbstractODataStreamedEntityRequest.java
@@ -20,7 +20,7 @@ package org.apache.olingo.client.core.communication.request.streamed;
 
 import java.net.URI;
 import org.apache.olingo.client.api.CommonODataClient;
-import org.apache.olingo.client.api.communication.request.ODataStreamManager;
+import org.apache.olingo.client.api.communication.request.ODataPayloadManager;
 import org.apache.olingo.client.api.communication.request.streamed.ODataStreamedEntityRequest;
 import org.apache.olingo.client.api.communication.response.ODataResponse;
 import org.apache.olingo.commons.api.format.ODataPubFormat;
@@ -32,7 +32,7 @@ import org.apache.olingo.client.api.http.HttpMethod;
  * @param <V> OData response type corresponding to the request implementation.
  * @param <T> OData request payload type corresponding to the request implementation.
  */
-public abstract class AbstractODataStreamedEntityRequest<V extends ODataResponse, T extends ODataStreamManager<V>>
+public abstract class AbstractODataStreamedEntityRequest<V extends ODataResponse, T extends ODataPayloadManager<V>>
         extends AbstractODataStreamedRequest<V, T>
         implements ODataStreamedEntityRequest<V, T> {
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/8ad67fed/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/AbstractODataStreamedRequest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/AbstractODataStreamedRequest.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/AbstractODataStreamedRequest.java
index 0a78d83..3d5c0a2 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/AbstractODataStreamedRequest.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/AbstractODataStreamedRequest.java
@@ -29,7 +29,7 @@ import org.apache.http.client.methods.HttpEntityEnclosingRequestBase;
 import org.apache.http.entity.ContentType;
 import org.apache.olingo.client.api.ODataBatchConstants;
 import org.apache.olingo.client.api.CommonODataClient;
-import org.apache.olingo.client.api.communication.request.ODataStreamManager;
+import org.apache.olingo.client.api.communication.request.ODataPayloadManager;
 import org.apache.olingo.client.api.communication.request.ODataStreamedRequest;
 import org.apache.olingo.client.api.communication.request.ODataStreamer;
 import org.apache.olingo.client.api.communication.request.batch.CommonODataBatchRequest;
@@ -47,13 +47,13 @@ import org.apache.commons.io.IOUtils;
  * @param <V> OData response type corresponding to the request implementation.
  * @param <T> OData request payload type corresponding to the request implementation.
  */
-public abstract class AbstractODataStreamedRequest<V extends ODataResponse, T extends ODataStreamManager<V>>
+public abstract class AbstractODataStreamedRequest<V extends ODataResponse, T extends ODataPayloadManager<V>>
         extends AbstractODataRequest<ODataMediaFormat> implements ODataStreamedRequest<V, T> {
 
   /**
    * OData payload stream manager.
    */
-  protected ODataStreamManager<V> streamManager;
+  protected ODataPayloadManager<V> payloadManager;
 
   /**
    * Wrapper for actual streamed request's future. This holds information about the HTTP request / response currently
@@ -81,18 +81,18 @@ public abstract class AbstractODataStreamedRequest<V extends ODataResponse, T ex
    *
    * @return OData request payload management object.
    */
-  protected abstract T getStreamManager();
+  protected abstract T getPayloadManager();
 
   /**
    * {@inheritDoc }
    */
   @Override
   @SuppressWarnings("unchecked")
-  public T execute() {
-    streamManager = getStreamManager();
+  public T payloadManager() {
+    payloadManager = getPayloadManager();
 
     ((HttpEntityEnclosingRequestBase) request).setEntity(
-            URIUtils.buildInputStreamEntity(odataClient, streamManager.getBody()));
+            URIUtils.buildInputStreamEntity(odataClient, payloadManager.getBody()));
 
     futureWrapper.setWrapped(odataClient.getConfiguration().getExecutor().submit(new Callable<HttpResponse>() {
       @Override
@@ -102,7 +102,7 @@ public abstract class AbstractODataStreamedRequest<V extends ODataResponse, T ex
     }));
 
     // returns the stream manager object
-    return (T) streamManager;
+    return (T) payloadManager;
   }
 
   /**
@@ -125,11 +125,11 @@ public abstract class AbstractODataStreamedRequest<V extends ODataResponse, T ex
    * @param contentId ContentId header value to be added to the serialization. Use this in case of changeset items.
    */
   public void batch(final CommonODataBatchRequest req, final String contentId) {
-    final InputStream input = getStreamManager().getBody();
+    final InputStream input = getPayloadManager().getBody();
 
     try {
       // finalize the body
-      getStreamManager().finalizeBody();
+      getPayloadManager().finalizeBody();
 
       req.rawAppend(toByteArray());
       if (StringUtils.isNotBlank(contentId)) {

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/8ad67fed/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/ODataMediaEntityCreateRequestImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/ODataMediaEntityCreateRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/ODataMediaEntityCreateRequestImpl.java
index 89b0da0..ad6b918 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/ODataMediaEntityCreateRequestImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/ODataMediaEntityCreateRequestImpl.java
@@ -60,11 +60,11 @@ public class ODataMediaEntityCreateRequestImpl<E extends CommonODataEntity>
   }
 
   @Override
-  protected MediaEntityCreateStreamManager<E> getStreamManager() {
-    if (streamManager == null) {
-      streamManager = new MediaEntityCreateStreamManagerImpl(media);
+  protected MediaEntityCreateStreamManager<E> getPayloadManager() {
+    if (payloadManager == null) {
+      payloadManager = new MediaEntityCreateStreamManagerImpl(media);
     }
-    return (MediaEntityCreateStreamManager<E>) streamManager;
+    return (MediaEntityCreateStreamManager<E>) payloadManager;
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/8ad67fed/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/ODataMediaEntityUpdateRequestImpl.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/ODataMediaEntityUpdateRequestImpl.java b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/ODataMediaEntityUpdateRequestImpl.java
index bd9fa82..9513277 100644
--- a/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/ODataMediaEntityUpdateRequestImpl.java
+++ b/lib/client-core/src/main/java/org/apache/olingo/client/core/communication/request/streamed/ODataMediaEntityUpdateRequestImpl.java
@@ -61,11 +61,11 @@ public class ODataMediaEntityUpdateRequestImpl<E extends CommonODataEntity>
   }
 
   @Override
-  protected MediaEntityUpdateStreamManager<E> getStreamManager() {
-    if (streamManager == null) {
-      streamManager = new MediaEntityUpdateStreamManagerImpl(media);
+  protected MediaEntityUpdateStreamManager<E> getPayloadManager() {
+    if (payloadManager == null) {
+      payloadManager = new MediaEntityUpdateStreamManagerImpl(media);
     }
-    return (MediaEntityUpdateStreamManager<E>) streamManager;
+    return (MediaEntityUpdateStreamManager<E>) payloadManager;
   }
 
   /**