View Javadoc

1   package cz.cuni.amis.pogamut.base.component.bus.exception;
2   
3   import java.util.logging.Logger;
4   
5   import cz.cuni.amis.pogamut.base.component.controller.ComponentState;
6   import cz.cuni.amis.pogamut.base.component.exception.ComponentException;
7   
8   /**
9    * This exception is thrown whenever you call some running-state-dependent method from the public interface of
10   * some {@link IComponent}. It means that the component is paused or pausing.
11   *
12   * @author Jimmy
13   */
14  public class ComponentPausedException extends ComponentException {
15  	
16  	/**
17  	 * Constructs a new exception with the specified detail message.
18  	 * <p><p>
19  	 * Not logging anything anywhere on its own.
20  	 * 
21  	 * @param state
22  	 * @param origin which object does produced the exception
23  	 */
24  	public ComponentPausedException(ComponentState state, Object origin) {
25  		super("In state: " + state + ".", origin);
26  	}
27  	
28  	/**
29  	 * Constructs a new exception with the specified detail message.
30  	 * <p><p>
31  	 * Not logging anything anywhere on its own.
32  	 * 
33  	 * @param message
34  	 * @param origin which object does produced the exception
35  	 */
36  	public ComponentPausedException(String message, Object origin) {
37  		super(message, origin);
38  	}
39  	
40  	/**
41  	 * Constructs a new exception with the specified detail message and cause.
42  	 * <p><p>
43  	 * Not logging anything anywhere on its own.
44  	 * 
45  	 * @param message
46  	 * @param cause
47  	 * @param origin which object does produced the exception
48  	 */
49  	public ComponentPausedException(ComponentState state, Throwable cause, Object origin) {
50  		super("In state: " + state + ".", cause, origin);
51  	}
52  	
53  	/**
54  	 * Constructs a new exception with the specified detail message and cause.
55  	 * <p><p>
56  	 * Not logging anything anywhere on its own.
57  	 * 
58  	 * @param message
59  	 * @param cause
60  	 * @param origin which object does produced the exception
61  	 */
62  	public ComponentPausedException(String message, Throwable cause, Object origin) {
63  		super(message, cause, origin);
64  	}
65  
66  	/**
67  	 * Constructs a new exception with the specified detail message.
68  	 * <p><p>
69  	 * Logs the exception via specified Logger.
70  	 * 
71  	 * @param message
72  	 * @param log
73  	 * @param origin which object does produced the exception
74  	 */
75  	public ComponentPausedException(ComponentState state, Logger log, Object origin){
76  		super("In state: " + state + ".", log, origin);
77  	}
78  	
79  	/**
80  	 * Constructs a new exception with the specified detail message.
81  	 * <p><p>
82  	 * Logs the exception via specified Logger.
83  	 * 
84  	 * @param message
85  	 * @param log
86  	 * @param origin which object does produced the exception
87  	 */
88  	public ComponentPausedException(String message, Logger log, Object origin){
89  		super(message, log, origin);
90  	}
91  	
92  	/**
93  	 * Constructs a new exception with the specified detail message and cause.
94  	 * <p><p>
95  	 * Logs the exception via specified Logger.
96  	 * 
97  	 * @param state
98  	 * @param cause
99  	 * @param log
100 	 * @param origin which object does produced the exception
101 	 */
102 	public ComponentPausedException(ComponentState state, Throwable cause, Logger log, Object origin) {
103 		super("In state: " + state + ".", cause, log, origin);
104 	}
105 	
106 	/**
107 	 * Constructs a new exception with the specified detail message and cause.
108 	 * <p><p>
109 	 * Logs the exception via specified Logger.
110 	 * 
111 	 * @param message
112 	 * @param cause
113 	 * @param origin which object does produced the exception
114 	 */
115 	public ComponentPausedException(String message, Throwable cause, Logger log, Object origin) {
116 		super(message, cause, log, origin);
117 	}
118 	
119 }