Example #1
0
  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;
  }