Package rocks.xmpp.extensions.shim
Interface HeaderManager
-
- All Superinterfaces:
ExtensionProtocol
,InfoProvider
- All Known Implementing Classes:
ClientHeaderManager
,StanzaHeadersAndInternetMetadataProtocol
public interface HeaderManager extends InfoProvider, ExtensionProtocol
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
addSupportedHeader(String header)
Adds a supported header.AsyncResult<List<String>>
discoverSupportedHeaders(Jid jid)
Discovers the supported headers of another entity.Set<String>
getSupportedHeaders()
Gets the supported headers as unmodifiable set.boolean
removeSupportedHeader(String header)
Removes a supported header.-
Methods inherited from interface rocks.xmpp.core.ExtensionProtocol
getNamespace, isEnabled
-
Methods inherited from interface rocks.xmpp.extensions.disco.model.info.InfoProvider
getInfo
-
-
-
-
Method Detail
-
discoverSupportedHeaders
AsyncResult<List<String>> discoverSupportedHeaders(Jid jid)
Discovers the supported headers of another entity.- Parameters:
jid
- The JID.- Returns:
- The async result with the list of supported headers.
-
getSupportedHeaders
Set<String> getSupportedHeaders()
Gets the supported headers as unmodifiable set.If you want to advertise support for a specific header, add it to this set. Service discovery requests to the 'header' node will then reveal supported headers.
- Returns:
- The supported headers.
-
addSupportedHeader
boolean addSupportedHeader(String header)
Adds a supported header. Adding a header automatically includes this protocol in service discovery responses.- Parameters:
header
- The header.- Returns:
- True, if the header was added.
- See Also:
removeSupportedHeader(String)
-
removeSupportedHeader
boolean removeSupportedHeader(String header)
Removes a supported header. If there are no headers left, this protocol is no longer included in service discovery responses.- Parameters:
header
- The header.- Returns:
- True, if the header was removed.
- See Also:
addSupportedHeader(String)
-
-