Package org.jivesoftware.openfire.muc
Class MUCEventDelegate
java.lang.Object
org.jivesoftware.openfire.muc.MUCEventDelegate
Gives the implementer the ability to react to, allow, or deny MUC related events.
For example:
- Event: a user tries to join a room
Reaction: the delegate decides to allow or deny the user from joining
- Author:
- Armando Jagucki
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enum -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract booleandestroyingRoom(String roomName, org.xmpp.packet.JID userjid) This event will be triggered when an entity attempts to destroy a room.getRoomConfig(String roomName) Returns a map containing room configuration variables and values.abstract booleanjoiningRoom(MUCRoom room, org.xmpp.packet.JID userjid) This event will be triggered when an entity joins an existing room.booleanloadConfig(MUCRoom room) Loads a delegate provided room configuration for the room specified.abstract MUCEventDelegate.InvitationResultsendingInvitation(MUCRoom room, org.xmpp.packet.JID inviteeJID, org.xmpp.packet.JID inviterJID, String inviteMessage) This event will be triggered when an entity attempts to invite someone to a room.sendingInvitationRejection(MUCRoom room, org.xmpp.packet.JID to, org.xmpp.packet.JID from, String reason) This event will be triggered when an entity reject invite from someone to a room.abstract booleanshouldRecreate(String roomName, org.xmpp.packet.JID userjid) Returns true if the room that is not present in the server should have existed and needs to be recreated.
-
Constructor Details
-
MUCEventDelegate
public MUCEventDelegate()
-
-
Method Details
-
joiningRoom
This event will be triggered when an entity joins an existing room. Returns true if the user is allowed to join the room.- Parameters:
room- the MUC room.userjid- the JID of the user attempting to join the room.- Returns:
- true if the user is allowed to join the room.
-
sendingInvitation
public abstract MUCEventDelegate.InvitationResult sendingInvitation(MUCRoom room, org.xmpp.packet.JID inviteeJID, org.xmpp.packet.JID inviterJID, String inviteMessage) This event will be triggered when an entity attempts to invite someone to a room. Returns a String indicating whether the invitation should be abandoned, handled by the delegate, or handled by openfire.- Parameters:
room- the MUC room.inviteeJID- the JID of the user the invitation will be sent to.inviterJID- the JID of the user that is sending the invitationinviteMessage- the (optional) message that is sent explaining the invitation- Returns:
- true if the user is allowed to join the room.
-
sendingInvitationRejection
public abstract MUCEventDelegate.InvitationRejectionResult sendingInvitationRejection(MUCRoom room, org.xmpp.packet.JID to, org.xmpp.packet.JID from, String reason) This event will be triggered when an entity reject invite from someone to a room. Returns a String indicating whether the invitation should be abandoned, handled by the delegate, or handled by openfire.- Parameters:
room- the MUC room.to- the JID of the user the rejecting of invitation will be sent to.from- the JID of the user that is sending the rejecting of invitationreason- the (optional) message that is sent explaining the rejection invitation- Returns:
- true if the user is allowed to join the room.
-
getRoomConfig
Returns a map containing room configuration variables and values.- Parameters:
roomName- the name of the room the configuration map is associated with.- Returns:
- a map containing room configuration variables and values, or null if roomName was not valid.
-
destroyingRoom
This event will be triggered when an entity attempts to destroy a room. Returns true if the user is allowed to destroy the room.- Parameters:
roomName- the name of the MUC room being destroyed.userjid- the JID of the user attempting to destroy the room.- Returns:
- true if the user is allowed to destroy the room.
-
shouldRecreate
Returns true if the room that is not present in the server should have existed and needs to be recreated.- Parameters:
roomName- name of the room.userjid- JID Of the user trying to join/create the room.- Returns:
- true if the room that is not present in the server should have existed and needs to be recreated.
-
loadConfig
Loads a delegate provided room configuration for the room specified.- Parameters:
room- the room to load the configuration for.- Returns:
- true if the room configuration was received from the delegate and applied to the room.
-