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

jadex.bridge.ComponentPersistedException Maven / Gradle / Ivy

Go to download

Jadex bridge is a base package for kernels and platforms, i.e., it is used by both and provides commonly used interfaces and classes for active components and their management.

There is a newer version: 4.0.267
Show newest version
package jadex.bridge;


/**
 *  Thrown when operations are invoked after an component has been persisted.
 */
public class ComponentPersistedException	extends RuntimeException
{
	//-------- attributes --------
	
	/** The component identifier. */
	protected IComponentIdentifier cid;
	
	//-------- constructors --------
	
	/**
	 *  Simple constructor for deserialization.
	 */
	public ComponentPersistedException(String message)
	{
		super(message);
	}
	
	/**
	 *	Create an component persited exception.  
	 */
	public ComponentPersistedException(IComponentIdentifier cid)
	{
		super(cid.getName());
		this.cid = cid;
	}

	/**
	 *	Create an component persisted exception.  
	 */
	public ComponentPersistedException(IComponentIdentifier cid, String message)
	{
		super(cid.getName()+": "+message);
		this.cid = cid;
	}

	//-------- methods --------
	
	/**
	 *  Get the component identifier.
	 *  @return The component identifier.
	 */
	public IComponentIdentifier getComponentIdentifier()
	{
		return cid;
	}
	
	/**
	 *  Set the component identifier.
	 */
	public void setComponentIdentifier(IComponentIdentifier cid)
	{
		this.cid	= cid;
	}
	
//	public void printStackTrace()
//	{
//		Thread.dumpStack();
//		super.printStackTrace();
//	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy