@Override public void addHandshakeCompletedListener(HandshakeCompletedListener listener){
  if (listener == null) {
    throw new IllegalArgumentException("Provided listener is null");
  }
  if (listeners == null) {
    listeners=new ArrayList<HandshakeCompletedListener>();
  }
  listeners.add(listener);
}

@ Override public void addHandshakeCompletedListener ( HandshakeCompletedListener listener ) { if ( listener == null ) { throw new IllegalArgumentException ( "Provided listener is null" ) ; } if ( listeners == null ) { listeners = new ArrayList < HandshakeCompletedListener > ( ) ; } listeners . add ( listener ) ; }
this method works according to the specification of implemented class .
