public interface SeeOtherHostIfc
Modifier and Type | Interface and Description |
---|---|
static class |
SeeOtherHostIfc.Phase |
Modifier and Type | Field and Description |
---|---|
static String |
CM_SEE_OTHER_HOST_ACTIVE |
static String |
CM_SEE_OTHER_HOST_CLASS_PROP_DEF_VAL |
static String |
CM_SEE_OTHER_HOST_CLASS_PROP_DEF_VAL_CLUSTER |
static String |
CM_SEE_OTHER_HOST_CLASS_PROP_KEY |
static String |
CM_SEE_OTHER_HOST_CLASS_PROPERTY |
static String |
CM_SEE_OTHER_HOST_DEFAULT_HOST |
static String |
CM_SEE_OTHER_HOST_DEFAULT_PORT |
Modifier and Type | Method and Description |
---|---|
BareJID |
findHostForJID(BareJID jid,
BareJID host)
Finds an appropriate host for a given JID
|
void |
getDefaults(Map<String,Object> defs,
Map<String,Object> params) |
default Element |
getStreamError(String xmlns,
BareJID destination,
Integer port)
Returns Element object containing stream:error message
|
boolean |
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 phase
|
default boolean |
isRedirectionRequired(BareJID defaultHost,
BareJID redirectionHost)
Method validates whether a redirection for a particular hostname and
resulting redirection hastname is required
|
void |
setNodes(List<JID> nodes)
Sets list of available nodes in cluster environment
|
void |
setProperties(Map<String,Object> props) |
static final String CM_SEE_OTHER_HOST_CLASS_PROPERTY
static final String CM_SEE_OTHER_HOST_CLASS_PROP_KEY
static final String CM_SEE_OTHER_HOST_CLASS_PROP_DEF_VAL
static final String CM_SEE_OTHER_HOST_CLASS_PROP_DEF_VAL_CLUSTER
static final String CM_SEE_OTHER_HOST_DEFAULT_HOST
static final String CM_SEE_OTHER_HOST_DEFAULT_PORT
static final String CM_SEE_OTHER_HOST_ACTIVE
BareJID findHostForJID(BareJID jid, BareJID host)
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 methodvoid setNodes(List<JID> nodes)
nodes
- current list of nodesdefault Element getStreamError(String xmlns, BareJID destination, Integer port)
xmlns
- xml namespace of the elementdestination
- BareJID address of the redirect destinationboolean isEnabled(VHostItem vHost, SeeOtherHostIfc.Phase ph)
vHost
- vHost for which redirection should be performedph
- phase for which the check should be performeddefault boolean isRedirectionRequired(BareJID defaultHost, BareJID redirectionHost)
defaultHost
- default hostname of the particular machineredirectionHost
- destination hostnametrue
if the redirection is required, otherwise
false
Copyright © 2019 "Tigase, Inc.". All rights reserved.