Openfire 3.5.0 Javadoc

org.xmpp.muc
Class Invitation

java.lang.Object
  extended by org.xmpp.packet.Packet
      extended by org.xmpp.packet.Message
          extended by org.xmpp.muc.Invitation

public class Invitation
extends Message

Represents an invitation to a Multi-User Chat room from a room occupant to a user that is not an occupant of the room. The invitation must be sent to the room and it's the room responsibility to forward the invitation to the invitee. The sender of the invitation must be the real full JID of the inviter.

Code example:

 // Invite the someone to the room.
 Invitation invitation = new Invitation("invitee@jabber.org", "Join this excellent room");
 invitation.setTo("room@conference.jabber.org");
 invitation.setFrom("inviter@jabber.org/notebook");

 component.sendPacket(invitation);
 

Author:
Gaston Dombiak

Nested Class Summary
 
Nested classes/interfaces inherited from class org.xmpp.packet.Message
Message.Type
 
Field Summary
 
Fields inherited from class org.xmpp.packet.Packet
docFactory, element, fromJID, toJID
 
Constructor Summary
Invitation(String invitee, String reason)
          Creates a new invitation.
 
Method Summary
 
Methods inherited from class org.xmpp.packet.Message
addChildElement, createCopy, getBody, getChildElement, getSubject, getThread, getType, setBody, setSubject, setThread, setType
 
Methods inherited from class org.xmpp.packet.Packet
addExtension, deleteExtension, getElement, getError, getExtension, getFrom, getID, getTo, setError, setError, setFrom, setFrom, setID, setTo, setTo, toString, toXML
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Invitation

public Invitation(String invitee,
                  String reason)
Creates a new invitation.

Parameters:
invitee - the XMPP address of the invitee. The room will forward the invitation to this address.
reason - the reason why the invitation is being sent.

Openfire 3.5.0 Javadoc

Copyright © 2003-2007 Jive Software.