public class ResponseListener
extends java.lang.Object
implements java.lang.Runnable
Modifier and Type | Field and Description |
---|---|
private android.app.Activity |
mainActivity
MainActivity Reference
|
private boolean |
running
Are we supposed to be running this thread?
|
private java.lang.String |
TAG
For Logcat debugging
|
private TcpClient |
tcpClient
tcpClient to listen to
|
Constructor and Description |
---|
ResponseListener(TcpClient tcpClient,
android.app.Activity mainActivity)
Constructor that constructs, tcpClient, mainActivity
|
Modifier and Type | Method and Description |
---|---|
private void |
handleErrorMessage(Message msg)
If Error, update the UI field that had the error to show INVALID, should only happen for edittexts
|
protected void |
parseCmdsInUseResponse(java.lang.String response)
When CMDS_IN_USE is sent upon an update received, parses the read input from server
|
void |
run() |
void |
terminate()
Stops thread from running
|
private final TcpClient tcpClient
private final android.app.Activity mainActivity
private boolean running
private final java.lang.String TAG
public ResponseListener(TcpClient tcpClient, android.app.Activity mainActivity)
tcpClient
- mainActivity
- public void run()
run
in interface java.lang.Runnable
private void handleErrorMessage(Message msg)
msg
- - message that held an error in itpublic void terminate()
protected void parseCmdsInUseResponse(java.lang.String response)
response
- - response from server to parse