Class ServiceEventImpl

All Implemented Interfaces:
Serializable, Cloneable

public class ServiceEventImpl extends ServiceEvent
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • _type

      private final String _type
      The type name of the service.
    • _name

      private final String _name
      The instance name of the service. Or null, if the event was fired to a service type listener.
    • _info

      private final ServiceInfo _info
      The service info record, or null if the service could be be resolved. This is also null, if the event was fired to a service type listener.
  • Constructor Details

    • ServiceEventImpl

      public ServiceEventImpl(JmDNSImpl jmDNS, String type, String name, ServiceInfo info)
      Creates a new instance.
      Parameters:
      jmDNS - the JmDNS instance which originated the event.
      type - the type name of the service.
      name - the instance name of the service.
      info - the service info record, or null if the service could be be resolved.
  • Method Details

    • getDNS

      public JmDNS getDNS()
      Description copied from class: ServiceEvent
      Returns the JmDNS instance which originated the event.
      Specified by:
      getDNS in class ServiceEvent
      Returns:
      JmDNS instance
    • getType

      public String getType()
      Description copied from class: ServiceEvent
      Returns the fully qualified type of the service.
      Specified by:
      getType in class ServiceEvent
      Returns:
      type of the service.
    • getName

      public String getName()
      Description copied from class: ServiceEvent
      Returns the instance name of the service. Always returns null, if the event is sent to a service type listener.
      Specified by:
      getName in class ServiceEvent
      Returns:
      name of the service
    • toString

      public String toString()
      Overrides:
      toString in class EventObject
    • getInfo

      public ServiceInfo getInfo()
      Description copied from class: ServiceEvent
      Returns the service info record, or null if the service could not be resolved. Always returns null, if the event is sent to a service type listener.
      Specified by:
      getInfo in class ServiceEvent
      Returns:
      service info record
      See Also:
    • clone

      public ServiceEventImpl clone()
      Overrides:
      clone in class ServiceEvent