@Override public ResultSegment<T> preProcessResponse(TableQuery<T> queryRef, CloudTableClient client, OperationContext context) throws Exception { if (this.getResult().getStatusCode() != HttpURLConnection.HTTP_OK) { throw TableServiceException.generateTableServiceException(this.getResult(), null, this.getConnection().getErrorStream(), options.getTablePayloadFormat()); } return null; }
@Override public ResultSegment<T> preProcessResponse(TableQuery<T> queryRef, CloudTableClient client, OperationContext context) throws Exception { if (this.getResult().getStatusCode() != HttpURLConnection.HTTP_OK) { throw TableServiceException.generateTableServiceException(this.getResult(), null, this.getConnection().getErrorStream(), options.getTablePayloadFormat()); } return null; }
@Override public ResultSegment<R> preProcessResponse(TableQuery<T> queryRef, CloudTableClient client, OperationContext context) throws Exception { if (this.getResult().getStatusCode() != HttpURLConnection.HTTP_OK) { throw TableServiceException.generateTableServiceException(this.getResult(), null, this.getConnection().getErrorStream(), options.getTablePayloadFormat()); } return null; }
@Override public ResultSegment<R> preProcessResponse(TableQuery<T> queryRef, CloudTableClient client, OperationContext context) throws Exception { if (this.getResult().getStatusCode() != HttpURLConnection.HTTP_OK) { throw TableServiceException.generateTableServiceException(this.getResult(), null, this.getConnection().getErrorStream(), options.getTablePayloadFormat()); } return null; }
@Override public TableResult preProcessResponse(TableOperation operation, CloudTableClient client, OperationContext context) throws Exception { if (this.getResult().getStatusCode() != HttpURLConnection.HTTP_NO_CONTENT) { throw TableServiceException.generateTableServiceException(this.getResult(), operation, this.getConnection().getErrorStream(), options.getTablePayloadFormat()); } return operation.parseResponse(null, this.getResult().getStatusCode(), this.getConnection() .getHeaderField(TableConstants.HeaderConstants.ETAG), opContext, options); }
@Override public TableResult preProcessResponse(TableOperation operation, CloudTableClient client, OperationContext context) throws Exception { if (this.getResult().getStatusCode() != HttpURLConnection.HTTP_NO_CONTENT) { throw TableServiceException.generateTableServiceException(this.getResult(), operation, this.getConnection().getErrorStream(), options.getTablePayloadFormat()); } return operation.parseResponse(null, this.getResult().getStatusCode(), this.getConnection() .getHeaderField(TableConstants.HeaderConstants.ETAG), opContext, options); }
@Override public TableResult preProcessResponse(TableOperation operation, CloudTableClient client, OperationContext context) throws Exception { if (this.getResult().getStatusCode() != HttpURLConnection.HTTP_NO_CONTENT) { throw TableServiceException.generateTableServiceException(this.getResult(), operation, this.getConnection().getErrorStream(), options.getTablePayloadFormat()); } return operation.parseResponse(null, this.getResult().getStatusCode(), this.getConnection() .getHeaderField(TableConstants.HeaderConstants.ETAG), opContext, options); }
@Override public TableResult preProcessResponse(TableOperation operation, CloudTableClient client, OperationContext context) throws Exception { if (this.getResult().getStatusCode() != HttpURLConnection.HTTP_NO_CONTENT) { throw TableServiceException.generateTableServiceException(this.getResult(), operation, this.getConnection().getErrorStream(), options.getTablePayloadFormat()); } return operation.parseResponse(null, this.getResult().getStatusCode(), this.getConnection() .getHeaderField(TableConstants.HeaderConstants.ETAG), opContext, options); }
@Override public TableResult preProcessResponse(TableOperation operation, CloudTableClient client, OperationContext context) throws Exception { if (this.getResult().getStatusCode() != HttpURLConnection.HTTP_NO_CONTENT) { throw TableServiceException.generateTableServiceException(this.getResult(), operation, this.getConnection().getErrorStream(), options.getTablePayloadFormat()); } return operation.parseResponse(null, this.getResult().getStatusCode(), null, opContext, options); }
@Override public TableResult preProcessResponse(TableOperation operation, CloudTableClient client, OperationContext context) throws Exception { if (this.getResult().getStatusCode() != HttpURLConnection.HTTP_NO_CONTENT) { throw TableServiceException.generateTableServiceException(this.getResult(), operation, this.getConnection().getErrorStream(), options.getTablePayloadFormat()); } return operation.parseResponse(null, this.getResult().getStatusCode(), null, opContext, options); }
@Override public TableResult preProcessResponse(TableOperation operation, CloudTableClient client, OperationContext context) throws Exception { if (operation.opType == TableOperationType.INSERT) { if (operation.getEchoContent() && this.getResult().getStatusCode() == HttpURLConnection.HTTP_CREATED) { // Insert should receive created if echo content is on return new TableResult(); } else if (!operation.getEchoContent() && this.getResult().getStatusCode() == HttpURLConnection.HTTP_NO_CONTENT) { // Insert should receive no content if echo content is off return operation.parseResponse(null, this.getResult().getStatusCode(), this.getConnection() .getHeaderField(TableConstants.HeaderConstants.ETAG), opContext, options); } } else if (this.getResult().getStatusCode() == HttpURLConnection.HTTP_NO_CONTENT) { // InsertOrMerge and InsertOrReplace should always receive no content return operation.parseResponse(null, this.getResult().getStatusCode(), this.getConnection() .getHeaderField(TableConstants.HeaderConstants.ETAG), opContext, options); } throw TableServiceException.generateTableServiceException(this.getResult(), operation, this.getConnection().getErrorStream(), options.getTablePayloadFormat()); }
@Override public TableResult preProcessResponse(TableOperation operation, CloudTableClient client, OperationContext context) throws Exception { if (operation.opType == TableOperationType.INSERT) { if (operation.getEchoContent() && this.getResult().getStatusCode() == HttpURLConnection.HTTP_CREATED) { // Insert should receive created if echo content is on return new TableResult(); } else if (!operation.getEchoContent() && this.getResult().getStatusCode() == HttpURLConnection.HTTP_NO_CONTENT) { // Insert should receive no content if echo content is off return operation.parseResponse(null, this.getResult().getStatusCode(), this.getConnection() .getHeaderField(TableConstants.HeaderConstants.ETAG), opContext, options); } } else if (this.getResult().getStatusCode() == HttpURLConnection.HTTP_NO_CONTENT) { // InsertOrMerge and InsertOrReplace should always receive no content return operation.parseResponse(null, this.getResult().getStatusCode(), this.getConnection() .getHeaderField(TableConstants.HeaderConstants.ETAG), opContext, options); } throw TableServiceException.generateTableServiceException(this.getResult(), operation, this.getConnection().getErrorStream(), options.getTablePayloadFormat()); }