public class MultiUserChatLight extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
AFFILIATIONS |
static java.lang.String |
BLOCKING |
static java.lang.String |
CONFIGURATION |
static java.lang.String |
CREATE |
static java.lang.String |
DESTROY |
static java.lang.String |
INFO |
static java.lang.String |
NAMESPACE |
Modifier and Type | Method and Description |
---|---|
boolean |
addMessageListener(MessageListener listener)
Adds a stanza(/packet) listener that will be notified of any new messages
in the group chat.
|
void |
changeAffiliations(java.util.HashMap<Jid,MUCLightAffiliation> affiliations)
Change the MUC Light affiliations.
|
void |
changeRoomName(java.lang.String roomName)
Change the name of the room.
|
void |
changeSubject(java.lang.String subject)
Change the subject of the MUC Light.
|
void |
create(java.lang.String roomName,
java.util.List<Jid> occupants)
Create new MUCLight.
|
void |
create(java.lang.String roomName,
java.lang.String subject,
java.util.HashMap<java.lang.String,java.lang.String> customConfigs,
java.util.List<Jid> occupants)
Create new MUCLight.
|
Message |
createMessage()
Creates a new Message to send to the chat room.
|
Chat |
createPrivateChat(EntityJid occupant,
ChatMessageListener listener)
Deprecated.
|
void |
destroy()
Destroy the MUC Light.
|
java.util.HashMap<Jid,MUCLightAffiliation> |
getAffiliations()
Get the MUC Light affiliations.
|
java.util.HashMap<Jid,MUCLightAffiliation> |
getAffiliations(java.lang.String version)
Get the MUC Light affiliations.
|
MUCLightRoomConfiguration |
getConfiguration()
Get the MUC Light configuration.
|
MUCLightRoomConfiguration |
getConfiguration(java.lang.String version)
Get the MUC Light configuration.
|
MUCLightRoomInfo |
getFullInfo()
Get the MUC Light info.
|
MUCLightRoomInfo |
getFullInfo(java.lang.String version)
Get the MUC Light info.
|
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(/packet) 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(java.lang.String text)
Sends a message to the chat room.
|
void |
setRoomConfigs(java.util.HashMap<java.lang.String,java.lang.String> customConfigs)
Set the room configurations.
|
void |
setRoomConfigs(java.lang.String roomName,
java.util.HashMap<java.lang.String,java.lang.String> customConfigs)
Set the room configurations.
|
java.lang.String |
toString() |
public static final java.lang.String NAMESPACE
public static final java.lang.String AFFILIATIONS
public static final java.lang.String INFO
public static final java.lang.String CONFIGURATION
public static final java.lang.String CREATE
public static final java.lang.String DESTROY
public static final java.lang.String BLOCKING
public void sendMessage(java.lang.String text) throws SmackException.NotConnectedException, java.lang.InterruptedException
text
- the text of the message to send.SmackException.NotConnectedException
java.lang.InterruptedException
@Deprecated public Chat createPrivateChat(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, java.lang.InterruptedException
message
- the message.SmackException.NotConnectedException
java.lang.InterruptedException
public Message pollMessage()
public Message nextMessage() throws java.lang.InterruptedException
java.lang.InterruptedException
public Message nextMessage(long timeout) throws java.lang.InterruptedException
timeout
- the maximum amount of time to wait for the next message.java.lang.InterruptedException
public boolean addMessageListener(MessageListener listener)
listener
- a stanza(/packet) listener.public boolean removeMessageListener(MessageListener listener)
listener
- a stanza(/packet) listener.public java.lang.String toString()
toString
in class java.lang.Object
public void create(java.lang.String roomName, java.lang.String subject, java.util.HashMap<java.lang.String,java.lang.String> customConfigs, java.util.List<Jid> occupants) throws java.lang.Exception
roomName
- subject
- customConfigs
- occupants
- java.lang.Exception
public void create(java.lang.String roomName, java.util.List<Jid> occupants) throws java.lang.Exception
roomName
- occupants
- java.lang.Exception
public void leave() throws SmackException.NotConnectedException, java.lang.InterruptedException, SmackException.NoResponseException, XMPPException.XMPPErrorException
SmackException.NotConnectedException
java.lang.InterruptedException
SmackException.NoResponseException
XMPPException.XMPPErrorException
public MUCLightRoomInfo getFullInfo(java.lang.String version) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, java.lang.InterruptedException
version
- SmackException.NoResponseException
XMPPException.XMPPErrorException
SmackException.NotConnectedException
java.lang.InterruptedException
public MUCLightRoomInfo getFullInfo() throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, java.lang.InterruptedException
SmackException.NoResponseException
XMPPException.XMPPErrorException
SmackException.NotConnectedException
java.lang.InterruptedException
public MUCLightRoomConfiguration getConfiguration(java.lang.String version) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, java.lang.InterruptedException
version
- SmackException.NoResponseException
XMPPException.XMPPErrorException
SmackException.NotConnectedException
java.lang.InterruptedException
public MUCLightRoomConfiguration getConfiguration() throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, java.lang.InterruptedException
SmackException.NoResponseException
XMPPException.XMPPErrorException
SmackException.NotConnectedException
java.lang.InterruptedException
public java.util.HashMap<Jid,MUCLightAffiliation> getAffiliations(java.lang.String version) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, java.lang.InterruptedException
version
- SmackException.NoResponseException
XMPPException.XMPPErrorException
SmackException.NotConnectedException
java.lang.InterruptedException
public java.util.HashMap<Jid,MUCLightAffiliation> getAffiliations() throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, java.lang.InterruptedException
SmackException.NoResponseException
XMPPException.XMPPErrorException
SmackException.NotConnectedException
java.lang.InterruptedException
public void changeAffiliations(java.util.HashMap<Jid,MUCLightAffiliation> affiliations) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, java.lang.InterruptedException
affiliations
- SmackException.NoResponseException
XMPPException.XMPPErrorException
SmackException.NotConnectedException
java.lang.InterruptedException
public void destroy() throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, java.lang.InterruptedException
SmackException.NoResponseException
XMPPException.XMPPErrorException
SmackException.NotConnectedException
java.lang.InterruptedException
public void changeSubject(java.lang.String subject) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, java.lang.InterruptedException
subject
- SmackException.NoResponseException
XMPPException.XMPPErrorException
SmackException.NotConnectedException
java.lang.InterruptedException
public void changeRoomName(java.lang.String roomName) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, java.lang.InterruptedException
roomName
- SmackException.NoResponseException
XMPPException.XMPPErrorException
SmackException.NotConnectedException
java.lang.InterruptedException
public void setRoomConfigs(java.util.HashMap<java.lang.String,java.lang.String> customConfigs) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, java.lang.InterruptedException
customConfigs
- SmackException.NoResponseException
XMPPException.XMPPErrorException
SmackException.NotConnectedException
java.lang.InterruptedException
public void setRoomConfigs(java.lang.String roomName, java.util.HashMap<java.lang.String,java.lang.String> customConfigs) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, java.lang.InterruptedException
roomName
- customConfigs
- SmackException.NoResponseException
XMPPException.XMPPErrorException
SmackException.NotConnectedException
java.lang.InterruptedException