Package org.dcache.xrootd.core
Class XrootdSessionHandler
- java.lang.Object
-
- io.netty.channel.ChannelHandlerAdapter
-
- io.netty.channel.ChannelInboundHandlerAdapter
-
- org.dcache.xrootd.core.XrootdRequestHandler
-
- org.dcache.xrootd.core.XrootdSessionHandler
-
- All Implemented Interfaces:
io.netty.channel.ChannelHandler,io.netty.channel.ChannelInboundHandler
public class XrootdSessionHandler extends XrootdRequestHandler
Manages kXR_login and the login session. This handler is responsible for adding the correct authentication handler to the pipeline based on the client protocol interaction.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringSESSION_HANDLER
-
Constructor Summary
Constructors Constructor Description XrootdSessionHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(XrootdAuthenticationHandler handler)voidchannelInactive(io.netty.channel.ChannelHandlerContext ctx)protected java.lang.ObjectdoOnEndSession(io.netty.channel.ChannelHandlerContext ctx, EndSessionRequest request)protected LoginResponsedoOnLogin(io.netty.channel.ChannelHandlerContext ctx, LoginRequest request)protected java.lang.ObjectgetResponse(io.netty.channel.ChannelHandlerContext ctx, XrootdRequest req)booleanisLoginStarted()voidsetAuthFailed(io.netty.channel.ChannelHandlerContext ctx)voidsetAuthSucceeded(io.netty.channel.ChannelHandlerContext ctx)voidsetLoginStarted()voidsetSigningPolicy(SigningPolicy signingPolicy)voidsetSubject(javax.security.auth.Subject subject)voidsetTlsSessionInfo(TLSSessionInfo tlsSessionInfo)-
Methods inherited from class org.dcache.xrootd.core.XrootdRequestHandler
channelActive, channelRead, doOnAuthentication, doOnClose, doOnDirList, doOnLocate, doOnMkDir, doOnMv, doOnOpen, doOnPrepare, doOnProtocolRequest, doOnQuery, doOnRead, doOnReadV, doOnRm, doOnRmDir, doOnSet, doOnStat, doOnStatx, doOnSync, doOnWrite, getDestinationAddress, getSourceAddress, isHealthCheck, requestReceived, respond, unsupported, userEventTriggered, withError, withOk
-
Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught
-
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, handlerRemoved, isSharable
-
-
-
-
Field Detail
-
SESSION_HANDLER
public static final java.lang.String SESSION_HANDLER
- See Also:
- Constant Field Values
-
-
Method Detail
-
channelInactive
public void channelInactive(io.netty.channel.ChannelHandlerContext ctx) throws java.lang.Exception- Specified by:
channelInactivein interfaceio.netty.channel.ChannelInboundHandler- Overrides:
channelInactivein classio.netty.channel.ChannelInboundHandlerAdapter- Throws:
java.lang.Exception
-
add
public void add(XrootdAuthenticationHandler handler)
-
setSubject
public void setSubject(javax.security.auth.Subject subject)
-
getResponse
protected java.lang.Object getResponse(io.netty.channel.ChannelHandlerContext ctx, XrootdRequest req) throws java.lang.Exception- Overrides:
getResponsein classXrootdRequestHandler- Throws:
java.lang.Exception
-
doOnLogin
protected LoginResponse doOnLogin(io.netty.channel.ChannelHandlerContext ctx, LoginRequest request) throws XrootdException
- Overrides:
doOnLoginin classXrootdRequestHandler- Throws:
XrootdException
-
doOnEndSession
protected java.lang.Object doOnEndSession(io.netty.channel.ChannelHandlerContext ctx, EndSessionRequest request) throws XrootdException- Overrides:
doOnEndSessionin classXrootdRequestHandler- Throws:
XrootdException
-
isLoginStarted
public boolean isLoginStarted()
-
setLoginStarted
public void setLoginStarted()
-
setAuthSucceeded
public void setAuthSucceeded(io.netty.channel.ChannelHandlerContext ctx) throws XrootdException- Throws:
XrootdException
-
setAuthFailed
public void setAuthFailed(io.netty.channel.ChannelHandlerContext ctx)
-
setSigningPolicy
public void setSigningPolicy(SigningPolicy signingPolicy)
-
setTlsSessionInfo
public void setTlsSessionInfo(TLSSessionInfo tlsSessionInfo)
-
-