Package org.jivesoftware.openfire.net
Interface Bind2InlineHandler
- All Known Implementing Classes:
Bind2CarbonsHandler,Bind2StreamManagementHandler
public interface Bind2InlineHandler
Interface for plugins that handle inline elements in SASL2 bind2 requests.
-
Method Summary
Modifier and TypeMethodDescriptionGets the namespace this handler processes.booleanhandleElement(LocalClientSession session, org.dom4j.Element bound, org.dom4j.Element element) Process an inline element from a bind2 request.default voidhandleFailure(LocalClientSession session, org.dom4j.Element bound, org.dom4j.Element element, Exception cause) Gives a handler an opportunity to add the protocol-defined failure response after request processing failed.default booleanIndicates whether this handler is currently available for advertisement and request processing.
-
Method Details
-
getNamespace
String getNamespace()Gets the namespace this handler processes.- Returns:
- The XML namespace URI this handler supports
-
handleElement
boolean handleElement(LocalClientSession session, org.dom4j.Element bound, org.dom4j.Element element) Process an inline element from a bind2 request.- Parameters:
bound- The "bound" element to add any output toelement- The DOM element to process- Returns:
- true if the element was handled successfully, false otherwise
-
isEnabled
default boolean isEnabled()Indicates whether this handler is currently available for advertisement and request processing. A handler whose feature is disabled by configuration is neither advertised in the Bind2 inline feature list nor invoked for a request that names its namespace, so that a peer is never offered something it cannot use.- Returns:
truewhen the inline feature is available
-
handleFailure
default void handleFailure(LocalClientSession session, org.dom4j.Element bound, org.dom4j.Element element, Exception cause) Gives a handler an opportunity to add the protocol-defined failure response after request processing failed. Not every inline extension defines one, so the default does nothing.- Parameters:
session- the client sessionbound- the Bind2 response elementelement- the request that could not be processedcause- the processing exception, ornullwhen the handler returnedfalse
-