Class AbstractSimpleClientSessionCreator

    • Field Detail

      • connectTimeout

        private long connectTimeout
      • authenticateTimeout

        private long authenticateTimeout
    • Constructor Detail

      • AbstractSimpleClientSessionCreator

        protected AbstractSimpleClientSessionCreator()
      • AbstractSimpleClientSessionCreator

        protected AbstractSimpleClientSessionCreator​(long connTimeout,
                                                     long authTimeout)
    • Method Detail

      • setConnectTimeout

        public void setConnectTimeout​(long timeout)
        Specified by:
        setConnectTimeout in interface SimpleClientConfigurator
        Parameters:
        timeout - Requested connect timeout (msec.) - always positive
      • setAuthenticationTimeout

        public void setAuthenticationTimeout​(long timeout)
        Specified by:
        setAuthenticationTimeout in interface SimpleClientConfigurator
        Parameters:
        timeout - Requested authentication timeout (msec.) - always positive
      • sessionLogin

        public ClientSession sessionLogin​(java.net.SocketAddress target,
                                          java.lang.String username,
                                          java.lang.String password)
                                   throws java.io.IOException
        Description copied from interface: SimpleSessionClient
        Creates a session and logs in using the provided credentials
        Specified by:
        sessionLogin in interface SimpleSessionClient
        Parameters:
        target - The target SocketAddress
        username - Username
        password - Password
        Returns:
        Created ClientSession
        Throws:
        java.io.IOException - If failed to login or authenticate
      • sessionLogin

        public ClientSession sessionLogin​(java.net.SocketAddress target,
                                          java.lang.String username,
                                          java.security.KeyPair identity)
                                   throws java.io.IOException
        Description copied from interface: SimpleSessionClient
        Creates a session and logs in using the provided credentials
        Specified by:
        sessionLogin in interface SimpleSessionClient
        Parameters:
        target - The target SocketAddress
        username - Username
        identity - The KeyPair identity
        Returns:
        Created ClientSession
        Throws:
        java.io.IOException - If failed to login or authenticate
      • loginSession

        protected ClientSession loginSession​(ConnectFuture future,
                                             java.lang.String password)
                                      throws java.io.IOException
        Throws:
        java.io.IOException
      • loginSession

        protected ClientSession loginSession​(ConnectFuture future,
                                             java.security.KeyPair identity)
                                      throws java.io.IOException
        Throws:
        java.io.IOException
      • authSession

        protected ClientSession authSession​(ConnectFuture future,
                                            java.lang.String password)
                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • authSession

        protected ClientSession authSession​(ConnectFuture future,
                                            java.security.KeyPair identity)
                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • authSession

        protected ClientSession authSession​(ClientSession clientSession)
                                     throws java.io.IOException
        Throws:
        java.io.IOException