Class Event


  • public class Event
    extends Object
    Data type for events, consisting of the originating IP address and an event type.
    • Constructor Detail

      • Event

        public Event​(EventType type,
                     int sourceAddress)
        Creates a new event.
        Parameters:
        type - The event type.
        sourceAddress - The originating address (think 32 bit IPv4 address).
    • Method Detail

      • type

        public EventType type()
        Gets the event's type.
      • sourceAddress

        public int sourceAddress()
        Gets the event's source address.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • formatAddress

        public static String formatAddress​(int address)
        Util method to create a string representation of a 32 bit integer representing an IPv4 address.
        Parameters:
        address - The address, MSB first.
        Returns:
        The IP address string.