Class RemoteClientSession

java.lang.Object
org.jivesoftware.openfire.session.RemoteSession
org.jivesoftware.openfire.session.RemoteClientSession
All Implemented Interfaces:
ChannelHandler<org.xmpp.packet.Packet>, RoutableChannelHandler, ClientSession, Session

public class RemoteClientSession extends RemoteSession implements ClientSession
Surrogate for client sessions hosted in some remote cluster node.
Author:
Gaston Dombiak
  • Constructor Details

    • RemoteClientSession

      public RemoteClientSession(byte[] nodeID, org.xmpp.packet.JID address)
  • Method Details

    • getActiveList

      public PrivacyList getActiveList()
      Description copied from interface: ClientSession
      Returns the Privacy list that overrides the default privacy list. This list affects only this session and only for the duration of the session.
      Specified by:
      getActiveList in interface ClientSession
      Returns:
      the Privacy list that overrides the default privacy list.
    • setActiveList

      public void setActiveList(PrivacyList activeList)
      Description copied from interface: ClientSession
      Sets the Privacy list that overrides the default privacy list. This list affects only this session and only for the duration of the session.
      Specified by:
      setActiveList in interface ClientSession
      Parameters:
      activeList - the Privacy list that overrides the default privacy list.
    • getDefaultList

      public PrivacyList getDefaultList()
      Description copied from interface: ClientSession
      Returns the default Privacy list used for the session's user. This list is processed if there is no active list set for the session.
      Specified by:
      getDefaultList in interface ClientSession
      Returns:
      the default Privacy list used for the session's user.
    • setDefaultList

      public void setDefaultList(PrivacyList defaultList)
      Description copied from interface: ClientSession
      Sets the default Privacy list used for the session's user. This list is processed if there is no active list set for the session.
      Specified by:
      setDefaultList in interface ClientSession
      Parameters:
      defaultList - the default Privacy list used for the session's user.
    • getUsername

      public String getUsername() throws UserNotFoundException
      Description copied from interface: ClientSession
      Returns the username associated with this session. Use this information with the user manager to obtain the user based on username.
      Specified by:
      getUsername in interface ClientSession
      Returns:
      the username associated with this session
      Throws:
      UserNotFoundException - if a user is not associated with a session (the session has not authenticated yet)
    • isAnonymousUser

      public boolean isAnonymousUser()
      Description copied from interface: ClientSession
      Returns true if the authenticated user is an anonymous user or if the use has not authenticated yet.
      Specified by:
      isAnonymousUser in interface ClientSession
      Returns:
      true if the authenticated user is an anonymous user or if the use has not authenticated yet.
    • isInitialized

      public boolean isInitialized()
      Description copied from interface: ClientSession
      Flag indicating if this session has been initialized once coming online. Session initialization occurs after the session receives the first "available" presence update from the client. Initialization actions include pushing offline messages, presence subscription requests, and presence statuses to the client. Initialization occurs only once following the first available presence transition.
      Specified by:
      isInitialized in interface ClientSession
      Returns:
      True if the session has already been initialized
    • setInitialized

      public void setInitialized(boolean isInit)
      Description copied from interface: ClientSession
      Sets the initialization state of the session.
      Specified by:
      setInitialized in interface ClientSession
      Parameters:
      isInit - True if the session has been initialized
      See Also:
    • canFloodOfflineMessages

      public boolean canFloodOfflineMessages()
      Description copied from interface: ClientSession
      Returns true if the offline messages of the user should be sent to the user when the user becomes online. If the user sent a disco request with node "http://jabber.org/protocol/offline" before the available presence then do not flood the user with the offline messages. If the user is connected from many resources then if one of the sessions stopped the flooding then no session should flood the user.
      Specified by:
      canFloodOfflineMessages in interface ClientSession
      Returns:
      true if the offline messages of the user should be sent to the user when the user becomes online.
    • isOfflineFloodStopped

      public boolean isOfflineFloodStopped()
      Description copied from interface: ClientSession
      Returns true if the user requested to not receive offline messages when sending an available presence. The user may send a disco request with node "http://jabber.org/protocol/offline" so that no offline messages are sent to the user when he becomes online. If the user is connected from many resources then if one of the sessions stopped the flooding then no session should flood the user.
      Specified by:
      isOfflineFloodStopped in interface ClientSession
      Returns:
      true if the user requested to not receive offline messages when sending an available presence.
    • getPresence

      public org.xmpp.packet.Presence getPresence()
      Description copied from interface: ClientSession
      Obtain the presence of this session.
      Specified by:
      getPresence in interface ClientSession
      Returns:
      The presence of this session or null if not authenticated
    • setPresence

      public void setPresence(org.xmpp.packet.Presence presence)
      Description copied from interface: ClientSession
      Set the presence of this session
      Specified by:
      setPresence in interface ClientSession
      Parameters:
      presence - The presence for the session
    • incrementConflictCount

      public int incrementConflictCount()
      Description copied from interface: ClientSession
      Increments the conflict by one and returns new number of conflicts detected on this session.
      Specified by:
      incrementConflictCount in interface ClientSession
      Returns:
      the new number of conflicts detected on this session.
    • isMessageCarbonsEnabled

      public boolean isMessageCarbonsEnabled()
      Description copied from interface: ClientSession
      Indicates, whether message carbons are enabled.
      Specified by:
      isMessageCarbonsEnabled in interface ClientSession
      Returns:
      True, if message carbons are enabled.
    • setMessageCarbonsEnabled

      public void setMessageCarbonsEnabled(boolean enabled)
      Description copied from interface: ClientSession
      Enables or disables XEP-0280: Message Carbons for this session.
      Specified by:
      setMessageCarbonsEnabled in interface ClientSession
      Parameters:
      enabled - True, if message carbons are enabled.
      See Also:
    • hasRequestedBlocklist

      public boolean hasRequestedBlocklist()
      Description copied from interface: ClientSession
      Indicates whether this session has requested a blocklist, as specified in XEP-0191.
      Specified by:
      hasRequestedBlocklist in interface ClientSession
      Returns:
      true when a blocklist was requested, otherwise false;
    • setHasRequestedBlocklist

      public void setHasRequestedBlocklist(boolean hasRequestedBlocklist)
      Description copied from interface: ClientSession
      Defines if this session has requested a blocklist, as specified in XEP-0191.
      Specified by:
      setHasRequestedBlocklist in interface ClientSession
      Parameters:
      hasRequestedBlocklist - True when a blocklist has been requested by this session, otherwise false.