org.wildfly.swarm.config.Naming Maven / Gradle / Ivy
package org.wildfly.swarm.config;
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.naming.Binding;
import org.wildfly.swarm.config.naming.RemoteNamingService;
/**
* The configuration of the naming subsystem.
*/
@ResourceType("subsystem")
@Implicit
public class Naming {
private String key;
private NamingResources subresources = new NamingResources();
private RemoteNamingService remoteNamingService;
public Naming() {
this.key = "naming";
}
public String getKey() {
return this.key;
}
public NamingResources subresources() {
return this.subresources;
}
/**
* Add all org.wildfly.swarm.config.naming.Binding objects to this subresource
* @return this
* @param value List of org.wildfly.swarm.config.naming.Binding objects.
*/
@SuppressWarnings("unchecked")
public T bindings(List value) {
this.subresources.bindings.addAll(value);
return (T) this;
}
/**
* Add the org.wildfly.swarm.config.naming.Binding object to the list of subresources
* @param value The org.wildfly.swarm.config.naming.Binding to add
* @return this
*/
@SuppressWarnings("unchecked")
public T binding(Binding value) {
this.subresources.bindings.add(value);
return (T) this;
}
/**
* Child mutators for Naming
*/
public class NamingResources {
/**
* JNDI bindings for primitive types
*/
private List bindings = new java.util.ArrayList<>();
/**
* Get the list of org.wildfly.swarm.config.naming.Binding resources
* @return the list of resources
*/
@Subresource
public List bindings() {
return this.bindings;
}
}
/**
* The remote naming server
*/
@Subresource
public RemoteNamingService remoteNamingService() {
return this.remoteNamingService;
}
/**
* The remote naming server
*/
@SuppressWarnings("unchecked")
public T remoteNamingService(RemoteNamingService value) {
this.remoteNamingService = value;
return (T) this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy