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

org.wildfly.swarm.config.ejb3.MDBDeliveryGroup Maven / Gradle / Ivy

There is a newer version: 2.7.0
Show newest version
package org.wildfly.swarm.config.ejb3;

import org.wildfly.swarm.config.runtime.AttributeDocumentation;
import org.wildfly.swarm.config.runtime.ResourceDocumentation;
import org.wildfly.swarm.config.runtime.SingletonResource;
import org.wildfly.swarm.config.runtime.Address;
import org.wildfly.swarm.config.runtime.ResourceType;
import java.beans.PropertyChangeSupport;
import java.beans.PropertyChangeListener;
import org.wildfly.swarm.config.runtime.ModelNodeBinding;

/**
 * Delivery group to manage delivery for mdbs
 */
@Address("/subsystem=ejb3/mdb-delivery-group=*")
@ResourceType("mdb-delivery-group")
public class MDBDeliveryGroup>
		implements
			org.wildfly.swarm.config.runtime.Keyed {

	private String key;
	private PropertyChangeSupport pcs;
	@AttributeDocumentation("Indicates if delivery for all MDBs belonging to this group is active")
	private Boolean active;

	public MDBDeliveryGroup(java.lang.String key) {
		super();
		this.key = key;
	}

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

	/**
	 * Adds a property change listener
	 */
	public void addPropertyChangeListener(PropertyChangeListener listener) {
		if (null == this.pcs)
			this.pcs = new PropertyChangeSupport(this);
		this.pcs.addPropertyChangeListener(listener);
	}

	/**
	 * Removes a property change listener
	 */
	public void removePropertyChangeListener(
			java.beans.PropertyChangeListener listener) {
		if (this.pcs != null)
			this.pcs.removePropertyChangeListener(listener);
	}

	/**
	 * Indicates if delivery for all MDBs belonging to this group is active
	 */
	@ModelNodeBinding(detypedName = "active")
	public Boolean active() {
		return this.active;
	}

	/**
	 * Indicates if delivery for all MDBs belonging to this group is active
	 */
	@SuppressWarnings("unchecked")
	public T active(java.lang.Boolean value) {
		Object oldValue = this.active;
		this.active = value;
		if (this.pcs != null)
			this.pcs.firePropertyChange("active", oldValue, value);
		return (T) this;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy