tigase.server.xmppclient
Class SeeOtherHostHashed
java.lang.Object
tigase.server.xmppclient.SeeOtherHost
tigase.server.xmppclient.SeeOtherHostHashed
- All Implemented Interfaces:
- SeeOtherHostIfc
- Direct Known Subclasses:
- SeeOtherHostDB
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
|
Method Summary |
tigase.xmpp.BareJID |
findHostForJID(tigase.xmpp.BareJID jid,
tigase.xmpp.BareJID host)
Finds an appropriate host for a given JID |
void |
setNodes(List<tigase.xmpp.BareJID> connectedNodes)
Sets list of available nodes in cluster environment |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
connectedNodes
protected List<tigase.xmpp.BareJID> connectedNodes
SeeOtherHostHashed
public SeeOtherHostHashed()
findHostForJID
public tigase.xmpp.BareJID findHostForJID(tigase.xmpp.BareJID jid,
tigase.xmpp.BareJID host)
- Description copied from interface:
SeeOtherHostIfc
- Finds an appropriate host for a given JID
- Specified by:
findHostForJID in interface SeeOtherHostIfc- Overrides:
findHostForJID in class SeeOtherHost
- 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
public void setNodes(List<tigase.xmpp.BareJID> connectedNodes)
- Description copied from interface:
SeeOtherHostIfc
- Sets list of available nodes in cluster environment
- Specified by:
setNodes in interface SeeOtherHostIfc- Overrides:
setNodes in class SeeOtherHost
- Parameters:
connectedNodes - current list of nodes
Copyright © 2013 Tigase. All rights reserved.