public class DefaultStrategy extends Object implements StrategyIfc, tigase.muc.Room.RoomOccupantListener, InMemoryMucRepositoryClustered.RoomListener
| Constructor and Description |
|---|
DefaultStrategy() |
| Modifier and Type | Method and Description |
|---|---|
List<tigase.xmpp.JID> |
getAllNodes()
The method returns all cluster nodes currently connected to the cluster.
|
tigase.xmpp.JID |
getNodeForRoom(tigase.xmpp.BareJID roomJid)
Retrieve JID of node which is hosting this room
|
void |
nodeConnected(tigase.xmpp.JID nodeJid)
Method description
|
void |
nodeDisconnected(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) |
void |
onRoomCreated(tigase.muc.Room room) |
void |
onRoomDestroyed(tigase.muc.Room room) |
boolean |
processPacket(tigase.server.Packet packet)
Method called when packet is received by component to preprocess packet
before/instead of passing it back to non clustered component
|
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
|
void |
start()
Method called when component is started
|
void |
stop()
Method called when component is stopped
|
public List<tigase.xmpp.JID> getAllNodes()
StrategyIfcgetAllNodes in interface StrategyIfcpublic void nodeConnected(tigase.xmpp.JID nodeJid)
nodeConnected in interface StrategyIfcnodeJid - is a JIDpublic void nodeDisconnected(tigase.xmpp.JID nodeJid)
nodeDisconnected in interface StrategyIfcnodeJid - is a JIDpublic void setClusterController(tigase.cluster.api.ClusterControllerIfc cl_controller)
StrategyIfcsetClusterController in interface StrategyIfcpublic void setMucComponentClustered(MUCComponentClustered mucComponent)
StrategyIfcsetMucComponentClustered in interface StrategyIfcpublic boolean processPacket(tigase.server.Packet packet)
StrategyIfcprocessPacket in interface StrategyIfcpublic tigase.xmpp.JID getNodeForRoom(tigase.xmpp.BareJID roomJid)
StrategyIfcgetNodeForRoom in interface StrategyIfcpublic void setMucRepository(InMemoryMucRepositoryClustered mucRepository)
StrategyIfcsetMucRepository in interface StrategyIfcpublic void start()
StrategyIfcstart in interface StrategyIfcpublic void stop()
StrategyIfcstop in interface StrategyIfcprotected void setLocalNodeJid(tigase.xmpp.JID jid)
public void onRoomCreated(tigase.muc.Room room)
onRoomCreated in interface InMemoryMucRepositoryClustered.RoomListenerpublic void onRoomDestroyed(tigase.muc.Room room)
onRoomDestroyed in interface InMemoryMucRepositoryClustered.RoomListenerpublic 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.RoomOccupantListenerCopyright © 2014 Tigase. All rights reserved.