public class SSDPDiscoveryThread extends Thread
Thread
implementation.
Name | Mode | Type | isHidden | isBound | isConstrained |
---|---|---|---|---|---|
alive | R | boolean | false | false | false |
contextClassLoader | RW | ClassLoader | false | false | false |
daemon | RW | boolean | false | false | false |
id | R | long | false | false | false |
interrupted | R | boolean | false | false | false |
name | RW | String | false | false | false |
priority | RW | int | false | false | false |
stackTrace | R | StackTraceElement[] | false | false | false |
state | R | Thread.State | false | false | false |
threadGroup | R | ThreadGroup | false | false | false |
uncaughtExceptionHandler | RW | Thread.UncaughtExceptionHandler | false | false | false |
Modifier and Type | Class and Description |
---|---|
static interface |
SSDPDiscoveryThread.Listener
SSDPDiscoveryThread listener interface definition. |
Thread.State, Thread.UncaughtExceptionHandler
Modifier and Type | Field and Description |
---|---|
protected int |
interval |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
SSDPDiscoveryThread(int interval)
Sole constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addListener(SSDPDiscoveryThread.Listener listener)
Method to add a
SSDPDiscoveryThread.Listener . |
protected void |
ping()
Callback periodically made to
queue(SSDPMessage) a
SSDPDiscoveryRequest available to be intercepted (overridden)
by subclass implementations. |
void |
queue(SSDPMessage message)
Method to queue a
SSDPMessage for transmission. |
void |
removeListener(SSDPDiscoveryThread.Listener listener)
Method to remove a
SSDPDiscoveryThread.Listener . |
void |
run() |
void |
start() |
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, stop, stop, suspend, toString, yield
protected final int interval
public SSDPDiscoveryThread(int interval) throws SocketException
interval
- The minimum interval (in seconds) between
broadcast messages.SocketException
- If the underlying DatagramSocket
cannot be conditioned.public void addListener(SSDPDiscoveryThread.Listener listener)
SSDPDiscoveryThread.Listener
.listener
- The SSDPDiscoveryThread.Listener
.public void removeListener(SSDPDiscoveryThread.Listener listener)
SSDPDiscoveryThread.Listener
.listener
- The SSDPDiscoveryThread.Listener
.public void queue(SSDPMessage message)
SSDPMessage
for transmission.message
- The SSDPMessage
.protected void ping()
queue(SSDPMessage)
a
SSDPDiscoveryRequest
available to be intercepted (overridden)
by subclass implementations.Copyright © 2015–2020 Allen D. Ball. All rights reserved.