cleanup
This commit is contained in:
parent
2a40f0971e
commit
e95ea0359f
|
@ -11,11 +11,9 @@ import java.io.*;
|
|||
import java.net.DatagramPacket;
|
||||
import java.net.DatagramSocket;
|
||||
import java.net.InetAddress;
|
||||
import java.net.Socket;
|
||||
|
||||
public class BuntiClient implements IBuntiClient {
|
||||
private final String baseAddress;
|
||||
//private final HttpClient client = new DefaultHttpClient();
|
||||
|
||||
public BuntiClient(String server, int port) {
|
||||
baseAddress = "http://" + server + ":" + port + "/";
|
||||
|
@ -24,8 +22,6 @@ public class BuntiClient implements IBuntiClient {
|
|||
@Override
|
||||
public void setPar56(final int red, final int green, final int blue) {
|
||||
|
||||
System.out.println("BuntiClient: setPar56 " + red + "," + green + "," + blue);
|
||||
|
||||
Runnable r = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
@ -75,8 +71,6 @@ public class BuntiClient implements IBuntiClient {
|
|||
@Override
|
||||
public void setPar56(final int par, final int red, final int green, final int blue) {
|
||||
|
||||
System.out.println("BuntiClient: setPar56 par=" + par + " " + red + "," + green + "," + blue);
|
||||
|
||||
Runnable r = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
|
@ -147,30 +141,6 @@ public class BuntiClient implements IBuntiClient {
|
|||
|
||||
|
||||
new Thread(r).start();
|
||||
|
||||
/* try {
|
||||
HttpPost post = new HttpPost(baseAddress + "/control/devices");
|
||||
post.addHeader("Content-Type", "application/json");
|
||||
|
||||
StringEntity entity = new StringEntity(
|
||||
"{ \"timeStamp\": 0, \"updates\": [ {\"deviceId\": 4, \"options\": { \"red\": "+
|
||||
red+", \"green\": "+green+", \"yellow\": "+yellow+" } } ] }" ,
|
||||
"UTF-8");
|
||||
|
||||
post.setEntity(entity);
|
||||
|
||||
HttpResponse response = client.execute(post);
|
||||
System.out.println(response);
|
||||
|
||||
post.abort();
|
||||
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
} catch (ClientProtocolException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}*/
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue