package com.samsung.sec.dexter.executor.peerreview.cli;

import com.samsung.sec.dexter.core.util.DexterServerConfig;
import com.samsung.sec.dexter.core.util.IDexterClient;

public class HomeJsonCLIServerCheckState implements IHomeJsonCLIState {

	@Override
	public void doAction(PeerReviewHomeJsonCLI homeJsonCLI) {
		IDexterClient dexterClient = homeJsonCLI.createDexterClient();

		System.out.print("Connecting server...");
		
		if (dexterClient.isServerAlive("test")) {
			System.out.println("\rCompleted.");
			homeJsonCLI.setState(new HomeJsonCLIHomeState());
		} else {
			System.out.println("\rCan't connect server (" + 
					dexterClient.getServerHost() + ":" + dexterClient.getServerPort() + ")");
			homeJsonCLI.setState(new HomeJsonCLIHostnameState());
		}
	}

}

@@ -500,16 +500,34 @@
 ompleted
+ to connect server
 .%22);%0A%09%09%09

Change the message on completion to connect server.