Class SyslogDestination

  • All Implemented Interfaces:
    java.io.Serializable, Destination

    public class SyslogDestination
    extends java.lang.Object
    implements Destination
    Configuration for the various Syslog hosts to receive alarms via Syslog.
    Author:
    David Hustace
    See Also:
    Serialized Form
    • Constructor Detail

      • SyslogDestination

        public SyslogDestination()
        Instantiates a new Syslog destination.
    • Method Detail

      • getName

        public java.lang.String getName()
        Description copied from interface: Destination
        Gets the destination name.
        Specified by:
        getName in interface Destination
        Returns:
        the destination name
      • setName

        public void setName​(java.lang.String name)
        Sets the name.
        Parameters:
        name - the new name
      • getHost

        public java.lang.String getHost()
        Gets the host.
        Returns:
        the host
      • setHost

        public void setHost​(java.lang.String m_host)
        Sets the host.
        Parameters:
        m_host - the new host
      • getPort

        public java.lang.Integer getPort()
        Gets the port.
        Returns:
        the port
      • setPort

        public void setPort​(java.lang.Integer m_port)
        Sets the port.
        Parameters:
        m_port - the new port
      • getCharSet

        public java.lang.String getCharSet()
        Gets the char set.
        Returns:
        the char set
      • setCharSet

        public void setCharSet​(java.lang.String charSet)
        Sets the char set.
        Parameters:
        charSet - the new char set
      • getMaxMessageLength

        public java.lang.Integer getMaxMessageLength()
        Gets the max message length.
        Returns:
        the max message length
      • setMaxMessageLength

        public void setMaxMessageLength​(java.lang.Integer maxMessageLength)
        Sets the max message length.
        Parameters:
        maxMessageLength - the new max message length
      • isSendLocalName

        public java.lang.Boolean isSendLocalName()
        Checks if is send local name flag.
        Returns:
        true, if is send local name flag
      • setSendLocalName

        public void setSendLocalName​(java.lang.Boolean sendLocalName)
        Sets the send local name flag.
        Parameters:
        sendLocalName - the new send local name flag
      • isSendLocalTime

        public java.lang.Boolean isSendLocalTime()
        Checks if is send local time flag.
        Returns:
        true, if is send local time flag
      • setSendLocalTime

        public void setSendLocalTime​(java.lang.Boolean sendLocalTime)
        Sets the send local time flag.
        Parameters:
        sendLocalTime - the new send local time flag
      • isTruncateMessage

        public java.lang.Boolean isTruncateMessage()
        Checks if is truncate message flag.
        Returns:
        true, if is truncate message flag
      • setTruncateMessage

        public void setTruncateMessage​(java.lang.Boolean truncateMessage)
        Sets the truncate message flag.
        Parameters:
        truncateMessage - the new truncate message flag
      • isFirstOccurrenceOnly

        public boolean isFirstOccurrenceOnly()
        Description copied from interface: Destination
        Checks if is first occurrence only.
        Specified by:
        isFirstOccurrenceOnly in interface Destination
        Returns:
        true, if is first occurrence only
      • setFirstOccurrenceOnly

        public void setFirstOccurrenceOnly​(java.lang.Boolean firstOccurrenceOnly)
        Sets the first occurrence only.
        Parameters:
        firstOccurrenceOnly - the new first occurrence only
      • getFilters

        public java.util.List<SyslogFilter> getFilters()
        Gets the filters.
        Returns:
        the filters
      • setFilters

        public void setFilters​(java.util.List<SyslogFilter> filters)
        Sets the filters.
        Parameters:
        filters - the new filters
      • passFilter

        public boolean passFilter​(NorthboundAlarm alarm)
        Pass filter.

        If the destination doesn't have filter, the method will return true.

        If the method has filters, they will be evaluated. If no filters are satisfied, the method will return false. Otherwise, the method will return true as soon as one filter is satisfied.

        Parameters:
        alarm - the alarm
        Returns:
        true, if successful
      • getCustomMessageFormat

        public java.lang.String getCustomMessageFormat​(NorthboundAlarm alarm)
        Gets the custom message format.
        Parameters:
        alarm - the alarm
        Returns:
        the custom message format