All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.wildfly.swarm.config.undertow.HandlerConfiguration Maven / Gradle / Ivy

package org.wildfly.swarm.config.undertow;

import org.wildfly.config.runtime.Implicit;
import org.wildfly.config.runtime.ResourceType;
import org.wildfly.config.runtime.ModelNodeBinding;
import java.util.List;
import org.wildfly.config.runtime.Subresource;
import org.wildfly.swarm.config.undertow.configuration.ReverseProxy;
import org.wildfly.swarm.config.undertow.configuration.File;
/**
 * Undertow handlers
 */
@ResourceType("configuration")
@Implicit
public class HandlerConfiguration {

	private String key;
	private HandlerConfigurationResources subresources = new HandlerConfigurationResources();

	public HandlerConfiguration() {
		this.key = "handler";
	}

	public String getKey() {
		return this.key;
	}

	public HandlerConfigurationResources subresources() {
		return this.subresources;
	}

	/**
	 * Add all org.wildfly.swarm.config.undertow.configuration.ReverseProxy objects to this subresource
	 * @return this
	 * @param value List of org.wildfly.swarm.config.undertow.configuration.ReverseProxy objects.
	 */
	@SuppressWarnings("unchecked")
	public HandlerConfiguration reverseProxys(
			List value) {
		this.subresources.reverseProxys.addAll(value);
		return (HandlerConfiguration) this;
	}

	/**
	 * Add the org.wildfly.swarm.config.undertow.configuration.ReverseProxy object to the list of subresources
	 * @param value The org.wildfly.swarm.config.undertow.configuration.ReverseProxy to add
	 * @return this
	 */
	@SuppressWarnings("unchecked")
	public HandlerConfiguration reverseProxy(ReverseProxy value) {
		this.subresources.reverseProxys.add(value);
		return (HandlerConfiguration) this;
	}

	/**
	 * Add all org.wildfly.swarm.config.undertow.configuration.File objects to this subresource
	 * @return this
	 * @param value List of org.wildfly.swarm.config.undertow.configuration.File objects.
	 */
	@SuppressWarnings("unchecked")
	public HandlerConfiguration files(
			List value) {
		this.subresources.files.addAll(value);
		return (HandlerConfiguration) this;
	}

	/**
	 * Add the org.wildfly.swarm.config.undertow.configuration.File object to the list of subresources
	 * @param value The org.wildfly.swarm.config.undertow.configuration.File to add
	 * @return this
	 */
	@SuppressWarnings("unchecked")
	public HandlerConfiguration file(File value) {
		this.subresources.files.add(value);
		return (HandlerConfiguration) this;
	}

	/**
	 * Child mutators for HandlerConfiguration
	 */
	public class HandlerConfigurationResources {
		/**
		 * A reverse proxy handler
		 */
		private List reverseProxys = new java.util.ArrayList<>();
		/**
		 * File handler
		 */
		private List files = new java.util.ArrayList<>();

		/**
		 * Get the list of org.wildfly.swarm.config.undertow.configuration.ReverseProxy resources
		 * @return the list of resources
		 */
		@Subresource
		public List reverseProxys() {
			return this.reverseProxys;
		}

		/**
		 * Get the list of org.wildfly.swarm.config.undertow.configuration.File resources
		 * @return the list of resources
		 */
		@Subresource
		public List files() {
			return this.files;
		}
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy