Package google.registry.proxy.handler
Class WhoisServiceHandler
java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.channel.ChannelDuplexHandler
io.netty.handler.codec.ByteToMessageCodec<io.netty.handler.codec.http.FullHttpResponse>
google.registry.proxy.handler.HttpsRelayServiceHandler
google.registry.proxy.handler.WhoisServiceHandler
- All Implemented Interfaces:
io.netty.channel.ChannelHandler
,io.netty.channel.ChannelInboundHandler
,io.netty.channel.ChannelOutboundHandler
Handler that processes WHOIS protocol logic.
-
Nested Class Summary
Nested classes/interfaces inherited from class google.registry.proxy.handler.HttpsRelayServiceHandler
HttpsRelayServiceHandler.NonOkHttpResponseException
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable
-
Field Summary
Fields inherited from class google.registry.proxy.handler.HttpsRelayServiceHandler
metrics, NON_FATAL_INBOUND_EXCEPTIONS, NON_FATAL_OUTBOUND_EXCEPTIONS
-
Constructor Summary
ConstructorDescriptionWhoisServiceHandler
(String relayHost, String relayPath, boolean canary, Supplier<String> idTokenSupplier, FrontendMetrics metrics) -
Method Summary
Modifier and TypeMethodDescriptionvoid
channelActive
(io.netty.channel.ChannelHandlerContext ctx) protected io.netty.handler.codec.http.FullHttpRequest
decodeFullHttpRequest
(io.netty.buffer.ByteBuf byteBuf) Construct theFullHttpRequest
.void
write
(io.netty.channel.ChannelHandlerContext ctx, Object msg, io.netty.channel.ChannelPromise promise) Terminates connection upon outbound exception.Methods inherited from class google.registry.proxy.handler.HttpsRelayServiceHandler
decode, encode, exceptionCaught
Methods inherited from class io.netty.handler.codec.ByteToMessageCodec
acceptOutboundMessage, channelInactive, channelRead, channelReadComplete, decodeLast, handlerAdded, handlerRemoved
Methods inherited from class io.netty.channel.ChannelDuplexHandler
bind, close, connect, deregister, disconnect, flush, read
Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggered
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, isSharable
-
Constructor Details
-
WhoisServiceHandler
public WhoisServiceHandler(String relayHost, String relayPath, boolean canary, Supplier<String> idTokenSupplier, FrontendMetrics metrics)
-
-
Method Details
-
channelActive
- Specified by:
channelActive
in interfaceio.netty.channel.ChannelInboundHandler
- Overrides:
channelActive
in classio.netty.channel.ChannelInboundHandlerAdapter
- Throws:
Exception
-
decodeFullHttpRequest
protected io.netty.handler.codec.http.FullHttpRequest decodeFullHttpRequest(io.netty.buffer.ByteBuf byteBuf) Description copied from class:HttpsRelayServiceHandler
Construct theFullHttpRequest
.This default method creates a bare-bone
FullHttpRequest
that may need to be modified, e.g. adding headers specific for each protocol.- Overrides:
decodeFullHttpRequest
in classHttpsRelayServiceHandler
- Parameters:
byteBuf
- inbound message.
-
write
public void write(io.netty.channel.ChannelHandlerContext ctx, Object msg, io.netty.channel.ChannelPromise promise) throws Exception Description copied from class:HttpsRelayServiceHandler
Terminates connection upon outbound exception.- Specified by:
write
in interfaceio.netty.channel.ChannelOutboundHandler
- Overrides:
write
in classHttpsRelayServiceHandler
- Throws:
Exception
-