public RouterHandler(final RouteBuilder builder,final DirectoryMonitor directoryMonitor){
  this.builder=builder;
  this.directoryMonitor=directoryMonitor;
  ReadWriteLock lock=new ReentrantReadWriteLock();
  this.read=lock.readLock();
  this.write=lock.writeLock();
}

public RouterHandler ( final RouteBuilder builder , final DirectoryMonitor directoryMonitor ) { this . builder = builder ; this . directoryMonitor = directoryMonitor ; ReadWriteLock lock = new ReentrantReadWriteLock ( ) ; this . read = lock . readLock ( ) ; this . write = lock . writeLock ( ) ; }
builds a router that loads its configuration from the given directory .
