public class MultiUserChatLight extends Object
Modifier and Type | Field and Description |
---|---|
static String |
AFFILIATIONS |
static String |
BLOCKING |
static String |
CONFIGURATION |
static String |
CREATE |
static String |
DESTROY |
static String |
INFO |
static String |
NAMESPACE |
Modifier and Type | Method and Description |
---|---|
boolean |
addMessageListener(MessageListener listener)
Adds a stanza listener that will be notified of any new messages
in the group chat.
|
void |
changeAffiliations(HashMap<org.jxmpp.jid.Jid,MUCLightAffiliation> affiliations)
Change the MUC Light affiliations.
|
void |
changeRoomName(String roomName)
Change the name of the room.
|
void |
changeSubject(String subject)
Change the subject of the MUC Light.
|
void |
create(String roomName,
List<org.jxmpp.jid.Jid> occupants)
Create new MUCLight.
|
void |
create(String roomName,
String subject,
HashMap<String,String> customConfigs,
List<org.jxmpp.jid.Jid> occupants)
Create new MUCLight.
|
Message |
createMessage()
Creates a new Message to send to the chat room.
|
Chat |
createPrivateChat(org.jxmpp.jid.EntityJid occupant,
ChatMessageListener listener)
Deprecated.
|
void |
destroy()
Destroy the MUC Light.
|
HashMap<org.jxmpp.jid.Jid,MUCLightAffiliation> |
getAffiliations()
Get the MUC Light affiliations.
|
HashMap<org.jxmpp.jid.Jid,MUCLightAffiliation> |
getAffiliations(String version)
Get the MUC Light affiliations.
|
MUCLightRoomConfiguration |
getConfiguration()
Get the MUC Light configuration.
|
MUCLightRoomConfiguration |
getConfiguration(String version)
Get the MUC Light configuration.
|
MUCLightRoomInfo |
getFullInfo()
Get the MUC Light info.
|
MUCLightRoomInfo |
getFullInfo(String version)
Get the MUC Light info.
|
org.jxmpp.jid.EntityJid |
getRoom()
Returns the JID of the room.
|
void |
leave()
Leave the MUCLight.
|
Message |
nextMessage()
Returns the next available message in the chat.
|
Message |
nextMessage(long timeout)
Returns the next available message in the chat.
|
Message |
pollMessage()
Polls for and returns the next message.
|
boolean |
removeMessageListener(MessageListener listener)
Removes a stanza listener that was being notified of any new
messages in the MUCLight.
|
void |
sendMessage(Message message)
Sends a Message to the chat room.
|
void |
sendMessage(String text)
Sends a message to the chat room.
|
void |
setRoomConfigs(HashMap<String,String> customConfigs)
Set the room configurations.
|
void |
setRoomConfigs(String roomName,
HashMap<String,String> customConfigs)
Set the room configurations.
|
String |
toString() |
public static final String NAMESPACE
public static final String AFFILIATIONS
public static final String INFO
public static final String CONFIGURATION
public static final String CREATE
public static final String DESTROY
public static final String BLOCKING
public org.jxmpp.jid.EntityJid getRoom()
public void sendMessage(String text) throws SmackException.NotConnectedException, InterruptedException
text
- the text of the message to send.SmackException.NotConnectedException
InterruptedException
@Deprecated public Chat createPrivateChat(org.jxmpp.jid.EntityJid occupant, ChatMessageListener listener)
occupant
- occupant unique room JID (e.g.
'darkcave@macbeth.shakespeare.lit/Paul').listener
- the listener is a message listener that will handle messages
for the newly created chat.public Message createMessage()
public void sendMessage(Message message) throws SmackException.NotConnectedException, InterruptedException
message
- the message.SmackException.NotConnectedException
InterruptedException
public Message pollMessage()
public Message nextMessage() throws InterruptedException
InterruptedException
public Message nextMessage(long timeout) throws InterruptedException
timeout
- the maximum amount of time to wait for the next message.InterruptedException
public boolean addMessageListener(MessageListener listener)
listener
- a stanza listener.public boolean removeMessageListener(MessageListener listener)
listener
- a stanza listener.public void create(String roomName, String subject, HashMap<String,String> customConfigs, List<org.jxmpp.jid.Jid> occupants) throws Exception
roomName
- subject
- customConfigs
- occupants
- Exception
public void create(String roomName, List<org.jxmpp.jid.Jid> occupants) throws Exception
roomName
- occupants
- Exception
public void leave() throws SmackException.NotConnectedException, InterruptedException, SmackException.NoResponseException, XMPPException.XMPPErrorException
public MUCLightRoomInfo getFullInfo(String version) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException
version
- SmackException.NoResponseException
XMPPException.XMPPErrorException
SmackException.NotConnectedException
InterruptedException
public MUCLightRoomInfo getFullInfo() throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException
SmackException.NoResponseException
XMPPException.XMPPErrorException
SmackException.NotConnectedException
InterruptedException
public MUCLightRoomConfiguration getConfiguration(String version) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException
version
- SmackException.NoResponseException
XMPPException.XMPPErrorException
SmackException.NotConnectedException
InterruptedException
public MUCLightRoomConfiguration getConfiguration() throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException
SmackException.NoResponseException
XMPPException.XMPPErrorException
SmackException.NotConnectedException
InterruptedException
public HashMap<org.jxmpp.jid.Jid,MUCLightAffiliation> getAffiliations(String version) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException
version
- SmackException.NoResponseException
XMPPException.XMPPErrorException
SmackException.NotConnectedException
InterruptedException
public HashMap<org.jxmpp.jid.Jid,MUCLightAffiliation> getAffiliations() throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException
SmackException.NoResponseException
XMPPException.XMPPErrorException
SmackException.NotConnectedException
InterruptedException
public void changeAffiliations(HashMap<org.jxmpp.jid.Jid,MUCLightAffiliation> affiliations) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException
affiliations
- SmackException.NoResponseException
XMPPException.XMPPErrorException
SmackException.NotConnectedException
InterruptedException
public void destroy() throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException
public void changeSubject(String subject) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException
subject
- SmackException.NoResponseException
XMPPException.XMPPErrorException
SmackException.NotConnectedException
InterruptedException
public void changeRoomName(String roomName) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException
roomName
- SmackException.NoResponseException
XMPPException.XMPPErrorException
SmackException.NotConnectedException
InterruptedException
public void setRoomConfigs(HashMap<String,String> customConfigs) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException
customConfigs
- SmackException.NoResponseException
XMPPException.XMPPErrorException
SmackException.NotConnectedException
InterruptedException
public void setRoomConfigs(String roomName, HashMap<String,String> customConfigs) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException
roomName
- customConfigs
- SmackException.NoResponseException
XMPPException.XMPPErrorException
SmackException.NotConnectedException
InterruptedException