@Bean(name="seeOtherHost", parent=ClientConnectionManager.class, active=true) @ClusterModeRequired(active=true) public class SeeOtherHostDualIP extends SeeOtherHostHashed implements Initializable, RegistrarBean, UnregisterAware
Modifier and Type | Class and Description |
---|---|
static interface |
SeeOtherHostDualIP.DualIPRepository<T extends DataSource> |
static class |
SeeOtherHostDualIP.DualIPRepositoryWrapper |
SeeOtherHostIfc.Phase
Modifier and Type | Field and Description |
---|---|
static String |
SEE_OTHER_HOST_DATA_SOURCE_KEY |
static String |
SEE_OTHER_HOST_DATA_SOURCE_VALUE |
static String |
SEE_OTHER_HOST_DB_URL_KEY |
static String |
SEE_OTHER_HOST_FALLBACK_REDIRECTION_KEY |
connectedNodes
defaultHost, REDIRECTION_ENABLED, vHostManager
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 and Description |
---|
SeeOtherHostDualIP() |
Modifier and Type | Method and Description |
---|---|
void |
beforeUnregister()
Method called before bean unregister.
|
void |
clusterRepoItemEvent(ClusterRepoItemEvent event) |
BareJID |
findHostForJID(BareJID jid,
BareJID host)
Finds an appropriate host for a given JID
|
void |
initialize()
Method will be called, when bean will be created, configured and ready to use.
|
boolean |
isRedirectionRequired(BareJID defaultHost,
BareJID redirectionHost)
Method validates whether a redirection for a particular hostname and resulting redirection hastname is required
|
void |
register(Kernel kernel)
Method called when bean is being registered allowing developer to programatically register other beans.
|
protected void |
reloadRedirection() |
void |
setNodes(List<JID> connectedNodes)
Sets list of available nodes in cluster environment
|
void |
unregister(Kernel kernel)
Method called while bean is being unregistered.
|
nodeShutdown
isEnabled, isNodeShutdown, setDefaultHost, start, stop
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getStreamError
public static final String SEE_OTHER_HOST_FALLBACK_REDIRECTION_KEY
public static final String SEE_OTHER_HOST_DATA_SOURCE_KEY
public static final String SEE_OTHER_HOST_DATA_SOURCE_VALUE
public static final String SEE_OTHER_HOST_DB_URL_KEY
public BareJID findHostForJID(BareJID jid, BareJID host)
SeeOtherHostIfc
findHostForJID
in interface SeeOtherHostIfc
findHostForJID
in class SeeOtherHostHashed
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@HandleEvent public void clusterRepoItemEvent(ClusterRepoItemEvent event)
public void setNodes(List<JID> connectedNodes)
SeeOtherHostIfc
setNodes
in interface SeeOtherHostIfc
setNodes
in class SeeOtherHostHashed
connectedNodes
- current list of nodespublic boolean isRedirectionRequired(BareJID defaultHost, BareJID redirectionHost)
SeeOtherHostIfc
isRedirectionRequired
in interface SeeOtherHostIfc
defaultHost
- default hostname of the particular machineredirectionHost
- destination hostnametrue
if the redirection is required, otherwise false
public void register(Kernel kernel)
RegistrarBean
register
in interface RegistrarBean
kernel
- - instance from local scopepublic void unregister(Kernel kernel)
RegistrarBean
unregister
in interface RegistrarBean
kernel
- - instance from local scopepublic void initialize()
Initializable
initialize
in interface Initializable
initialize
in class SeeOtherHost
public void beforeUnregister()
UnregisterAware
beforeUnregister
in interface UnregisterAware
protected void reloadRedirection()
Copyright © 2004–2019 "Tigase, Inc.". All rights reserved.