Package javax.jmdns.impl
Class ListenerStatus<T extends EventListener>
- java.lang.Object
-
- javax.jmdns.impl.ListenerStatus<T>
-
- Type Parameters:
T
- listener type
- Direct Known Subclasses:
ListenerStatus.ServiceListenerStatus
,ListenerStatus.ServiceTypeListenerStatus
public class ListenerStatus<T extends EventListener> extends Object
This class track the status of listener.
The main purpose of this class is to collapse consecutive events so that we can guarantee the correct call back sequence.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ListenerStatus.ServiceListenerStatus
static class
ListenerStatus.ServiceTypeListenerStatus
-
Field Summary
Fields Modifier and Type Field Description static boolean
ASYNCHRONOUS
static boolean
SYNCHRONOUS
-
Constructor Summary
Constructors Constructor Description ListenerStatus(T listener, boolean synch)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
T
getListener()
int
hashCode()
boolean
isSynchronous()
Returntrue if the listener must be called synchronously. String
toString()
-
-
-
Field Detail
-
SYNCHRONOUS
public static final boolean SYNCHRONOUS
- See Also:
- Constant Field Values
-
ASYNCHRONOUS
public static final boolean ASYNCHRONOUS
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ListenerStatus
public ListenerStatus(T listener, boolean synch)
- Parameters:
listener
- listener being tracked.synch
- true if that listener can be called asynchronously
-
-
Method Detail
-
getListener
public T getListener()
- Returns:
- the listener
-
isSynchronous
public boolean isSynchronous()
Returntrue if the listener must be called synchronously. - Returns:
- the synch
-
-