Package com.verisign.epp.codec.unhandlednamespaces.v1_0

## Class EPPUnhandledNamespacesPollMessageFilter

- java.lang.Object
- - com.verisign.epp.codec.unhandlednamespaces.v1_0.EPPUnhandledNamespacesPollMessageFilter

- All Implemented Interfaces:
    `EPPPollMessageFilter`

      public class EPPUnhandledNamespacesPollMessageFilter
      extends java.lang.Object
      implements EPPPollMessageFilter

  `EPPUnhandledNamespacesPollMessageFilter` is a utility class used to filter poll message `EPPResponse` instances against the list of client-specified object services and extension services, per `RFC 9038`. Any non-supported services (object or extension) will be removed from the poll message and moved to an <extValue> element with the full XML block along with a formatted string <reason>.
  The <value> element contains the full unsupported block of XML whether it be for an object extension or a command / response extension.
  The <reason> element is encoded using the following ABNF:

       REASON        = NAMESPACE-URI " not in login services"
       NAMESPACE-URI = 1*VCHAR

  The class does support a no-operation option to simply identify and log non-supported services without removing them from the poll message or adding <extValue> elements to the result.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `EPPUnhandledNamespacesPollMessageFilter()` | Default constructor, where the monitor is by default set to `EPPUnhandledNamespacesMonitorLogger`.
    `EPPUnhandledNamespacesPollMessageFilter​(EPPUnhandledNamespacesMonitor aMonitor)` | Constructor that the monitor to use as a parameter.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `EPPResponse` | `filter​(EPPResponse aResponse, java.util.List<EPPService> aServices, java.util.List<EPPService> aExtServices, boolean aNoOp, java.lang.Object aData)` | Filter any poll messages that are not supported by the client based on the passed in login services (object extensions) and extension services (command response extensions) from the poll message and encode into the response the information associated with the unsupported extensions (object or command / response).
    `EPPResponse` | `filter​(EPPResponse aResponse, java.util.List<EPPService> aServices, java.util.List<EPPService> aExtServices, java.lang.Object aData)` | Filter any poll messages that are not supported by the client based on the passed in login services (object extensions) and extension services (command response extensions) from the poll message and encode into the response the information associated with the unsupported extensions (object or command / response).
    `EPPUnhandledNamespacesMonitor` | `getMonitor()` | Gets the monitor to use with the filter with the default being `EPPUnhandledNamespacesMonitorLogger`.
    `void` | `setMonitor​(EPPUnhandledNamespacesMonitor monitor)` | Gets the monitor to use with the filter.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### EPPUnhandledNamespacesPollMessageFilter

          public EPPUnhandledNamespacesPollMessageFilter()

      Default constructor, where the monitor is by default set to `EPPUnhandledNamespacesMonitorLogger`.

    - #### EPPUnhandledNamespacesPollMessageFilter

          public EPPUnhandledNamespacesPollMessageFilter​(EPPUnhandledNamespacesMonitor aMonitor)

      Constructor that the monitor to use as a parameter.
      Parameters:
        `aMonitor` - Monitor to use for unhandled namespaces. Set to `null` if no monitor is desired.

  - ### Method Detail

    - #### getMonitor

          public EPPUnhandledNamespacesMonitor getMonitor()

      Gets the monitor to use with the filter with the default being `EPPUnhandledNamespacesMonitorLogger`.
      Returns:
        Monitor to use with the filter if set; `null` otherwise.

    - #### setMonitor

          public void setMonitor​(EPPUnhandledNamespacesMonitor monitor)

      Gets the monitor to use with the filter.
      Parameters:
        `monitor` - Monitor to use with the filter. Set to `null` to not use a monitor.

    - #### filter

          public EPPResponse filter​(EPPResponse aResponse,
                                    java.util.List<EPPService> aServices,
                                    java.util.List<EPPService> aExtServices,
                                    java.lang.Object aData)
                             throws EPPException

      Filter any poll messages that are not supported by the client based on the passed in login services (object extensions) and extension services (command response extensions) from the poll message and encode into the response the information associated with the unsupported extensions (object or command / response).
      Specified by:
        `filter` in interface `EPPPollMessageFilter`
      Parameters:
        `aResponse` - Source poll message
        `aServices` - `List` of `EPPService` login services (object extensions) supported by the client.
        `aExtServices` - `List` of `EPPService` login extension services (command response extensions) supported by the client.
        `aData` - Optional data object that will be passed through to the monitor when there is at least one unhandled namespace identified. This is useful to set transaction-level attributes based on the use of unhandled namespaces. Set to `null` if a data object is not needed.
      Returns:
        Filtered poll message `EPPResponse` that contains extensions that the client supports.
      Throws:
        `EPPException` - Exception filtering the poll message

    - #### filter

          public EPPResponse filter​(EPPResponse aResponse,
                                    java.util.List<EPPService> aServices,
                                    java.util.List<EPPService> aExtServices,
                                    boolean aNoOp,
                                    java.lang.Object aData)
                             throws EPPException

      Filter any poll messages that are not supported by the client based on the passed in login services (object extensions) and extension services (command response extensions) from the poll message and encode into the response the information associated with the unsupported extensions (object or command / response).
      Specified by:
        `filter` in interface `EPPPollMessageFilter`
      Parameters:
        `aResponse` - Source poll message
        `aServices` - `List` of `EPPService` login services (object extensions) supported by the client.
        `aExtServices` - `List` of `EPPService` login extension services (command response extensions) supported by the client.
        `aNoOp` - Set to `true` to only identify unsupported services by logging them and not removing them or encoding them in the <extValue> elements.
        `aData` - Optional data object that will be passed through to the monitor when there is at least one unhandled namespace identified. This is useful to set transaction-level attributes based on the use of unhandled namespaces. Set to `null` if a data object is not needed.
      Returns:
        Filtered poll message `EPPResponse` that contains extensions that the client supports.
      Throws:
        `EPPException` - Exception filtering the poll message