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, LocationAwareDnsLookupClient locationAwareDnsLookupClient, com.google.common.cache.Cache<HostNameWithLocationKey,​java.lang.String> dnsCache)
      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, LocationAwareDnsLookupClient locationAwareDnsLookupClient)
      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,
                              LocationAwareDnsLookupClient locationAwareDnsLookupClient)
                       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,
                              LocationAwareDnsLookupClient locationAwareDnsLookupClient,
                              com.google.common.cache.Cache<HostNameWithLocationKey,​java.lang.String> dnsCache)
                       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
        locationAwareDnsLookupClient - Location Aware DNS Lookup Client
        dnsCache -
        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:
        original - ByteBuffer
        Returns:
        A new ByteBuffer representing the trimmed value.
      • toEventBuilder

        public static final EventBuilder toEventBuilder​(SyslogMessage message,
                                                        java.lang.String systemId,
                                                        java.lang.String location)
      • 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.