public class FMUCHandler extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
FMUCHandler.InboundJoin |
static class |
FMUCHandler.OutboundJoin |
static class |
FMUCHandler.OutboundJoinConfiguration |
static class |
FMUCHandler.OutboundJoinProgress |
| Modifier and Type | Field and Description |
|---|---|
static org.dom4j.QName |
FMUC
Qualified name of the element that denotes FMUC functionality, as specified by XEP-0289.
|
static SystemProperty<Boolean> |
FMUC_ENABLED |
| Constructor and Description |
|---|
FMUCHandler(LocalMUCRoom chatroom,
PacketRouter packetRouter) |
| Modifier and Type | Method and Description |
|---|---|
void |
abortOutboundJoinProgress() |
static <S extends org.xmpp.packet.Packet> |
createCopyWithoutFMUC(S stanza)
Removes FMUC child elements from the stanza, if such an element exists.
|
static org.xmpp.packet.JID |
getFMUCFromJID(org.xmpp.packet.Packet stanza)
Parses the JID from an FMUC stanza.
|
Collection<FMUCHandler.InboundJoin> |
getInboundJoins() |
FMUCHandler.OutboundJoin |
getOutboundJoin() |
FMUCHandler.OutboundJoinConfiguration |
getOutboundJoinConfiguration() |
FMUCHandler.OutboundJoinProgress |
getOutboundJoinProgress() |
boolean |
isFmucEnabled() |
static boolean |
isFMUCJoinRequest(org.xmpp.packet.Packet stanza) |
static boolean |
isFMUCReject(org.xmpp.packet.Packet stanza) |
static boolean |
isSubject(org.xmpp.packet.Packet stanza) |
Future<?> |
join(MUCRole mucRole)
Makes a user in our XMPP domain join the FMUC room.
|
protected Future<?> |
join(MUCRole mucRole,
boolean includeInbound,
boolean includeOutbound) |
void |
process(org.xmpp.packet.Packet stanza) |
CompletableFuture<?> |
propagate(org.xmpp.packet.Packet stanza,
MUCRole sender)
Propagates a stanza to the FMUC set, if FMUC is active for this room.
|
void |
setFmucEnabled(boolean fmucEnabled) |
void |
setOutboundJoinConfiguration(FMUCHandler.OutboundJoinConfiguration config) |
void |
startOutbound()
Starts federation, which will cause a federation attempt with the outbound ('joined') node, if one is configured,
and there currently are occupants in the room.
|
void |
stop()
Stops federation, which will cause any joined and joining nodes to be disconnected.
|
void |
stopInbound()
Stops inbound federation, which will cause existing federation with all of the inbound ('joining') nodes, if any
are established, to be teared down.
|
void |
stopInbound(org.xmpp.packet.JID peer)
Stops inbound federation, which will cause existing federation with one specific inbound ('joining') nodes to be
teared down.
|
void |
stopOutbound()
Stops outbound federation, which will cause existing federation with the outbound ('joined') node, if one is
established, to be teared down.
|
public static final SystemProperty<Boolean> FMUC_ENABLED
public static final org.dom4j.QName FMUC
public FMUCHandler(@Nonnull LocalMUCRoom chatroom, @Nonnull PacketRouter packetRouter)
public void startOutbound()
public void stop()
public void stopInbound()
public void stopInbound(@Nonnull org.xmpp.packet.JID peer)
peer - the address of the remote node (must be a bare JID).public void stopOutbound()
public void setFmucEnabled(boolean fmucEnabled)
public boolean isFmucEnabled()
public void setOutboundJoinConfiguration(@Nullable FMUCHandler.OutboundJoinConfiguration config)
public FMUCHandler.OutboundJoinConfiguration getOutboundJoinConfiguration()
public CompletableFuture<?> propagate(@Nonnull org.xmpp.packet.Packet stanza, @Nonnull MUCRole sender)
stanza - the stanza to be propagated through FMUC.sender - the role of the sender that is the original author of the stanza.public Future<?> join(@Nonnull MUCRole mucRole)
mucRole - The role in which the user is joining the room.protected Future<?> join(@Nonnull MUCRole mucRole, boolean includeInbound, boolean includeOutbound)
public static <S extends org.xmpp.packet.Packet> S createCopyWithoutFMUC(S stanza)
enrichWithFMUCElement(Packet, MUCRole).S - Type of stanzastanza - The stanza from which an FMUC child element is to be removed.public void process(@Nonnull org.xmpp.packet.Packet stanza)
public static org.xmpp.packet.JID getFMUCFromJID(@Nonnull org.xmpp.packet.Packet stanza)
stanza - An FMUC stanzaRuntimeException - when no valid JID value is found in the 'from' attribute of the FMUC child element.public static boolean isSubject(@Nonnull org.xmpp.packet.Packet stanza)
public static boolean isFMUCReject(@Nonnull org.xmpp.packet.Packet stanza)
public static boolean isFMUCJoinRequest(@Nonnull org.xmpp.packet.Packet stanza)
public FMUCHandler.OutboundJoin getOutboundJoin()
public FMUCHandler.OutboundJoinProgress getOutboundJoinProgress()
public Collection<FMUCHandler.InboundJoin> getInboundJoins()
public void abortOutboundJoinProgress()
Copyright © 2003–2020 Ignite Realtime. All rights reserved.