Class NettyOutboundConnectionHandler

  • All Implemented Interfaces:
    io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler

    public class NettyOutboundConnectionHandler
    extends NettyConnectionHandler
    Outbound (S2S) specific ConnectionHandler that knows which subclass of StanzaHandler should be created and how to build and configure a NettyConnection.
    Author:
    Matthew Vivian, Alex Gidman
    • Method Detail

      • channelActive

        public void channelActive​(io.netty.channel.ChannelHandlerContext ctx)
                           throws Exception
        Specified by:
        channelActive in interface io.netty.channel.ChannelInboundHandler
        Overrides:
        channelActive in class io.netty.channel.ChannelInboundHandlerAdapter
        Throws:
        Exception
      • handlerAdded

        public void handlerAdded​(io.netty.channel.ChannelHandlerContext ctx)
        Specified by:
        handlerAdded in interface io.netty.channel.ChannelHandler
        Overrides:
        handlerAdded in class NettyConnectionHandler
      • userEventTriggered

        public void userEventTriggered​(io.netty.channel.ChannelHandlerContext ctx,
                                       Object evt)
                                throws Exception
        Called when SSL Handshake has been completed. If successful, attempts authentication via SASL, or dialback dependent on configuration and certificate validity. If not successful, either attempts dialback on a plain un-encrypted connection, or throws an exception dependent on configuration.
        Specified by:
        userEventTriggered in interface io.netty.channel.ChannelInboundHandler
        Overrides:
        userEventTriggered in class NettyConnectionHandler
        Parameters:
        ctx - ChannelHandlerContext for the Netty channel
        evt - Event that has been triggered - this implementation specifically identifies SslHandshakeCompletionEvent
        Throws:
        Exception
      • getDomainPair

        public DomainPair getDomainPair()
      • getPort

        public int getPort()