Package tigase.server.xmppclient
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 tigase.server.xmppclient.SeeOtherHost
SeeOtherHost.SeeOtherHostVHostItemExtension, SeeOtherHost.SeeOtherHostVHostItemExtensionProvider
Nested classes/interfaces inherited from interface tigase.server.xmppclient.SeeOtherHostIfc
SeeOtherHostIfc.Phase
-
Field Summary
Fields inherited from class tigase.server.xmppclient.SeeOtherHost
defaultHost, eventBus, REDIRECTION_ENABLED, vHostManager
Fields inherited from interface tigase.server.xmppclient.SeeOtherHostIfc
CM_SEE_OTHER_HOST_ACTIVE, CM_SEE_OTHER_HOST_CLASS_PROP_DEF_VAL, CM_SEE_OTHER_HOST_CLASS_PROP_DEF_VAL_CLUSTER, CM_SEE_OTHER_HOST_CLASS_PROP_KEY, CM_SEE_OTHER_HOST_CLASS_PROPERTY, CM_SEE_OTHER_HOST_DEFAULT_HOST, CM_SEE_OTHER_HOST_DEFAULT_PORT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfindHostForJID
(BareJID jid, BareJID host) Finds an appropriate host for a given JIDprotected void
nodeShutdown
(ShutdownEvent event) void
Sets list of available nodes in cluster environmentMethods inherited from class tigase.server.xmppclient.SeeOtherHost
initialize, isEnabled, isNodeShutdown, setDefaultHost, start, stop
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface tigase.server.xmppclient.SeeOtherHostIfc
getStreamError, isRedirectionRequired
-
Field Details
-
connectedNodes
-
-
Constructor Details
-
SeeOtherHostHashed
public SeeOtherHostHashed()
-
-
Method Details
-
findHostForJID
Description copied from interface:SeeOtherHostIfc
Finds an appropriate host for a given JID- Specified by:
findHostForJID
in interfaceSeeOtherHostIfc
- Overrides:
findHostForJID
in 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:SeeOtherHostIfc
Sets list of available nodes in cluster environment- Specified by:
setNodes
in interfaceSeeOtherHostIfc
- Overrides:
setNodes
in classSeeOtherHost
- Parameters:
connectedNodes
- current list of nodes
-
nodeShutdown
- Overrides:
nodeShutdown
in classSeeOtherHost
-