Update APIListener.java

modified to consider the configuration with setyields