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 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> |
getNodesConnected()
The method returns cluster nodes currently connected to the cluster node.
|
List<tigase.xmpp.JID> |
getNodesConnectedWithLocal()
The method returns cluster nodes currently connected to the cluster
including jid of this cluster node.
|
void |
nodeConnected(tigase.xmpp.JID nodeJid)
Method description
|
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, waitnodeDisconnected, processPacket, start, stopprotected static final String REQUEST_SYNC_CMD
protected tigase.cluster.api.ClusterControllerIfc cl_controller
protected tigase.xmpp.JID localNodeJid
protected MUCComponentClustered muc
protected InMemoryMucRepositoryClustered mucRepository
public List<tigase.xmpp.JID> getNodesConnected()
StrategyIfcgetNodesConnected in interface StrategyIfcpublic List<tigase.xmpp.JID> getNodesConnectedWithLocal()
StrategyIfcgetNodesConnectedWithLocal in interface StrategyIfcpublic void nodeConnected(tigase.xmpp.JID nodeJid)
nodeConnected in interface StrategyIfcnodeJid - is a JIDpublic 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 © 2017 Tigase. All rights reserved.