public void addControllerListener(ControllerInterface listener){
  if (listeners == null) {
    listeners=new ArrayList<ControllerInterface>(1);
  }
  if (!listeners.contains(listener)) {
    listeners.add(listener);
  }
}

public void addControllerListener ( ControllerInterface listener ) { if ( listeners == null ) { listeners = new ArrayList < ControllerInterface > ( 1 ) ; } if ( ! listeners . contains ( listener ) ) { listeners . add ( listener ) ; } }
add a listener to handle : listener . sendpackettodevice ( message ) ;
