-
Notifications
You must be signed in to change notification settings - Fork 885
MUC API Redesign
This is the discussion for SMAC-648, meant for improving the MUC API.
- When should a method throw, when should it decay to a NOOP instead?
- Add MucAlreadyJoinedException and MucNotJoinedException
- Should leave() be a NOOP if !joined? Wouldn't it be better if it would send the leave presence and perform the state changes no matter what?
- How to restore consistent state if MUC got desynced?
- Should we make it possible to join() with a non-default Presence (i.e. away/xa)?
join() works by sending a Presence to the MUC JID. If the MUC does not exist/is down, this presence will never be responded to. If the MUC does exist, the time to response varies depending on S2S, the MUC size and the laggyness of the (mobile) client connection.
We could query the MUC JID using disco#info before joining, so that we can determine if it is a MUC and if the server does respond. After that, we could significantly increase the timeout or make the join handler completely asynchronous.
MucEnterConfiguration
MucEnterConfiguration.Builder builder
builder.setNickname(Resourcepart)
builder.setTimeout(long)
builder.setPassword(String)
builder.setDiscussionHistory(DiscussionHistory)
builder.noHistory()
builder.setPresence(Presence)