Class NetconfNotification


  • public final class NetconfNotification
    extends org.opendaylight.netconf.api.NetconfMessage
    Special kind of netconf message that contains a timestamp.
    • Field Detail

      • RFC3339_DATE_FORMATTER

        public static final Function<Date,​String> RFC3339_DATE_FORMATTER
        Provide a String representation of a Date object, using the time-zone offset for UTC, ZoneOffset.UTC.
      • RFC3339_DATE_PARSER

        public static final Function<String,​Date> RFC3339_DATE_PARSER
        Parse a String object into a Date using the time-zone offset for UTC, ZoneOffset.UTC, and the system default time-zone, ZoneId.systemDefault().

        While parsing, if an exception occurs, we try to handle it as if it is due to a leap second. If that's the case, a simple conversion is applied, replacing the second-of-minute of 60 with 59. If that's not the case, we propagate the DateTimeParseException to the caller.

      • UNKNOWN_EVENT_TIME

        public static final Date UNKNOWN_EVENT_TIME
        Used for unknown/un-parse-able event-times.
    • Constructor Detail

      • NetconfNotification

        public NetconfNotification​(Document notificationContent)
        Create new notification and capture the timestamp in the constructor.
      • NetconfNotification

        public NetconfNotification​(Document notificationContent,
                                   Date eventTime)
        Create new notification with provided timestamp.
    • Method Detail

      • getEventTime

        public Date getEventTime()
        Get the time of the event.
        Returns:
        notification event time