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

domino.java.capsule.DefaultCapsuleScope Maven / Gradle / Ivy

There is a newer version: 0.3.1
Show newest version
package domino.java.capsule;

/**
 * A capsule scope implementation based on a {@link Iterable}.
 *
 */
public class DefaultCapsuleScope implements CapsuleScope {
	private final Iterable capsules;

	/**
	 * Creates a capsule scope containing the given capsules.
	 * 
	 * @param capsules
	 *            The capsules in this scope.
	 */
	public DefaultCapsuleScope(final Iterable capsules) {
		this.capsules = capsules;
	}

	/**
	 * Stop this stop and therefore all containing capsules.
	 */
	@Override
	public void stop() {
		for (final Capsule capsule : capsules) {
			capsule.stop();
		}
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy