Interface EPPSendReceiveLogger

  • All Known Implementing Classes:
    EPPRawSendReceiveLogger, EPPSecureSendReceiveLogger

    public interface EPPSendReceiveLogger
    Interface for logging messages sent and received. A class can implement this interface and configured to override the information logged. For example, a secure logger can be created to mask certain attributes (.e.g, password, auth info) from getting logged.
    • Method Detail

      • logSend

        void logSend​(byte[] aPacket,
                     EPPMessage aMessage)
        Log the sending of a message. The message itself is immutable, but the message can be cloned to customize the attributes logged.
        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

        void logReceive​(byte[] aPacket,
                        EPPMessage aMessage)
        Log the receiving of a message. The message itself is immutable, but the message can be cloned to customize the attributes logged.
        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.
      • maskMessage

        EPPCodecComponent maskMessage​(EPPCodecComponent aMessage)
        Utility method used to optionally mask specific message attributes based on the concrete EPPSendReceiveLogger.
        Parameters:
        aMessage - Message to optionally mask. If null, null will be returned.
        Returns:
        Masked message if instance is different from aMessage . aMessage is returned if no filtering was done.
      • maskString

        java.lang.String maskString​(java.lang.String aString)
        Utility method used to optionally mask specific strings values using the concrete EPPSendReceiverLogger.
        Parameters:
        aString - String to scan for masking
        Returns:
        Masked String.