Constructor and Description |
---|
SendProcessor(NetServiceable service)
Initialize.
|
SendProcessor(NetServiceable service,
java.net.Socket socket,
int timeout)
Initialize.
|
Modifier and Type | Method and Description |
---|---|
void |
clearQueue()
Clear message in queue.
|
void |
close()
Close and clear message in queue.
|
java.lang.String |
getIp()
Returns IP address.
|
boolean |
getSendCompilete()
Return whether completed that sent the message.
|
void |
run() |
void |
send(java.lang.String message)
Send message.
|
void |
sendClose(java.lang.String message)
Close the connection after sent the message.
|
void |
setSoTimeout(int timeout)
Set timeout value.
|
public SendProcessor(NetServiceable service, java.net.Socket socket, int timeout) throws java.io.IOException
service
- servicesocket
- sockettimeout
- timeoutjava.io.IOException
- IOExceptionpublic SendProcessor(NetServiceable service)
service
- servicepublic void clearQueue()
public void close()
public void run()
run
in interface java.lang.Runnable
public void send(java.lang.String message)
public void sendClose(java.lang.String message)
public java.lang.String getIp()
public void setSoTimeout(int timeout) throws java.net.SocketException
timeout
- timeoutjava.net.SocketException
- SocketExceptionpublic boolean getSendCompilete()