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 Type
    Method
    Description
    Gets the namespace this handler processes.
    boolean
    handleElement(LocalClientSession session, org.dom4j.Element bound, org.dom4j.Element element)
    Process an inline element from a bind2 request.
    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.
    default boolean
    Indicates 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 to
      element - 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:
      true when 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 session
      bound - the Bind2 response element
      element - the request that could not be processed
      cause - the processing exception, or null when the handler returned false