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
-
Nested Class Summary
Nested classes/interfaces inherited from class SeeOtherHost
SeeOtherHost.SeeOtherHostVHostItemExtension, SeeOtherHost.SeeOtherHostVHostItemExtensionProviderNested classes/interfaces inherited from interface SeeOtherHostIfc
SeeOtherHostIfc.Phase -
Field Summary
FieldsFields inherited from class SeeOtherHost
defaultHost, eventBus, REDIRECTION_ENABLED, vHostManager -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfindHostForJID(BareJID jid, BareJID host) Finds an appropriate host for a given JIDprotected voidnodeShutdown(ShutdownEvent event) voidSets list of available nodes in cluster environmentMethods inherited from class SeeOtherHost
initialize, isEnabled, isNodeShutdown, setDefaultHost, start, stopMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface SeeOtherHostIfc
getStreamError, isRedirectionRequired
-
Field Details
-
connectedNodes
-
-
Constructor Details
-
SeeOtherHostHashed
public SeeOtherHostHashed()
-
-
Method Details
-
findHostForJID
Description copied from interface:SeeOtherHostIfcFinds an appropriate host for a given JID- Specified by:
findHostForJIDin interfaceSeeOtherHostIfc- Overrides:
findHostForJIDin classSeeOtherHost- Parameters:
jid- is a user JID extracted from the stream open attributeshost- 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
Description copied from interface:SeeOtherHostIfcSets list of available nodes in cluster environment- Specified by:
setNodesin interfaceSeeOtherHostIfc- Overrides:
setNodesin classSeeOtherHost- Parameters:
connectedNodes- current list of nodes
-
nodeShutdown
- Overrides:
nodeShutdownin classSeeOtherHost
-