/** * Create and configure a AJPListener object to the list of subresources * * @param key * The key for the AJPListener resource * @return this */ @SuppressWarnings("unchecked") public T ajpListener(java.lang.String childKey) { ajpListener(childKey, null); return (T) this; }
/** * Create and configure a AJPListener object to the list of subresources * * @param key * The key for the AJPListener resource * @return this */ @SuppressWarnings("unchecked") public T ajpListener(java.lang.String childKey) { ajpListener(childKey, null); return (T) this; }
/** * Install a supplied AJPListener object to the list of subresources */ @SuppressWarnings("unchecked") public T ajpListener(AJPListenerSupplier supplier) { ajpListener(supplier.get()); return (T) this; }
/** * Install a supplied AJPListener object to the list of subresources */ @SuppressWarnings("unchecked") public T ajpListener(AJPListenerSupplier supplier) { ajpListener(supplier.get()); return (T) this; }
/** * Create and configure a AJPListener object to the list of subresources * * @param key * The key for the AJPListener resource * @param config * The AJPListenerConsumer to use * @return this */ @SuppressWarnings("unchecked") public T ajpListener(java.lang.String childKey, AJPListenerConsumer consumer) { AJPListener<? extends AJPListener> child = new AJPListener<>(childKey); if (consumer != null) { consumer.accept(child); } ajpListener(child); return (T) this; }
/** * Create and configure a AJPListener object to the list of subresources * * @param key * The key for the AJPListener resource * @param config * The AJPListenerConsumer to use * @return this */ @SuppressWarnings("unchecked") public T ajpListener(java.lang.String childKey, AJPListenerConsumer consumer) { AJPListener<? extends AJPListener> child = new AJPListener<>(childKey); if (consumer != null) { consumer.accept(child); } ajpListener(child); return (T) this; }
public void customize() { if (undertow.isEnableAJP()) { undertow.subresources().servers().stream() .filter(server -> server.subresources().ajpListeners().isEmpty()) .forEach(server -> server.ajpListener("ajp", listener -> listener.socketBinding("ajp"))); this.group.socketBinding( new SocketBinding("ajp") .port(undertow.ajpPort())); } }
.forEach(server -> server.ajpListener("ajp", listener -> listener.socketBinding("ajp")));