@Bean(name="test-spam-module", parent=TestComponent.class, active=true) public class TestSpamModule extends AbstractModule
Modifier and Type | Field and Description |
---|---|
protected String[] |
badWords
This might be changed in one threads while it is iterated in processPacket(...) in another thread.
|
protected String[] |
whiteList |
eventBus, writer
EMPTY_FEATURES
Constructor and Description |
---|
TestSpamModule() |
Modifier and Type | Method and Description |
---|---|
void |
everyMinute() |
long |
getMessagesCounter() |
Criteria |
getModuleCriteria()
Returns critera used by Component to select module to handle incoming stanza.
|
long |
getTotalSpamCounter() |
void |
initBindings(Bindings binds) |
void |
process(Packet packet)
Process incoming stanza.
|
void |
setPacketTypes(String[] packetTypes) |
fireEvent, getEventBus, getWriter, setEventBus, setWriter, write, write
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
canHandle, getFeatures
@ConfigField(desc="Bad words", alias="bad-words") protected String[] badWords
@ConfigField(desc="White listed addresses", alias="white-list") protected String[] whiteList
public void everyMinute()
public Criteria getModuleCriteria()
Module
public void process(Packet packet) throws ComponentException, TigaseStringprepException
Module
packet
- received stanza
.ComponentException
- if stanza can't be processed correctly. ComponentException is converted to error
stanza and returned to stanza sender.TigaseStringprepException
- if there was an error during stringprep processing.public long getMessagesCounter()
public long getTotalSpamCounter()
public void setPacketTypes(String[] packetTypes)
public void initBindings(Bindings binds)
Copyright © 2004–2021 "Tigase, Inc.". All rights reserved.