Class DeviceEvent

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  DeviceEvent.Type
      Type of device events.
    • Constructor Detail

      • DeviceEvent

        public DeviceEvent​(DeviceEvent.Type type,
                           Device device)
        Creates an event of a given type and for the specified device and the current time.
        Parameters:
        type - device event type
        device - event device subject
      • DeviceEvent

        public DeviceEvent​(DeviceEvent.Type type,
                           Device device,
                           Port port)
        Creates an event of a given type and for the specified device, port and the current time.
        Parameters:
        type - device event type
        device - event device subject
        port - optional port subject
      • DeviceEvent

        public DeviceEvent​(DeviceEvent.Type type,
                           Device device,
                           Port port,
                           long time)
        Creates an event of a given type and for the specified device and time.
        Parameters:
        type - device event type
        device - event device subject
        port - optional port subject
        time - occurrence time
    • Method Detail

      • port

        public Port port()
        Returns the port subject.
        Returns:
        port subject or null if the event is not port specific.