@Test public void testExternalListeners() { assertThat(ListenersUtils.externalListeners(allListeners), hasSize(9)); assertThat(ListenersUtils.externalListeners(allListeners).stream().map(GenericKafkaListener::getName).collect(Collectors.toList()), containsInAnyOrder("external", "route", "np1", "np2", "np3", "lb1", "lb2", "ing1", "ing2")); assertThat(ListenersUtils.hasExternalListener(allListeners), is(true)); assertThat(ListenersUtils.externalListeners(internalListeners), hasSize(0)); assertThat(ListenersUtils.hasExternalListener(internalListeners), is(false)); }
public static List<GenericKafkaListener> externalListeners(List<GenericKafkaListener> listeners) { return listeners.stream() .filter(listener -> KafkaListenerType.INTERNAL != listener.getType()) .collect(Collectors.toList()); }
ListenersUtils { public static List<GenericKafkaListener> externalListeners(List<GenericKafkaListener> listeners) { return listeners.stream() .filter(listener -> KafkaListenerType.INTERNAL != listener.getType()) .collect(Collectors.toList()); } }
ListenersUtils { public static List<GenericKafkaListener> externalListeners(List<GenericKafkaListener> listeners) { return listeners.stream() .filter(listener -> KafkaListenerType.INTERNAL != listener.getType()) .collect(Collectors.toList()); }  }
ListenersUtils { public static List<GenericKafkaListener> externalListeners(List<GenericKafkaListener> listeners) { return listeners.stream() .filter(listener -> KafkaListenerType.INTERNAL != listener.getType()) .collect(Collectors.toList()); }  static boolean hasListenerWithOAuth(List<GenericKafkaListener> listeners); static List<GenericKafkaListener> internalListeners(List<GenericKafkaListener> listeners); static List<GenericKafkaListener> externalListeners(List<GenericKafkaListener> listeners); static List<GenericKafkaListener> routeListeners(List<GenericKafkaListener> listeners); static List<GenericKafkaListener> loadBalancerListeners(List<GenericKafkaListener> listeners); static List<GenericKafkaListener> nodePortListeners(List<GenericKafkaListener> listeners); static List<GenericKafkaListener> ingressListeners(List<GenericKafkaListener> listeners); static boolean hasExternalListener(List<GenericKafkaListener> listeners); static boolean hasRouteListener(List<GenericKafkaListener> listeners); static boolean hasLoadBalancerListener(List<GenericKafkaListener> listeners); static boolean hasNodePortListener(List<GenericKafkaListener> listeners); static boolean hasIngressListener(List<GenericKafkaListener> listeners); static List<String> alternativeNames(List<GenericKafkaListener> listeners); static String identifier(GenericKafkaListener listener); static String envVarIdentifier(GenericKafkaListener listener); static String backwardsCompatiblePortName(GenericKafkaListener listener); static String backwardsCompatibleBootstrapServiceName(String clusterName, GenericKafkaListener listener); static String backwardsCompatibleBootstrapRouteOrIngressName(String clusterName, GenericKafkaListener listener); static String backwardsCompatibleBrokerServiceName(String clusterName, int pod, GenericKafkaListener listener); static Integer bootstrapNodePort(GenericKafkaListener listener); static Integer brokerNodePort(GenericKafkaListener listener, int pod); static String bootstrapLoadBalancerIP(GenericKafkaListener listener); static String brokerLoadBalancerIP(GenericKafkaListener listener, int pod); static Map<String, String> bootstrapAnnotations(GenericKafkaListener listener); static Map<String, String> brokerAnnotations(GenericKafkaListener listener, int pod); static String bootstrapHost(GenericKafkaListener listener); static String brokerHost(GenericKafkaListener listener, int pod); static String brokerAdvertisedHost(GenericKafkaListener listener, int pod); static Integer brokerAdvertisedPort(GenericKafkaListener listener, int pod); static List<String> loadBalancerSourceRanges(GenericKafkaListener listener); static ExternalTrafficPolicy externalTrafficPolicy(GenericKafkaListener listener); static NodeAddressType preferredNodeAddressType(GenericKafkaListener listener); static String ingressClass(GenericKafkaListener listener); static String serviceType(GenericKafkaListener listener); }
ListenersUtils { public static List<GenericKafkaListener> externalListeners(List<GenericKafkaListener> listeners) { return listeners.stream() .filter(listener -> KafkaListenerType.INTERNAL != listener.getType()) .collect(Collectors.toList()); }  static boolean hasListenerWithOAuth(List<GenericKafkaListener> listeners); static List<GenericKafkaListener> internalListeners(List<GenericKafkaListener> listeners); static List<GenericKafkaListener> externalListeners(List<GenericKafkaListener> listeners); static List<GenericKafkaListener> routeListeners(List<GenericKafkaListener> listeners); static List<GenericKafkaListener> loadBalancerListeners(List<GenericKafkaListener> listeners); static List<GenericKafkaListener> nodePortListeners(List<GenericKafkaListener> listeners); static List<GenericKafkaListener> ingressListeners(List<GenericKafkaListener> listeners); static boolean hasExternalListener(List<GenericKafkaListener> listeners); static boolean hasRouteListener(List<GenericKafkaListener> listeners); static boolean hasLoadBalancerListener(List<GenericKafkaListener> listeners); static boolean hasNodePortListener(List<GenericKafkaListener> listeners); static boolean hasIngressListener(List<GenericKafkaListener> listeners); static List<String> alternativeNames(List<GenericKafkaListener> listeners); static String identifier(GenericKafkaListener listener); static String envVarIdentifier(GenericKafkaListener listener); static String backwardsCompatiblePortName(GenericKafkaListener listener); static String backwardsCompatibleBootstrapServiceName(String clusterName, GenericKafkaListener listener); static String backwardsCompatibleBootstrapRouteOrIngressName(String clusterName, GenericKafkaListener listener); static String backwardsCompatibleBrokerServiceName(String clusterName, int pod, GenericKafkaListener listener); static Integer bootstrapNodePort(GenericKafkaListener listener); static Integer brokerNodePort(GenericKafkaListener listener, int pod); static String bootstrapLoadBalancerIP(GenericKafkaListener listener); static String brokerLoadBalancerIP(GenericKafkaListener listener, int pod); static Map<String, String> bootstrapAnnotations(GenericKafkaListener listener); static Map<String, String> brokerAnnotations(GenericKafkaListener listener, int pod); static String bootstrapHost(GenericKafkaListener listener); static String brokerHost(GenericKafkaListener listener, int pod); static String brokerAdvertisedHost(GenericKafkaListener listener, int pod); static Integer brokerAdvertisedPort(GenericKafkaListener listener, int pod); static List<String> loadBalancerSourceRanges(GenericKafkaListener listener); static ExternalTrafficPolicy externalTrafficPolicy(GenericKafkaListener listener); static NodeAddressType preferredNodeAddressType(GenericKafkaListener listener); static String ingressClass(GenericKafkaListener listener); static String serviceType(GenericKafkaListener listener);  }