public void addCommunicationListener(FTPCommunicationListener listener){
synchronized (lock) {
    communicationListeners.add(listener);
    if (communication != null) {
      communication.addCommunicationListener(listener);
    }
  }
}

public void addCommunicationListener ( FTPCommunicationListener listener ) { synchronized ( lock ) { communicationListeners . add ( listener ) ; if ( communication != null ) { communication . addCommunicationListener ( listener ) ; } } }
this method adds a ftpcommunicationlistener to the object .
