Package rocks.xmpp.core.stanza
Interface IQHandler
-
- All Known Subinterfaces:
ServiceDiscoveryManager
- All Known Implementing Classes:
AbstractIQHandler,AbstractRpcManager,AbstractServiceDiscoveryManager,BlockingManager,ClientRpcManager,ClientServiceDiscoveryManager,ClientSoftwareVersionManager,ContactExchangeManager,EntityTimeHandler,EntityTimeManager,HttpAuthenticationManager,InBandByteStreamManager,PingHandler,PrivacyListManager,ReachabilityManager,RosterManager,Socks5ByteStreamManager,SoftwareVersionProtocol,StreamInitiationManager
public interface IQHandlerHandles an inbound IQ request (IQ stanzas of typeIQ.Type.GETorIQ.Type.SET) by processing the request and returning an IQ response of typeresultorerror.8.2.3. IQ Semantics
An entity that receives an IQ request of type "get" or "set" MUST reply with an IQ response of type "result" or "error". The response MUST preserve the 'id' attribute of the request (or be empty if the generated stanza did not include an 'id' attribute).
- See Also:
- 8.2.3. IQ Semantics
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Class<?>getPayloadClass()Gets the IQ's payload class.IQhandleRequest(IQ iq)
-
-
-
Method Detail
-
getPayloadClass
Class<?> getPayloadClass()
Gets the IQ's payload class. Only payloads of this type are handled by this handler.- Returns:
- The IQ's payload class.
- See Also:
Stanza.getExtension(Class)
-
handleRequest
IQ handleRequest(IQ iq)
Handles an inbound IQ stanza of typegetorset.The returned IQ must be of type
resultorerror. Ifnullis returned, no response is returned to the requester and you must take responsibility of sending a response manually. However, this approach is not recommended.Use
IQ.createResult()orIQ.createError(rocks.xmpp.core.stanza.model.StanzaError)to generate the response IQ (i.e. an IQ with the same id).- Parameters:
iq- The inbound IQ stanza.- Returns:
- The result or error IQ, which is the response to sending entity.
-
-