public LocatorState waitOnLocator(){
  Throwable t=null;
  try {
    assert getLocator() != null : "The Locator must first be started with a call to start!";
    debug("Waiting on Locator (%1$s) to stop...",getId());
    getLocator().waitToStop();
  }
 catch (  InterruptedException e) {
    Thread.currentThread().interrupt();
    t=e;
    debug(e);
  }
catch (  RuntimeException e) {
    t=e;
    throw e;
  }
catch (  Throwable e) {
    t=e;
    throw e;
  }
 finally {
    failOnStart(t);
  }
  return new LocatorState(this,Status.STOPPED);
}

public LocatorState waitOnLocator ( ) { Throwable t = null ; try { assert getLocator ( ) != null : "The Locator must first be started with a call to start!" ; debug ( "Waiting on Locator (%1$s) to stop..." , getId ( ) ) ; getLocator ( ) . waitToStop ( ) ; } catch ( InterruptedException e ) { Thread . currentThread ( ) . interrupt ( ) ; t = e ; debug ( e ) ; } catch ( RuntimeException e ) { t = e ; throw e ; } catch ( Throwable e ) { t = e ; throw e ; } finally { failOnStart ( t ) ; } return new LocatorState ( this , Status . STOPPED ) ; }
waits on the locator to stop causing the calling thread to join with the locator ' s location - based services thread .
