This is an automated email from the ASF dual-hosted git repository.
mikexue pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/eventmesh.git
The following commit(s) were added to refs/heads/master by this push:
new 3d39a276d Substituted anonymous inner class with lambda expression
new 43b752b3a Merge pull request #3670 from kyooosukedn/patch-8
3d39a276d is described below
commit 3d39a276d19588c5deb90608f9e2336190629161
Author: kyooosukedn <[email protected]>
AuthorDate: Sun Apr 9 19:07:35 2023 +0200
Substituted anonymous inner class with lambda expression
---
.../http/processor/SubscribeProcessor.java | 23 ++++++++++------------
1 file changed, 10 insertions(+), 13 deletions(-)
diff --git
a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/processor/SubscribeProcessor.java
b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/processor/SubscribeProcessor.java
index e0f816dac..352ce0dc8 100644
---
a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/processor/SubscribeProcessor.java
+++
b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/processor/SubscribeProcessor.java
@@ -193,20 +193,17 @@ public class SubscribeProcessor implements
HttpRequestProcessor {
eventMeshHTTPServer.getConsumerManager().notifyConsumerManager(consumerGroup,
eventMeshHTTPServer.getSubscriptionManager().getLocalConsumerGroupMapping().get(consumerGroup));
- final CompleteHandler<HttpCommand> handler = new
CompleteHandler<HttpCommand>() {
- @Override
- public void onResponse(final HttpCommand httpCommand) {
- try {
- if (log.isDebugEnabled()) {
- log.debug("{}", httpCommand);
- }
- eventMeshHTTPServer.sendResponse(ctx,
httpCommand.httpResponse());
-
-
eventMeshHTTPServer.getMetrics().getSummaryMetrics().recordHTTPReqResTimeCost(
- System.currentTimeMillis() -
request.getReqTime());
- } catch (Exception ex) {
- log.error("onResponse error", ex);
+ final CompleteHandler<HttpCommand> handler = httpCommand -> {
+ try {
+ if (log.isDebugEnabled()) {
+ log.debug("{}", httpCommand);
}
+ eventMeshHTTPServer.sendResponse(ctx,
httpCommand.httpResponse());
+
+
eventMeshHTTPServer.getMetrics().getSummaryMetrics().recordHTTPReqResTimeCost(
+ System.currentTimeMillis() - request.getReqTime());
+ } catch (Exception ex) {
+ log.error("onResponse error", ex);
}
};
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]