private final static EmptyListener EMPTY_LISTENER = new EmptyListener();
public static RequestListener createRequestListener(ProviderServices providerServices) {
final Set<RequestListener> listeners = providerServices.getProvidersAndServices(RequestListener.class);
RequestListener requestListener = listeners.isEmpty() ? EMPTY_LISTENER : new AggregatedRequestListener(listeners);
for(RequestListenerAdapter a : providerServices.getProvidersAndServices(RequestListenerAdapter.class)) {
requestListener = a.adapt(requestListener);
}