Class LocalConnectionMultiplexerSession

    • Constructor Detail

      • LocalConnectionMultiplexerSession

        public LocalConnectionMultiplexerSession​(String serverName,
                                                 Connection connection,
                                                 StreamID streamID)
    • Method Detail

      • createSession

        public static LocalConnectionMultiplexerSession createSession​(String serverName,
                                                                      org.xmlpull.v1.XmlPullParser xpp,
                                                                      Connection connection)
                                                               throws org.xmlpull.v1.XmlPullParserException
        Throws:
        org.xmlpull.v1.XmlPullParserException
      • getAvailableStreamFeatures

        public List<org.dom4j.Element> getAvailableStreamFeatures()
        Description copied from class: LocalSession
        Returns a text with the available stream features. Each subclass may return different values depending whether the session has been authenticated or not.
        Specified by:
        getAvailableStreamFeatures in class LocalSession
        Returns:
        a text with the available stream features or null to add nothing.
      • setDetached

        public void setDetached()
        Description copied from class: LocalSession
        Set the session to detached mode, indicating that the underlying connection has been closed.
        Overrides:
        setDetached in class LocalSession
      • reattach

        public void reattach​(LocalSession connectionProvider,
                             long h)
        Description copied from class: LocalSession
        Reattach the (existing) session to the connection provided by a new session (a session that will be replaced by the older, pre-existing session). The connection must already be initialized as a running XML Stream, normally by having run through XEP-0198 resumption.
        Overrides:
        reattach in class LocalSession
        Parameters:
        connectionProvider - Session from which to obtain the connection from.
        h - the sequence number of the last handled stanza sent over the former stream
      • getConnection

        @Nonnull
        public Connection getConnection()
        Returns the connection associated with this Session.
        Overrides:
        getConnection in class LocalSession
        Returns:
        The connection for this session
      • authenticate

        public boolean authenticate​(String digest)
        Authenticates the connection manager. Shared secret is validated with the one provided by the connection manager. If everything went fine then the session will have a status of "authenticated" and the connection manager will receive the client configuration options.
        Parameters:
        digest - the digest provided by the connection manager with the handshake stanza.
        Returns:
        true if the connection manager was sucessfully authenticated.