@Override
	 public void onCommand(String command) {
		 final String[] splits = command.split(" ");
		 if (splits[0].equals("enlist")) {
			 // enlist <<node_id>> <<transaction_id>>
			 Integer tid = Integer.parseInt(splits[2]);
			 if(!_xacts.containsKey(tid)){
				 System.out.println("Invalid tid " + tid.toString());
				 return;
			 }
			 DtManager.Enlist(Integer.parseInt(splits[1]), _xacts.get(tid).Id);
		 } else if (splits[0].equals("createTx")) {
			 // create <<transaction_id>>
			 DistributedTransaction dt = DtManager.Create();
			 _xacts.put(Integer.parseInt(splits[1]), dt);
	 	} else if (splits[0].equals("commit")) {
			 // commit <<transaction_id>>
			 Integer tid1 = Integer.parseInt(splits[1]);
			 if(!_xacts.containsKey(tid1)){
				 System.out.println("Invalid tid " + tid1.toString());
				 return;
			 }
			 
			 DtManager.Commit(_xacts.get(tid1), new INotify() {
				@Override
				public void onCompleted(Status result, String data) {
					System.out.println("Transaction " + splits[1] + " returned " + result.toString());
				}
			 });
	 	} else if (splits[0].equals("abort")) {
			 // commit <<transaction_id>>
			 try {
				DtManager.Abort(_xacts.get(Integer.parseInt(splits[1])), new INotify() {
					@Override
					public void onCompleted(Status result, String data) {
						System.out.println("Transaction " + splits[1] + " returned " + result.toString());
					}
				 });
			} catch (NumberFormatException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			} catch (Exception e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		 }
	 }