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

org.unlaxer.jaddress.PoisonPill Maven / Gradle / Ivy

The newest version!

package org.unlaxer.jaddress;

public class PoisonPill implements Runnable{
	
	boolean enable = false;
	
	RuntimeException throwable;
	

	public PoisonPill(RuntimeException throwable) {
		super();
		this.throwable = throwable;
	}
	
	@Override
	public void run() {
		if(enable) {
			throw throwable;
		}
	}


	public Throwable getThrowable() {
		return throwable;
	}

	public void setThrowable(RuntimeException throwable) {
		this.throwable = throwable;
	}

	public boolean isEnable() {
		return enable;
	}

	public void setEnable(boolean enable) {
		this.enable = enable;
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy