Class EPPSecureSendReceiveLogger

  • All Implemented Interfaces:
    EPPSendReceiveLogger

    public class EPPSecureSendReceiveLogger
    extends java.lang.Object
    implements EPPSendReceiveLogger
    A concrete EPPSendReceiveLogger that logs the messages in secure form to the Log4J com.verisign.epp.util.EPPXMLStream category. This logging category is used for backward compatibility to logging configurations when the EPPXMLStream logged the packets directly. Sensitive attributes of messages will be masked with the string "MASKED".
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void logReceive​(byte[] aPacket, EPPMessage aMessage)
      Log the raw receiving of a message.
      void logSend​(byte[] aPacket, EPPMessage aMessage)
      Log the raw sending of a message.
      EPPCodecComponent maskMessage​(EPPCodecComponent aMessage)
      Mask the message by cloning the message and by masking specific message attributes.
      java.lang.String maskString​(java.lang.String aString)
      Mask a general string of sensitive information.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • EPPSecureSendReceiveLogger

        public EPPSecureSendReceiveLogger()
    • Method Detail

      • logSend

        public void logSend​(byte[] aPacket,
                            EPPMessage aMessage)
        Log the raw sending of a message. No filtering or alterations are done to the attributes of the message.
        Specified by:
        logSend in interface EPPSendReceiveLogger
        Parameters:
        aPacket - Packet to send. This may be null if the packet has not been encoded yet.
        aMessage - The message that is being sent, which could be any concrete EPPMessage, including a EPPCommand, an EPPGreeting, an EPPHello, or an EPPResponse. This may be null if the EPPMessage is not available.
      • logReceive

        public void logReceive​(byte[] aPacket,
                               EPPMessage aMessage)
        Log the raw receiving of a message. No filtering or alterations are done to the attributes of the message.
        Specified by:
        logReceive in interface EPPSendReceiveLogger
        Parameters:
        aPacket - Packet received. This may be null if the packet is not available.
        aMessage - The message received, which could be any concrete EPPMessage, including a EPPCommand, an EPPGreeting, an EPPHello, or an EPPResponse. This may be null if the EPPMessage is not available.
      • maskString

        public java.lang.String maskString​(java.lang.String aString)
        Mask a general string of sensitive information. Specific string regular expressions are checked and matching strings are masked by this method for inclusion in exceptions and logs.
        Specified by:
        maskString in interface EPPSendReceiveLogger
        Parameters:
        aString - String to scan for masking
        Returns:
        Masked String.
      • maskMessage

        public EPPCodecComponent maskMessage​(EPPCodecComponent aMessage)
        Mask the message by cloning the message and by masking specific message attributes.
        Specified by:
        maskMessage in interface EPPSendReceiveLogger
        Parameters:
        aMessage - Message to mask. If null, null will be returned.
        Returns:
        Masked message if instance is different from aMessage . aMessage is returned if no filtering was done.