public class IQBlockingHandler extends IQHandler implements ServerFeaturesProvider
| Modifier and Type | Field and Description |
|---|---|
static String |
NAMESPACE |
deliverer, sessionManager| Constructor and Description |
|---|
IQBlockingHandler() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addToBlockList(User user,
List<org.xmpp.packet.JID> toBlocks)
Adds a collection of JIDs to the blocklist of the provided user.
|
protected Set<org.xmpp.packet.JID> |
getBlocklist(User user)
Retrieves all of the JIDs that are on the blocklist of the provided user.
|
Iterator<String> |
getFeatures()
Returns an Iterator (of String) with the supported features by the server.
|
IQHandlerInfo |
getInfo()
Returns the handler information to help generically handle IQ packets.
|
org.xmpp.packet.IQ |
handleIQ(org.xmpp.packet.IQ iq)
Handles the received IQ packet.
|
protected void |
pushBlocklistUpdates(User user,
Collection<org.xmpp.packet.JID> newBlocks)
Sends an IQ-set with the newly blocked JIDs to all resources of the user that have requested the blocklist.
|
protected void |
pushBlocklistUpdates(User user,
List<org.xmpp.packet.JID> newBlocks)
Sends an IQ-set with the newly blocked JIDs to all resources of the user that have requested the blocklist.
|
protected Set<org.xmpp.packet.JID> |
removeFromBlockList(User user,
Collection<org.xmpp.packet.JID> toUnblocks)
Removes a collection of JIDs from the blocklist of the provided user.
|
initialize, processdestroy, getName, start, stoppublic static final String NAMESPACE
public IQHandlerInfo getInfo()
IQHandlernull.public Iterator<String> getFeatures()
ServerFeaturesProvidergetFeatures in interface ServerFeaturesProviderpublic org.xmpp.packet.IQ handleIQ(org.xmpp.packet.IQ iq)
throws UnauthorizedException
IQHandlerhandleIQ in class IQHandleriq - the IQ packet to handle.UnauthorizedException - if the user that sent the packet is not
authorized to request the given operation.protected Set<org.xmpp.packet.JID> getBlocklist(User user)
user - The use for which to retrieve the blocklist (cannot be null).protected void addToBlockList(User user, List<org.xmpp.packet.JID> toBlocks)
user - The owner of the blocklist to which JIDs are to be added (cannot be null).toBlocks - The JIDs to be added (can be null, which results in a noop).protected void pushBlocklistUpdates(User user, List<org.xmpp.packet.JID> newBlocks)
user - The for which updates are to be broadcasted (cannot be null).newBlocks - The JIDs for which an update needs to be sent (cannot be null, can be empty).protected Set<org.xmpp.packet.JID> removeFromBlockList(User user, Collection<org.xmpp.packet.JID> toUnblocks)
user - The owner of the blocklist to which JIDs are to be added (cannot be null).toUnblocks - The JIDs to be removed (can be null, which results in a noop).protected void pushBlocklistUpdates(User user, Collection<org.xmpp.packet.JID> newBlocks)
user - The for which updates are to be broadcasted (cannot be null).newBlocks - The JIDs for which an update needs to be sent (cannot be null, can be empty).Copyright © 2003–2020 Ignite Realtime. All rights reserved.