Package javax.jmdns.impl
Class ServiceEventImpl
- java.lang.Object
-
- java.util.EventObject
-
- javax.jmdns.ServiceEvent
-
- javax.jmdns.impl.ServiceEventImpl
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable
public class ServiceEventImpl extends ServiceEvent
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private ServiceInfo_infoThe service info record, or null if the service could be be resolved.private java.lang.String_nameThe instance name of the service.private java.lang.String_typeThe type name of the service.private static longserialVersionUID
-
Constructor Summary
Constructors Constructor Description ServiceEventImpl(JmDNSImpl jmDNS, java.lang.String type, java.lang.String name, ServiceInfo info)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ServiceEventImplclone()JmDNSgetDNS()Returns the JmDNS instance which originated the event.ServiceInfogetInfo()Returns the service info record, or null if the service could not be resolved.java.lang.StringgetName()Returns the instance name of the service.java.lang.StringgetType()Returns the fully qualified type of the service.java.lang.StringtoString()
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
_type
private final java.lang.String _type
The type name of the service.
-
_name
private final java.lang.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 Detail
-
ServiceEventImpl
public ServiceEventImpl(JmDNSImpl jmDNS, java.lang.String type, java.lang.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 Detail
-
getDNS
public JmDNS getDNS()
Description copied from class:ServiceEventReturns the JmDNS instance which originated the event.- Specified by:
getDNSin classServiceEvent- Returns:
- JmDNS instance
-
getType
public java.lang.String getType()
Description copied from class:ServiceEventReturns the fully qualified type of the service.- Specified by:
getTypein classServiceEvent- Returns:
- type of the service.
-
getName
public java.lang.String getName()
Description copied from class:ServiceEventReturns the instance name of the service. Always returns null, if the event is sent to a service type listener.- Specified by:
getNamein classServiceEvent- Returns:
- name of the service
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.util.EventObject
-
getInfo
public ServiceInfo getInfo()
Description copied from class:ServiceEventReturns 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:
getInfoin classServiceEvent- Returns:
- service info record
- See Also:
ServiceEvent.getInfo()
-
clone
public ServiceEventImpl clone()
- Overrides:
clonein classServiceEvent
-
-