Package tigase.server.xmppclient
Class SeeOtherHostDB
- java.lang.Object
-
- tigase.server.xmppclient.SeeOtherHost
-
- tigase.server.xmppclient.SeeOtherHostHashed
-
- tigase.server.xmppclient.SeeOtherHostDB
-
- All Implemented Interfaces:
Initializable
,RegistrarBean
,Lifecycle
,SeeOtherHostIfc
public class SeeOtherHostDB extends SeeOtherHostHashed implements RegistrarBean
Extended implementation of SeeOtherHost using redirect information from database
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SeeOtherHostDB.JDBCSeeOtherHostRepository
static class
SeeOtherHostDB.SeeOtherHostDBSDRepositoryBean
static interface
SeeOtherHostDB.SeeOtherHostRepository<DS extends DataSource>
-
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 Modifier and Type Field Description static java.lang.String
DB_GET_ALL_DATA_DB_QUERY_KEY
static java.lang.String
GET_ALL_QUERY_TIMEOUT_QUERY_KEY
static java.lang.String
NODE_ID
static java.lang.String
SEE_OTHER_HOST_DB_QUERY_KEY
static java.lang.String
SEE_OTHER_HOST_DB_URL_KEY
static java.lang.String
SEE_OTHER_HOST_TABLE
static java.lang.String
SERIAL_ID
static java.lang.String
USER_ID
-
Fields inherited from class tigase.server.xmppclient.SeeOtherHostHashed
connectedNodes
-
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
Constructors Constructor Description SeeOtherHostDB()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BareJID
findHostForJID(BareJID jid, BareJID host)
Finds an appropriate host for a given JIDvoid
register(Kernel kernel)
Method called when bean is being registered allowing developer to programatically register other beans.void
unregister(Kernel kernel)
Method called while bean is being unregistered.-
Methods inherited from class tigase.server.xmppclient.SeeOtherHostHashed
nodeShutdown, setNodes
-
Methods 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 Detail
-
SEE_OTHER_HOST_TABLE
public static final java.lang.String SEE_OTHER_HOST_TABLE
- See Also:
- Constant Field Values
-
SEE_OTHER_HOST_DB_URL_KEY
public static final java.lang.String SEE_OTHER_HOST_DB_URL_KEY
- See Also:
- Constant Field Values
-
SEE_OTHER_HOST_DB_QUERY_KEY
public static final java.lang.String SEE_OTHER_HOST_DB_QUERY_KEY
- See Also:
- Constant Field Values
-
DB_GET_ALL_DATA_DB_QUERY_KEY
public static final java.lang.String DB_GET_ALL_DATA_DB_QUERY_KEY
- See Also:
- Constant Field Values
-
GET_ALL_QUERY_TIMEOUT_QUERY_KEY
public static final java.lang.String GET_ALL_QUERY_TIMEOUT_QUERY_KEY
- See Also:
- Constant Field Values
-
SERIAL_ID
public static final java.lang.String SERIAL_ID
- See Also:
- Constant Field Values
-
USER_ID
public static final java.lang.String USER_ID
- See Also:
- Constant Field Values
-
NODE_ID
public static final java.lang.String NODE_ID
- See Also:
- Constant Field Values
-
-
Method Detail
-
findHostForJID
public BareJID findHostForJID(BareJID jid, BareJID host)
Description copied from interface:SeeOtherHostIfc
Finds an appropriate host for a given JID- Specified by:
findHostForJID
in interfaceSeeOtherHostIfc
- Overrides:
findHostForJID
in classSeeOtherHostHashed
- 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
-
register
public void register(Kernel kernel)
Description copied from interface:RegistrarBean
Method called when bean is being registered allowing developer to programatically register other beans.- Specified by:
register
in interfaceRegistrarBean
- Parameters:
kernel
- - instance from local scope
-
unregister
public void unregister(Kernel kernel)
Description copied from interface:RegistrarBean
Method called while bean is being unregistered.- Specified by:
unregister
in interfaceRegistrarBean
- Parameters:
kernel
- - instance from local scope
-
-