public boolean sendTracks() throws IOException { if (tracks == null) { p("track message not sent"); return true; } netTracks.server(tracks); p("Tracks Out : " + System.currentTimeMillis()); return true; } // End sendStatus method
public boolean sendImage() throws IOException { if (image == null) { p("image message not sent"); return true; } netImage.server(image); p("Image Out : " + System.currentTimeMillis()); return true; } // End sendStatus method
public boolean sendStatus() throws IOException { if (status == null) { p("status message not sent"); return true; } netStat.server(status); p("status out : " + System.currentTimeMillis()); return true; } // End sendStatus method
public void run() { p("Run()"); try { switch (type) { case 0: // STATUS netStat.serverInit(); // try { // Thread.sleep( 1000 ); // // } // catch ( InterruptedException e) { // e.printStackTrace(); // } statusRun(); netStat.close(); break; case 1: // TRACKS netTracks.serverInit(); // try { // Thread.sleep( 900 ); // // } // catch ( InterruptedException e) { // e.printStackTrace(); // } tracksRun(); netTracks.close(); break; case 2: // IMAGE netImage.serverInit(); // try { // Thread.sleep( 300 ); // // } // catch ( InterruptedException e) { // e.printStackTrace(); // } imageRun(); netImage.close(); break; default: p("Didn't match any cases in constructor"); break; } } catch (IOException e) { e.printStackTrace(); } finally { p("Done"); } return; }