Package tigase.component.modules
Interface Module
- All Known Implementing Classes:
AbstractEventBusModule,AbstractModule,AdHocCommandModule,AdHocCommandMonitorModule,DiscoveryModule,DiscoveryMonitorModule,EventbusDiscoveryModule,EventPublisherModule,EventReceiverModule,ExternalServiceDiscoveryModule,GetFormModule,JabberVersionModule,QueryModule,RTBLEventModule,RTBLFetchModule,RTBLIqModule,RTBLSubscribeModule,SubscribeModule,TestGeneratorModule,TestSpamModule,UnsubscribeModule,XmppPingModule
public interface Module
Basic interface to implement component module. Single module should implement fragment of component logic. Is easy to
add or remove in component (Server) configuration.
- Author:
- bmalkow
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault booleanReturns true if Packet can be procesed by module.default String[]Returns XMPP features offered by module.Returns critera used by Component to select module to handle incoming stanza.voidProcess incoming stanza.
-
Field Details
-
EMPTY_FEATURES
-
-
Method Details
-
getFeatures
Returns XMPP features offered by module. Features will be returned by Service Discovery.- Returns:
- array of features or
null.
-
getModuleCriteria
Criteria getModuleCriteria()Returns critera used by Component to select module to handle incoming stanza.- Returns:
- criteria of selecting module.
-
canHandle
Returns true if Packet can be procesed by module. Default implementation uses Criteria. -
process
Process incoming stanza.- Parameters:
packet- receivedstanza.- Throws:
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.
-