public void connectionOpen(){
  lock.lock();
  try {
    log.info("New server channel active.");
    connectionOpen=true;
  }
  finally {
    lock.unlock();
  }
}

public void connectionOpen ( ) { lock . lock ( ) ; try { log . info ( "New server channel active." ) ; connectionOpen = true ; } finally { lock . unlock ( ) ; } }
called to indicate the connection has been opened and messages can now be generated for the client .
