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 IQHandler
Handles an inbound IQ request (IQ stanzas of typeIQ.Type.GET
orIQ.Type.SET
) by processing the request and returning an IQ response of typeresult
orerror
.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.IQ
handleRequest(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 typeget
orset
.The returned IQ must be of type
result
orerror
. Ifnull
is 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.
-
-