View Javadoc
1   /* 
2   Copyright (c) 2010, NHIN Direct Project
3   All rights reserved.
4   
5   Authors:
6      Umesh Madan     umeshma@microsoft.com
7      Greg Meyer      gm2552@cerner.com
8    
9   Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
10  
11  Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
12  Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer 
13  in the documentation and/or other materials provided with the distribution.  Neither the name of the The NHIN Direct Project (nhindirect.org). 
14  nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
15  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
16  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS 
17  BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE 
18  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 
19  STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 
20  THE POSSIBILITY OF SUCH DAMAGE.
21  */
22  
23  package org.nhindirect.gateway.smtp;
24  
25  import org.nhindirect.stagent.NHINDException;
26  
27  /**
28   * Exceptions thrown by the {@link SmtpAgent}
29   * @author Greg Meyer
30   * @author Umesh Madan
31   *
32   */
33  public class SmtpAgentException extends NHINDException
34  {
35  	static final long serialVersionUID = 8534058110248864799L;
36  	
37      /**
38       * Constructs an exception with an SmtpAgentError.
39       * @param error The smtp agent error
40       */
41      public SmtpAgentException(SmtpAgentError error)
42      {
43      	super(error);
44      }
45      
46  	/**
47  	 * Constructs an exception with a message and the smtp agent error.
48  	 * @param error The smtp agent error
49  	 * @param msg The exception message.
50  	 */    
51      public SmtpAgentException(SmtpAgentError error, String message)
52      {
53      	super(error, message);
54      }
55         
56  	/**
57  	 * Constructs an exception with the smtp agent error and the exception that caused the error.
58  	 * @param error The smtp agent error.
59  	 * @param innerException The exception that caused the error.
60  	 */     
61      public SmtpAgentException(SmtpAgentError error, Exception innerException)
62      {
63      	super(error, innerException);
64      }
65      
66  	/**
67  	 * Constructs an exception with the smtp agent error, a message, and the exception that caused the error.
68  	 * @param error The smtp agent error.
69  	 * @param msg The exception message.
70  	 * @param innerException The exception that caused the error.
71  	 */      
72      public SmtpAgentException(SmtpAgentError error, String message, Exception innerException)
73      {
74      	super(error, message, innerException);
75      }
76  }