Class ConvertToEvent

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static java.lang.String HIDDEN_MESSAGE
      Constant HIDDEN_MESSAGE="The message logged has been removed due"{trunked}
    • Constructor Summary

      Constructors 
      Constructor Description
      ConvertToEvent​(java.lang.String systemId, java.lang.String location, java.net.InetAddress addr, int port, java.nio.ByteBuffer incoming, java.util.Date receivedTimestamp, SyslogdConfig config)
      Constructs a new event encapsulation instance based upon the information passed to the method.
      ConvertToEvent​(java.lang.String systemId, java.lang.String location, java.net.InetAddress addr, int port, java.nio.ByteBuffer incoming, SyslogdConfig config)
      Constructs a new event encapsulation instance based upon the information passed to the method.
    • Field Detail

      • HIDDEN_MESSAGE

        protected static final java.lang.String HIDDEN_MESSAGE
        Constant HIDDEN_MESSAGE="The message logged has been removed due"{trunked}
        See Also:
        Constant Field Values
    • Constructor Detail

      • ConvertToEvent

        public ConvertToEvent​(java.lang.String systemId,
                              java.lang.String location,
                              java.net.InetAddress addr,
                              int port,
                              java.nio.ByteBuffer incoming,
                              SyslogdConfig config)
                       throws MessageDiscardedException
        Constructs a new event encapsulation instance based upon the information passed to the method. The passed byte array is decoded into a string using the StandardCharsets.US_ASCII character encoding.
        Parameters:
        systemId -
        location -
        addr - The remote agent's address.
        port - The remote agent's port
        incoming - The syslog datagram in StandardCharsets.US_ASCII encoding.
        config - The Syslogd configuration
        Throws:
        MessageDiscardedException
      • ConvertToEvent

        public ConvertToEvent​(java.lang.String systemId,
                              java.lang.String location,
                              java.net.InetAddress addr,
                              int port,
                              java.nio.ByteBuffer incoming,
                              java.util.Date receivedTimestamp,
                              SyslogdConfig config)
                       throws MessageDiscardedException
        Constructs a new event encapsulation instance based upon the information passed to the method. The passed byte array is decoded into a string using the StandardCharsets.US_ASCII character encoding.
        Parameters:
        systemId -
        location -
        addr - The remote agent's address.
        port - The remote agent's port
        incoming - The syslog datagram in StandardCharsets.US_ASCII encoding.
        receivedTimestamp - the time the message was received
        config - The Syslogd configuration
        Throws:
        MessageDiscardedException
    • Method Detail

      • trimTrailingNulls

        public static java.nio.ByteBuffer trimTrailingNulls​(java.nio.ByteBuffer original)
        Reduce the limit of the buffer to trim trailing nulls from the value.
        Parameters:
        buffer -
        Returns:
        A new ByteBuffer representing the trimmed value.
      • toEventBuilder

        public static final EventBuilder toEventBuilder​(SyslogMessage message,
                                                        java.lang.String systemId,
                                                        java.lang.String location)
      • toEventBuilder

        public static final EventBuilder toEventBuilder​(SyslogMessage message,
                                                        java.lang.String systemId,
                                                        java.lang.String location,
                                                        java.util.Date receivedTimestamp)
      • getEvent

        public Event getEvent()

        getEvent

        Returns:
        a Event object.
      • toString

        public java.lang.String toString()

        toString

        Overrides:
        toString in class java.lang.Object
        Returns:
        a String object.