Package tigase.server.xmppclient
Interface SeeOtherHostIfc
- All Superinterfaces:
Lifecycle
- All Known Implementing Classes:
SeeOtherHost
,SeeOtherHostDB
,SeeOtherHostDualIP
,SeeOtherHostHashed
- Author:
- Wojtek
-
Nested Class Summary
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionfindHostForJID
(BareJID jid, BareJID host) Finds an appropriate host for a given JIDdefault Element
getStreamError
(String xmlns, BareJID destination, Integer port) Returns Element object containing stream:error messageboolean
isEnabled
(VHostItem vHost, SeeOtherHostIfc.Phase ph) Performs check whether redirect is enabled in the given phase by default see-other-host redirect is only active in stream:open phasedefault boolean
isRedirectionRequired
(BareJID defaultHost, BareJID redirectionHost) Method validates whether a redirection for a particular hostname and resulting redirection hastname is requiredvoid
Sets list of available nodes in cluster environment
-
Field Details
-
CM_SEE_OTHER_HOST_CLASS_PROPERTY
- See Also:
-
CM_SEE_OTHER_HOST_CLASS_PROP_KEY
- See Also:
-
CM_SEE_OTHER_HOST_CLASS_PROP_DEF_VAL
- See Also:
-
CM_SEE_OTHER_HOST_CLASS_PROP_DEF_VAL_CLUSTER
- See Also:
-
CM_SEE_OTHER_HOST_DEFAULT_HOST
- See Also:
-
CM_SEE_OTHER_HOST_DEFAULT_PORT
- See Also:
-
CM_SEE_OTHER_HOST_ACTIVE
- See Also:
-
-
Method Details
-
findHostForJID
Finds an appropriate host for a given JID- 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
Sets list of available nodes in cluster environment- Parameters:
nodes
- current list of nodes
-
getStreamError
Returns Element object containing stream:error message- Parameters:
xmlns
- xml namespace of the elementdestination
- BareJID address of the redirect destination- Returns:
- element containing stream:error message
-
isEnabled
Performs check whether redirect is enabled in the given phase by default see-other-host redirect is only active in stream:open phase- Parameters:
vHost
- vHost for which redirection should be performedph
- phase for which the check should be performed- Returns:
- boolean value indicating whether to perform or not redirect for the phase passed as argument
-
isRedirectionRequired
Method validates whether a redirection for a particular hostname and resulting redirection hastname is required- Parameters:
defaultHost
- default hostname of the particular machineredirectionHost
- destination hostname- Returns:
true
if the redirection is required, otherwisefalse
-