public abstract class AbstractStrategy extends Object implements StrategyIfc, tigase.muc.Room.RoomOccupantListener
| Modifier and Type | Field and Description |
|---|---|
protected tigase.cluster.api.ClusterControllerIfc |
cl_controller |
protected CopyOnWriteArrayList<tigase.xmpp.JID> |
connectedNodes |
protected tigase.xmpp.JID |
localNodeJid |
protected MUCComponentClustered |
muc |
protected InMemoryMucRepositoryClustered |
mucRepository |
protected static String |
REQUEST_SYNC_CMD |
| Constructor and Description |
|---|
AbstractStrategy() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract boolean |
addOccupant(tigase.xmpp.BareJID node,
tigase.xmpp.BareJID roomJid,
tigase.xmpp.JID occupantJid,
String nickname) |
protected void |
forwardPacketToNode(tigase.xmpp.JID nodeJid,
tigase.server.Packet packet) |
List<tigase.xmpp.JID> |
getAllNodes()
The method returns all cluster nodes currently connected to the cluster.
|
boolean |
nodeConnected(tigase.xmpp.JID nodeJid)
Method description
|
void |
nodeDisconnected(tigase.xmpp.JID nodeJid)
Method called when node was disconnected
|
void |
onOccupantAdded(tigase.muc.Room room,
tigase.xmpp.JID occupantJid) |
void |
onOccupantRemoved(tigase.muc.Room room,
tigase.xmpp.JID occupantJid) |
protected abstract boolean |
removeOccupant(tigase.xmpp.BareJID node,
tigase.xmpp.BareJID roomJid,
tigase.xmpp.JID occupantJid) |
protected void |
requestSync(tigase.xmpp.JID nodeJid) |
protected void |
sendRemoteOccupantRemovalOnDisconnect(tigase.muc.Room room,
tigase.xmpp.JID occupant,
String occupantNick,
boolean sendRemovalToOccupant) |
protected void |
sendRemovalFromRoomOnNodeDisconnect(tigase.xmpp.BareJID roomJid,
tigase.xmpp.JID occupant) |
void |
setClusterController(tigase.cluster.api.ClusterControllerIfc cl_controller)
Setter used to set instance of cluster controller
|
protected void |
setLocalNodeJid(tigase.xmpp.JID jid) |
void |
setMucComponentClustered(MUCComponentClustered mucComponent)
Setter used to pass instance of MUCComponentClustered
|
void |
setMucRepository(InMemoryMucRepositoryClustered mucRepository)
Setter to pass instance of InMemoryMucRepositoryClustered
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprocessPacket, start, stopprotected static final String REQUEST_SYNC_CMD
protected final CopyOnWriteArrayList<tigase.xmpp.JID> connectedNodes
protected tigase.cluster.api.ClusterControllerIfc cl_controller
protected tigase.xmpp.JID localNodeJid
protected MUCComponentClustered muc
protected InMemoryMucRepositoryClustered mucRepository
public List<tigase.xmpp.JID> getAllNodes()
StrategyIfcgetAllNodes in interface StrategyIfcpublic boolean nodeConnected(tigase.xmpp.JID nodeJid)
nodeConnected in interface StrategyIfcnodeJid - is a JIDpublic void nodeDisconnected(tigase.xmpp.JID nodeJid)
StrategyIfcnodeDisconnected in interface StrategyIfcpublic void onOccupantAdded(tigase.muc.Room room,
tigase.xmpp.JID occupantJid)
onOccupantAdded in interface tigase.muc.Room.RoomOccupantListenerpublic void onOccupantRemoved(tigase.muc.Room room,
tigase.xmpp.JID occupantJid)
onOccupantRemoved in interface tigase.muc.Room.RoomOccupantListenerprotected void sendRemoteOccupantRemovalOnDisconnect(tigase.muc.Room room,
tigase.xmpp.JID occupant,
String occupantNick,
boolean sendRemovalToOccupant)
protected void sendRemovalFromRoomOnNodeDisconnect(tigase.xmpp.BareJID roomJid,
tigase.xmpp.JID occupant)
public void setClusterController(tigase.cluster.api.ClusterControllerIfc cl_controller)
StrategyIfcsetClusterController in interface StrategyIfcpublic void setMucComponentClustered(MUCComponentClustered mucComponent)
StrategyIfcsetMucComponentClustered in interface StrategyIfcpublic void setMucRepository(InMemoryMucRepositoryClustered mucRepository)
StrategyIfcsetMucRepository in interface StrategyIfcprotected void forwardPacketToNode(tigase.xmpp.JID nodeJid,
tigase.server.Packet packet)
protected void setLocalNodeJid(tigase.xmpp.JID jid)
protected abstract boolean addOccupant(tigase.xmpp.BareJID node,
tigase.xmpp.BareJID roomJid,
tigase.xmpp.JID occupantJid,
String nickname)
protected abstract boolean removeOccupant(tigase.xmpp.BareJID node,
tigase.xmpp.BareJID roomJid,
tigase.xmpp.JID occupantJid)
protected void requestSync(tigase.xmpp.JID nodeJid)
Copyright © 2015 Tigase. All rights reserved.