2017-02-01 15:17:16 +01:00
|
|
|
|
2017-01-11 15:56:24 +01:00
|
|
|
package io.moquette.logging;
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.Collection;
|
|
|
|
|
import io.moquette.interception.InterceptHandler;
|
|
|
|
|
|
|
|
|
|
public class LoggingUtils {
|
2017-02-01 15:17:16 +01:00
|
|
|
|
|
|
|
|
public static <T extends InterceptHandler> Collection<String> getInterceptorIds(Collection<T> handlers) {
|
|
|
|
|
Collection<String> result = new ArrayList<>(handlers.size());
|
|
|
|
|
for (T handler : handlers) {
|
|
|
|
|
result.add(handler.getID());
|
|
|
|
|
}
|
|
|
|
|
return result;
|
|
|
|
|
}
|
2017-01-11 15:56:24 +01:00
|
|
|
}
|