-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
18 additions
and
11 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ | |
* * | ||
* hprose client class for Java. * | ||
* * | ||
* LastModified: Nov 13, 2016 * | ||
* LastModified: Oct 16, 2016 * | ||
* Author: Ma Bingyao <[email protected]> * | ||
* * | ||
\**********************************************************/ | ||
|
@@ -336,6 +336,10 @@ private ByteBuffer inputFilter(ByteBuffer response, ClientContext context) { | |
|
||
private Promise<ByteBuffer> beforeFilterHandler(ByteBuffer request, final ClientContext context) { | ||
request = outputFilter(request, context); | ||
if (context.getSettings().isOneway()) { | ||
afterFilterHandler.handle(request, context); | ||
return Promise.value(null); | ||
} | ||
return afterFilterHandler.handle(request, context).then(new Func<ByteBuffer, ByteBuffer>() { | ||
public ByteBuffer call(ByteBuffer response) throws Throwable { | ||
response = inputFilter(response, context); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ | |
* * | ||
* hprose HandlerManager class for Java. * | ||
* * | ||
* LastModified: Jul 4, 2016 * | ||
* LastModified: Nov 13, 2016 * | ||
* Author: Ma Bingyao <[email protected]> * | ||
* * | ||
\**********************************************************/ | ||
|
@@ -40,6 +40,7 @@ public Promise<ByteBuffer> handle(ByteBuffer request, HproseContext context) { | |
} | ||
return beforeFilterHandler(request, context).then(new Func<ByteBuffer, ByteBuffer>() { | ||
public ByteBuffer call(ByteBuffer response) throws Throwable { | ||
if (response == null) return null; | ||
if (response.position() != 0) { | ||
response.flip(); | ||
} | ||
|
@@ -55,6 +56,7 @@ public Promise<ByteBuffer> handle(ByteBuffer request, HproseContext context) { | |
} | ||
return afterFilterHandler(request, context).then(new Func<ByteBuffer, ByteBuffer>() { | ||
public ByteBuffer call(ByteBuffer response) throws Throwable { | ||
if (response == null) return null; | ||
if (response.position() != 0) { | ||
response.flip(); | ||
} | ||
|
@@ -93,6 +95,7 @@ public Promise<ByteBuffer> handle(ByteBuffer request, HproseContext context) { | |
} | ||
return handler.handle(request, context, next).then(new Func<ByteBuffer, ByteBuffer>() { | ||
public ByteBuffer call(ByteBuffer response) throws Throwable { | ||
if (response == null) return null; | ||
if (response.position() != 0) { | ||
response.flip(); | ||
} | ||
|