forked from apache/dubbo
-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 parent
11f914c
commit 97861c9
Showing
6 changed files
with
10 additions
and
34 deletions.
There are no files selected for viewing
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
21 changes: 3 additions & 18 deletions
21
...o-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/GracefulShutdownHandler.java
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 |
---|---|---|
@@ -1,30 +1,15 @@ | ||
package org.apache.dubbo.rpc.protocol.tri; | ||
|
||
import io.netty.channel.ChannelDuplexHandler; | ||
import io.netty.channel.ChannelHandler.Sharable; | ||
|
||
import io.netty.channel.ChannelHandlerContext; | ||
import io.netty.channel.ChannelInboundHandlerAdapter; | ||
import io.netty.channel.ChannelPipeline; | ||
import io.netty.channel.ChannelPromise; | ||
import io.netty.handler.codec.http2.Http2ConnectionDecoder; | ||
import io.netty.handler.codec.http2.Http2ConnectionEncoder; | ||
import io.netty.handler.codec.http2.Http2FrameCodec; | ||
import io.netty.handler.codec.http2.Http2FrameCodecBuilder; | ||
import io.netty.handler.codec.http2.Http2MultiplexHandler; | ||
import io.netty.handler.codec.http2.Http2Settings; | ||
import io.netty.handler.ssl.SslContext; | ||
import org.apache.dubbo.common.extension.Activate; | ||
import org.apache.dubbo.remoting.netty4.Http2WireProtocol; | ||
|
||
import io.netty.handler.codec.http2.Http2ChannelDuplexHandler; | ||
|
||
public class GracefulShutdownHandler extends Http2FrameCodec { | ||
|
||
public GracefulShutdownHandler() { | ||
} | ||
public class GracefulShutdownHandler extends Http2ChannelDuplexHandler { | ||
|
||
@Override | ||
public void close(ChannelHandlerContext ctx, ChannelPromise promise) throws Exception { | ||
super.close(ctx, promise); | ||
new GracefulShutdown(ctx,"app_requested", null).gracefulShutdown(); | ||
} | ||
} |
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