Package org.dcache.xrootd.tpc
Class AbstractClientRequestHandler
- java.lang.Object
-
- io.netty.channel.ChannelHandlerAdapter
-
- io.netty.channel.ChannelInboundHandlerAdapter
-
- org.dcache.xrootd.tpc.AbstractClientRequestHandler
-
- All Implemented Interfaces:
io.netty.channel.ChannelHandler,io.netty.channel.ChannelInboundHandler
- Direct Known Subclasses:
AbstractClientAuthnHandler,AbstractClientSourceHandler,TpcClientConnectHandler
public abstract class AbstractClientRequestHandler extends io.netty.channel.ChannelInboundHandlerAdapterThis handler is intended for implementation of only a very limited subset of the protocol in order to support third-party read requests. It exposes the handshake, login, protocol, auth, open, read, close and endsession exchanges.
-
-
Field Summary
Fields Modifier and Type Field Description protected XrootdTpcClientclientprotected static org.slf4j.LoggerLOGGER
-
Constructor Summary
Constructors Constructor Description AbstractClientRequestHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidasynWaitTimeout(io.netty.channel.ChannelHandlerContext ctx, InboundWaitRespResponse response)voidchannelRead(io.netty.channel.ChannelHandlerContext ctx, java.lang.Object msg)protected voiddoOnAsynResponse(io.netty.channel.ChannelHandlerContext ctx, InboundAttnResponse response)protected voiddoOnAttnResponse(io.netty.channel.ChannelHandlerContext ctx, InboundAttnResponse response)protected voiddoOnAuthenticationResponse(io.netty.channel.ChannelHandlerContext ctx, InboundAuthenticationResponse response)protected voiddoOnChecksumResponse(io.netty.channel.ChannelHandlerContext ctx, InboundChecksumResponse response)protected voiddoOnCloseResponse(io.netty.channel.ChannelHandlerContext ctx, InboundCloseResponse response)protected voiddoOnErrorResponse(io.netty.channel.ChannelHandlerContext ctx, InboundErrorResponse response)protected voiddoOnHandshakeResponse(io.netty.channel.ChannelHandlerContext ctx, InboundHandshakeResponse response)protected voiddoOnLoginResponse(io.netty.channel.ChannelHandlerContext ctx, InboundLoginResponse response)protected voiddoOnOpenResponse(io.netty.channel.ChannelHandlerContext ctx, InboundOpenReadOnlyResponse response)protected voiddoOnProtocolResponse(io.netty.channel.ChannelHandlerContext ctx, InboundProtocolResponse response)protected voiddoOnReadResponse(io.netty.channel.ChannelHandlerContext ctx, InboundReadResponse response)protected voiddoOnRedirectResponse(io.netty.channel.ChannelHandlerContext ctx, InboundRedirectResponse response)protected voiddoOnWaitResponse(io.netty.channel.ChannelHandlerContext ctx, AbstractXrootdInboundResponse response)protected voiddoOnWaitRespResponse(io.netty.channel.ChannelHandlerContext ctx, InboundWaitRespResponse response)voidexceptionCaught(io.netty.channel.ChannelHandlerContext ctx, java.lang.Throwable t)protected intgetWaitInSeconds(AbstractXrootdInboundResponse response)protected voidresponseReceived(io.netty.channel.ChannelHandlerContext ctx, XrootdInboundResponse response)protected voidsendAuthenticationRequest(io.netty.channel.ChannelHandlerContext ctx)protected voidsendChecksumRequest(io.netty.channel.ChannelHandlerContext ctx)protected voidsendCloseRequest(io.netty.channel.ChannelHandlerContext ctx)protected voidsendLoginRequest(io.netty.channel.ChannelHandlerContext ctx)protected voidsendOpenRequest(io.netty.channel.ChannelHandlerContext ctx)protected voidsendReadRequest(io.netty.channel.ChannelHandlerContext ctx)voidsetClient(XrootdTpcClient client)protected <T extends XrootdOutboundRequest>
voidunsupported(java.lang.Class<T> msg)-
Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggered
-
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
-
-
-
-
Field Detail
-
LOGGER
protected static final org.slf4j.Logger LOGGER
-
client
protected XrootdTpcClient client
-
-
Method Detail
-
channelRead
public void channelRead(io.netty.channel.ChannelHandlerContext ctx, java.lang.Object msg)- Specified by:
channelReadin interfaceio.netty.channel.ChannelInboundHandler- Overrides:
channelReadin classio.netty.channel.ChannelInboundHandlerAdapter
-
exceptionCaught
public void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, java.lang.Throwable t)- Specified by:
exceptionCaughtin interfaceio.netty.channel.ChannelHandler- Specified by:
exceptionCaughtin interfaceio.netty.channel.ChannelInboundHandler- Overrides:
exceptionCaughtin classio.netty.channel.ChannelInboundHandlerAdapter
-
setClient
public void setClient(XrootdTpcClient client)
-
asynWaitTimeout
protected void asynWaitTimeout(io.netty.channel.ChannelHandlerContext ctx, InboundWaitRespResponse response)
-
doOnAsynResponse
protected void doOnAsynResponse(io.netty.channel.ChannelHandlerContext ctx, InboundAttnResponse response) throws XrootdException- Throws:
XrootdException
-
doOnAuthenticationResponse
protected void doOnAuthenticationResponse(io.netty.channel.ChannelHandlerContext ctx, InboundAuthenticationResponse response) throws XrootdException- Throws:
XrootdException
-
doOnChecksumResponse
protected void doOnChecksumResponse(io.netty.channel.ChannelHandlerContext ctx, InboundChecksumResponse response) throws XrootdException- Throws:
XrootdException
-
doOnCloseResponse
protected void doOnCloseResponse(io.netty.channel.ChannelHandlerContext ctx, InboundCloseResponse response) throws XrootdException- Throws:
XrootdException
-
doOnErrorResponse
protected void doOnErrorResponse(io.netty.channel.ChannelHandlerContext ctx, InboundErrorResponse response) throws XrootdException- Throws:
XrootdException
-
doOnHandshakeResponse
protected void doOnHandshakeResponse(io.netty.channel.ChannelHandlerContext ctx, InboundHandshakeResponse response) throws XrootdException- Throws:
XrootdException
-
doOnLoginResponse
protected void doOnLoginResponse(io.netty.channel.ChannelHandlerContext ctx, InboundLoginResponse response) throws XrootdException- Throws:
XrootdException
-
doOnOpenResponse
protected void doOnOpenResponse(io.netty.channel.ChannelHandlerContext ctx, InboundOpenReadOnlyResponse response) throws XrootdException- Throws:
XrootdException
-
doOnProtocolResponse
protected void doOnProtocolResponse(io.netty.channel.ChannelHandlerContext ctx, InboundProtocolResponse response) throws XrootdException- Throws:
XrootdException
-
doOnReadResponse
protected void doOnReadResponse(io.netty.channel.ChannelHandlerContext ctx, InboundReadResponse response) throws XrootdException- Throws:
XrootdException
-
doOnRedirectResponse
protected void doOnRedirectResponse(io.netty.channel.ChannelHandlerContext ctx, InboundRedirectResponse response) throws XrootdException- Throws:
XrootdException
-
doOnAttnResponse
protected void doOnAttnResponse(io.netty.channel.ChannelHandlerContext ctx, InboundAttnResponse response) throws XrootdException- Throws:
XrootdException
-
doOnWaitResponse
protected void doOnWaitResponse(io.netty.channel.ChannelHandlerContext ctx, AbstractXrootdInboundResponse response) throws XrootdException- Throws:
XrootdException
-
doOnWaitRespResponse
protected void doOnWaitRespResponse(io.netty.channel.ChannelHandlerContext ctx, InboundWaitRespResponse response) throws XrootdException- Throws:
XrootdException
-
getWaitInSeconds
protected int getWaitInSeconds(AbstractXrootdInboundResponse response)
-
responseReceived
protected void responseReceived(io.netty.channel.ChannelHandlerContext ctx, XrootdInboundResponse response)
-
sendAuthenticationRequest
protected void sendAuthenticationRequest(io.netty.channel.ChannelHandlerContext ctx) throws XrootdException- Throws:
XrootdException
-
sendChecksumRequest
protected void sendChecksumRequest(io.netty.channel.ChannelHandlerContext ctx) throws XrootdException- Throws:
XrootdException
-
sendCloseRequest
protected void sendCloseRequest(io.netty.channel.ChannelHandlerContext ctx) throws XrootdException- Throws:
XrootdException
-
sendLoginRequest
protected void sendLoginRequest(io.netty.channel.ChannelHandlerContext ctx) throws XrootdException- Throws:
XrootdException
-
sendOpenRequest
protected void sendOpenRequest(io.netty.channel.ChannelHandlerContext ctx) throws XrootdException- Throws:
XrootdException
-
sendReadRequest
protected void sendReadRequest(io.netty.channel.ChannelHandlerContext ctx) throws XrootdException- Throws:
XrootdException
-
unsupported
protected <T extends XrootdOutboundRequest> void unsupported(java.lang.Class<T> msg) throws XrootdException
- Throws:
XrootdException
-
-