public class UDPStream extends AbstractStream implements Runnable
| Modifier and Type | Field and Description |
|---|---|
protected String |
address |
protected Integer |
backlog |
(package private) static Data |
eof |
protected String |
id |
(package private) static org.slf4j.Logger |
log |
protected Integer |
packetSize |
protected Integer |
port |
protected LinkedBlockingQueue<Data> |
queue |
protected AtomicBoolean |
running |
protected DatagramSocket |
socket |
protected Thread |
t |
closed, count, in, limit, prefix, seqId, sequenceKey, urlSOURCE_KEY| Constructor and Description |
|---|
UDPStream() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
String |
getAddress() |
Integer |
getBacklog() |
String |
getId() |
Integer |
getPort() |
void |
init() |
Data |
read() |
Data |
readNext() |
void |
run() |
void |
setAddress(String address) |
void |
setBacklog(Integer backlog) |
void |
setId(String id) |
void |
setPort(Integer port) |
getInputStream, getLimit, getPrefix, getSequenceKey, getUrl, setLimit, setPrefix, setSequenceKey, setUrlstatic org.slf4j.Logger log
protected String address
protected Integer port
protected DatagramSocket socket
static final Data eof
protected AtomicBoolean running
protected Integer packetSize
protected Integer backlog
protected final LinkedBlockingQueue<Data> queue
protected Thread t
protected String id
public String getId()
getId in interface SourcegetId in class AbstractStreampublic void setId(String id)
setId in interface SourcesetId in class AbstractStreampublic void init()
throws Exception
init in interface Sourceinit in class AbstractStreamExceptionSource.init()public Data read() throws Exception
read in interface Sourceread in class AbstractStreamExceptionSource.read()public void close()
throws Exception
close in interface Sourceclose in class AbstractStreamExceptionSource.close()public void run()
run in interface RunnableRunnable.run()public String getAddress()
public void setAddress(String address)
address - the address to setpublic Integer getPort()
public void setPort(Integer port)
port - the port to setpublic Integer getBacklog()
public void setBacklog(Integer backlog)
backlog - the backlog to setpublic Data readNext() throws Exception
readNext in class AbstractStreamExceptionAbstractStream.readNext()Copyright © 2018. All rights reserved.