Class EPPUnhandledNamespacesResponseFilter
- java.lang.Object
-
- com.verisign.epp.codec.unhandlednamespaces.v1_0.EPPUnhandledNamespacesResponseFilter
-
public class EPPUnhandledNamespacesResponseFilter extends java.lang.Object
EPPUnhandledNamespacesResponseFilter
is a utility class used to filter command response extensions, perRFC 9038
. Any non-supported command response extensions will be removed from the response 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 response or adding <extValue> elements to the result.
-
-
Constructor Summary
Constructors Constructor Description EPPUnhandledNamespacesResponseFilter()
Default constructor, where the monitor is by default set toEPPUnhandledNamespacesMonitorLogger
.EPPUnhandledNamespacesResponseFilter(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> aExtServices, boolean aNoOp, java.lang.Object aData)
Filter any response extensions that are not supported by the client based on the passed in the extension services (command response extensions) and the response with the pre-filtered extensions.EPPResponse
filter(EPPResponse aResponse, java.util.List<EPPService> aExtServices, java.lang.Object aData)
Filter any response extensions that are not supported by the client based on the passed in the extension services (command response extensions) and the response with the pre-filtered extensions.EPPUnhandledNamespacesMonitor
getMonitor()
Gets the monitor to use with the filter with the default beingEPPUnhandledNamespacesMonitorLogger
.void
setMonitor(EPPUnhandledNamespacesMonitor monitor)
Gets the monitor to use with the filter.
-
-
-
Constructor Detail
-
EPPUnhandledNamespacesResponseFilter
public EPPUnhandledNamespacesResponseFilter()
Default constructor, where the monitor is by default set toEPPUnhandledNamespacesMonitorLogger
.
-
EPPUnhandledNamespacesResponseFilter
public EPPUnhandledNamespacesResponseFilter(EPPUnhandledNamespacesMonitor aMonitor)
Constructor that the monitor to use as a parameter.- Parameters:
aMonitor
- Monitor to use for unhandled namespaces. Set tonull
if no monitor is desired.
-
-
Method Detail
-
getMonitor
public EPPUnhandledNamespacesMonitor getMonitor()
Gets the monitor to use with the filter with the default beingEPPUnhandledNamespacesMonitorLogger
.- 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 tonull
to not use a monitor.
-
filter
public EPPResponse filter(EPPResponse aResponse, java.util.List<EPPService> aExtServices, java.lang.Object aData) throws EPPException
Filter any response extensions that are not supported by the client based on the passed in the extension services (command response extensions) and the response with the pre-filtered extensions.- Parameters:
aResponse
- Source responseaExtServices
-List
ofEPPService
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 tonull
if a data object is not needed.- Returns:
- Filtered
EPPResponse
that only contains extensions that the client supports. - Throws:
EPPException
- Exception filtering the response
-
filter
public EPPResponse filter(EPPResponse aResponse, java.util.List<EPPService> aExtServices, boolean aNoOp, java.lang.Object aData) throws EPPException
Filter any response extensions that are not supported by the client based on the passed in the extension services (command response extensions) and the response with the pre-filtered extensions.- Parameters:
aResponse
- Source responseaExtServices
-List
ofEPPService
login extension services (command response extensions) supported by the client.aNoOp
- Set totrue
to only identify unsupported services by calling the monitor and not moving the unsupported services into 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 tonull
if a data object is not needed.- Returns:
- Filtered
EPPResponse
that only contains extensions that the client supports. - Throws:
EPPException
- Exception filtering the response
-
-