Class SeeOtherHostHashed

java.lang.Object
tigase.server.xmppclient.SeeOtherHost
tigase.server.xmppclient.SeeOtherHostHashed
All Implemented Interfaces:
Initializable, Lifecycle, SeeOtherHostIfc
Direct Known Subclasses:
SeeOtherHostDB, SeeOtherHostDualIP

@Bean(name="seeOtherHost", parent=ClientConnectionManager.class, active=true) @ClusterModeRequired(active=true) public class SeeOtherHostHashed extends SeeOtherHost
Default implementation for cluster environment of SeeOtherHostIfc returning redirect host based on the hash value of the user's JID
Author:
Wojtek
  • Field Details

    • connectedNodes

      protected List<tigase.xmpp.jid.BareJID> connectedNodes
  • Constructor Details

    • SeeOtherHostHashed

      public SeeOtherHostHashed()
  • Method Details

    • findHostForJID

      public tigase.xmpp.jid.BareJID findHostForJID(tigase.xmpp.jid.BareJID jid, tigase.xmpp.jid.BareJID host)
      Description copied from interface: SeeOtherHostIfc
      Finds an appropriate host for a given JID
      Specified by:
      findHostForJID in interface SeeOtherHostIfc
      Overrides:
      findHostForJID in class SeeOtherHost
      Parameters:
      jid - is a user JID extracted from the stream open attributes
      host - is "this" host to which the user is now connected and which calls the method
      Returns:
      BareJID of possible host to which the user should connect or NULL
    • setNodes

      public void setNodes(List<tigase.xmpp.jid.JID> connectedNodes)
      Description copied from interface: SeeOtherHostIfc
      Sets list of available nodes in cluster environment
      Specified by:
      setNodes in interface SeeOtherHostIfc
      Overrides:
      setNodes in class SeeOtherHost
      Parameters:
      connectedNodes - current list of nodes
    • nodeShutdown

      protected void nodeShutdown(ShutdownEvent event)
      Overrides:
      nodeShutdown in class SeeOtherHost