Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix batch interceptor bugs. #1164

Merged
merged 1 commit into from
Oct 4, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ public void modify(Object request) {
Class<?> c = request.getClass();

try {
Method clientRequestIdMethod = c.getMethod("setClientRequestId", new Class[]{String.class});
Method clientRequestIdMethod = c.getMethod("withClientRequestId", new Class[]{String.class});
if (clientRequestIdMethod != null) {
String clientRequestId = UUID.randomUUID().toString();
clientRequestIdMethod.invoke(request, clientRequestId);
}

Method returnClientRequestIdMethod = c.getMethod("setReturnClientRequestId", new Class[]{Boolean.class});
Method returnClientRequestIdMethod = c.getMethod("withReturnClientRequestId", new Class[]{Boolean.class});
if (returnClientRequestIdMethod != null) {
returnClientRequestIdMethod.invoke(request, true);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public void modify(Object request) {
if (detailLevel != null) {
Class<?> c = request.getClass();
try {
Method selectMethod = c.getMethod("setSelect", new Class[]{String.class});
Method selectMethod = c.getMethod("withSelect", new Class[]{String.class});
if (selectMethod != null) {
selectMethod.invoke(request, detailLevel.selectClause());
}
Expand All @@ -31,7 +31,7 @@ public void modify(Object request) {
}

try {
Method filterMethod = c.getMethod("setFilter", new Class[]{String.class});
Method filterMethod = c.getMethod("withFilter", new Class[]{String.class});
if (filterMethod != null) {
filterMethod.invoke(request, detailLevel.filterClause());
}
Expand All @@ -40,7 +40,7 @@ public void modify(Object request) {
}

try {
Method expandMethod = c.getMethod("setExpand", new Class[]{String.class});
Method expandMethod = c.getMethod("withExpand", new Class[]{String.class});
if (expandMethod != null) {
expandMethod.invoke(request, detailLevel.expandClause());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public PageSizeInterceptor(int pageSize) {
public void modify(Object request) {
Class<?> c = request.getClass();
try {
Method maxResultsMethod = c.getMethod("setMaxResults", new Class[]{Integer.class});
Method maxResultsMethod = c.getMethod("withMaxResults", new Class[]{Integer.class});
if (maxResultsMethod != null) {
maxResultsMethod.invoke(request, maxResults);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public ServerTimeoutInterceptor(int timeout) {
public void modify(Object request) {
Class<?> c = request.getClass();
try {
Method timeoutMethod = c.getMethod("setTimeout", new Class[]{Integer.class});
Method timeoutMethod = c.getMethod("withTimeout", new Class[]{Integer.class});
if (timeoutMethod != null) {
timeoutMethod.invoke(request, serverTimeout);
}
Expand Down