Class LocalServerSession

java.lang.Object
org.jivesoftware.openfire.session.LocalSession
org.jivesoftware.openfire.session.LocalServerSession
All Implemented Interfaces:
ChannelHandler<org.xmpp.packet.Packet>, RoutableChannelHandler, ServerSession, Session
Direct Known Subclasses:
LocalIncomingServerSession, LocalOutgoingServerSession

public abstract class LocalServerSession extends LocalSession implements ServerSession
Author:
dwd
  • Field Details

    • authenticationMethod

      protected ServerSession.AuthenticationMethod authenticationMethod
      The method that was used to authenticate this session. Null when the session is not authenticated.
  • Constructor Details

  • Method Details

    • 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
    • setStatus

      public void setStatus(Session.Status status)
      Description copied from class: LocalSession
      Set the new status of this session. Setting a status may trigger certain events to occur (setting a closed status will close this session).
      Overrides:
      setStatus in class LocalSession
      Parameters:
      status - The new status code for this session
    • getAuthenticationMethod

      public ServerSession.AuthenticationMethod getAuthenticationMethod()
      Obtain method that was used to authenticate this session. Null when the session is not authenticated.
      Specified by:
      getAuthenticationMethod in interface ServerSession
      Returns:
      the method used for authentication (possibly null).
    • setAuthenticationMethod

      public void setAuthenticationMethod(@Nonnull ServerSession.AuthenticationMethod authenticationMethod)
      Set the method that was used to authenticate this session. Setting a value will cause the status of this session to be updated to 'Authenticated'.
      Parameters:
      authenticationMethod - The new authentication method for this session
    • toString

      public String toString()
      Overrides:
      toString in class LocalSession