/** * Create and configure a CustomFilter object to the list of subresources * * @param key * The key for the CustomFilter resource * @return this */ @SuppressWarnings("unchecked") public T customFilter(java.lang.String childKey) { customFilter(childKey, null); return (T) this; }
/** * Create and configure a CustomFilter object to the list of subresources * * @param key * The key for the CustomFilter resource * @return this */ @SuppressWarnings("unchecked") public T customFilter(java.lang.String childKey) { customFilter(childKey, null); return (T) this; }
/** * Install a supplied CustomFilter object to the list of subresources */ @SuppressWarnings("unchecked") public T customFilter(CustomFilterSupplier supplier) { customFilter(supplier.get()); return (T) this; }
/** * Install a supplied CustomFilter object to the list of subresources */ @SuppressWarnings("unchecked") public T customFilter(CustomFilterSupplier supplier) { customFilter(supplier.get()); return (T) this; }
/** * Create and configure a CustomFilter object to the list of subresources * * @param key * The key for the CustomFilter resource * @param config * The CustomFilterConsumer to use * @return this */ @SuppressWarnings("unchecked") public T customFilter(java.lang.String childKey, CustomFilterConsumer consumer) { CustomFilter<? extends CustomFilter> child = new CustomFilter<>( childKey); if (consumer != null) { consumer.accept(child); } customFilter(child); return (T) this; }
/** * Create and configure a CustomFilter object to the list of subresources * * @param key * The key for the CustomFilter resource * @param config * The CustomFilterConsumer to use * @return this */ @SuppressWarnings("unchecked") public T customFilter(java.lang.String childKey, CustomFilterConsumer consumer) { CustomFilter<? extends CustomFilter> child = new CustomFilter<>( childKey); if (consumer != null) { consumer.accept(child); } customFilter(child); return (T) this; }
@Override public void customize() { if (!undertowFractionInstance.isUnsatisfied()) { UndertowFraction undertow = undertowFractionInstance.get(); if (undertow.subresources().filterConfiguration() == null) { undertow.filterConfiguration(); } undertow.subresources().filterConfiguration() .customFilter("wfs-monitor", customFilter -> { customFilter.module("org.wildfly.swarm.monitor:runtime"); customFilter.className("org.wildfly.swarm.monitor.runtime.SecureHttpContexts"); }); undertow.subresources().server("default-server") .subresources().host("default-host") .filterRef("wfs-monitor", f -> { f.priority(100); }); } else { throw new RuntimeException("The monitor fraction requires the undertow fraction!"); } } }
@Override public void customize() { if (!undertowFractionInstance.isUnsatisfied()) { UndertowFraction undertow = undertowFractionInstance.get(); if (undertow.subresources().filterConfiguration() == null) { undertow.filterConfiguration(); } undertow.subresources().filterConfiguration() .customFilter("wfs-openapi", customFilter -> { customFilter.module("org.wildfly.swarm.microprofile.openapi:runtime"); customFilter.className("org.wildfly.swarm.microprofile.openapi.runtime.OpenApiHttpHandler"); }); undertow.subresources().server("default-server") .subresources().host("default-host") .filterRef("wfs-openapi", f -> { f.priority(100); }); } else { throw new RuntimeException("The microprofile-openapi fraction requires the undertow fraction!"); } } }
@Override public void customize() { if (!undertowFractionInstance.isUnsatisfied()) { UndertowFraction undertow = undertowFractionInstance.get(); if (undertow.subresources().filterConfiguration() == null) { undertow.filterConfiguration(); } undertow.subresources().filterConfiguration() .customFilter("wfs-health", customFilter -> { customFilter.module("org.wildfly.swarm.microprofile.health:runtime"); customFilter.className("org.wildfly.swarm.microprofile.health.runtime.SecureHttpContexts"); }); undertow.subresources().server("default-server") .subresources().host("default-host") .filterRef("wfs-health", f -> { f.priority(100); }); } else { throw new RuntimeException("The health fraction requires the undertow fraction!"); } } }