Package javax.jmdns.impl
Class ServiceEventImpl
- java.lang.Object
-
- java.util.EventObject
-
- javax.jmdns.ServiceEvent
-
- javax.jmdns.impl.ServiceEventImpl
-
- All Implemented Interfaces:
Serializable
,Cloneable
public class ServiceEventImpl extends ServiceEvent
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class java.util.EventObject
source
-
-
Constructor Summary
Constructors Constructor Description ServiceEventImpl(JmDNSImpl jmDNS, String type, String name, ServiceInfo info)
Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ServiceEventImpl
clone()
JmDNS
getDNS()
Returns the JmDNS instance which originated the event.ServiceInfo
getInfo()
Returns the service info record, or null if the service could not be resolved.String
getName()
Returns the instance name of the service.String
getType()
Returns the fully qualified type of the service.String
toString()
-
Methods inherited from class java.util.EventObject
getSource
-
-
-
-
Constructor Detail
-
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 Detail
-
getDNS
public JmDNS getDNS()
Description copied from class:ServiceEvent
Returns the JmDNS instance which originated the event.- Specified by:
getDNS
in classServiceEvent
- Returns:
- JmDNS instance
-
getType
public String getType()
Description copied from class:ServiceEvent
Returns the fully qualified type of the service.- Specified by:
getType
in classServiceEvent
- 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 classServiceEvent
- Returns:
- name of the service
-
toString
public String toString()
- Overrides:
toString
in classEventObject
-
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 classServiceEvent
- Returns:
- service info record
- See Also:
ServiceEvent.getInfo()
-
clone
public ServiceEventImpl clone()
- Overrides:
clone
in classServiceEvent
-
-