KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > sape > carbon > services > email > MailConfiguration


1 /*
2  * The contents of this file are subject to the Sapient Public License
3  * Version 1.0 (the "License"); you may not use this file except in compliance
4  * with the License. You may obtain a copy of the License at
5  * http://carbon.sf.net/License.html.
6  *
7  * Software distributed under the License is distributed on an "AS IS" basis,
8  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
9  * the specific language governing rights and limitations under the License.
10  *
11  * The Original Code is The Carbon Component Framework.
12  *
13  * The Initial Developer of the Original Code is Sapient Corporation
14  *
15  * Copyright (C) 2003 Sapient Corporation. All Rights Reserved.
16  */

17
18 package org.sape.carbon.services.email;
19
20 import org.sape.carbon.core.component.ComponentConfiguration;
21
22 /**
23  * <p>The configuration interface for the email component.</p>
24  *
25  * <p>Copyright 2002 Sapient</p>
26  * @stereotype configuration
27  * @since carbon 1.0
28  * @author $Author: dvoet $ $Date: 2003/06/27 20:50:23 $
29  * @version $Revision: 1.3
30  */

31 public interface MailConfiguration extends ComponentConfiguration {
32
33     /**
34      * <p>Returns the SMTP host name or ip address.</p>
35      *
36      * @return String The SMTP host name or ip address.
37      */

38     String JavaDoc getSmtpHost();
39
40
41     /**
42      * <p>A boolean property indicating whether or not the email service will
43      * create and keep open a connection to the SMTP host for its lifetime.
44      * If set to true, the connection will not be closed until the email
45      * service is shutdown. If set to false a new connection will be opened
46      * for each email sent.</p>
47      *
48      * @return boolean
49      */

50     boolean getHoldConnection();
51
52
53     /**
54      * <p>Default value for Hold Connection property, if configuration does
55      * not specify Hold Connection, the dafault value would be returned.</p>
56      */

57     boolean HoldConnection = false;
58
59
60     /**
61      * <p>This indicates the number of retry attempts to be made with SMTP
62      * server to send an email.</p>
63      *
64      * @return int
65      */

66     int getRetryAttempts();
67
68
69     /**
70      * <p>Default value for Retry Attempts, if configuration does
71      * not specify Retry Attempts, the dafault value would be returned.</p>
72      */

73     int RetryAttempts = 0;
74
75
76     /**
77      * <p>This indicates the time in milliseconds the thread would sleep
78      * before attempting to re-connect with smtp server. If retry attempts
79      * is 0 you don't need to specify this property.</p>
80      *
81      * @return long
82      */

83     long getSleepTimeInMilliSecs();
84
85
86     /**
87      * <p>Default value for Sleep time, if configuration does
88      * not specify Sleep time, the dafault value would be returned.</p>
89      */

90     long SleepTimeInMilliSecs = 500;
91
92
93     /**
94      * <p>Setter for SMTP host name or ip address. </p>
95      *
96      * @param smtpHost the hostname or ip address
97      */

98     void setSmtpHost(String JavaDoc smtpHost);
99
100
101     /**
102      * <p>Setter for Hold Connection property. </p>
103      *
104      * @param holdConnection indicates the connection should be held
105      */

106     void setHoldConnection(boolean holdConnection);
107
108
109     /**
110      * <p>Setter for Retry attempts. </p>
111      */

112     void setRetryAttempts();
113
114
115     /**
116      * <p>Setter for Sleep time in millisecs. </p>
117      */

118     void setSleepTimeInMilliSecs();
119
120
121     /**
122      * JavaMailDebugMode sets the debug setting in the mail session.
123      * @since carbon 1.2
124      */

125     boolean JavaMailDebugMode = false;
126
127     /**
128      * JavaMailDebugMode sets the debug setting in the mail session.
129      *
130      * @return setting for debug mode
131      * @since carbon 1.2
132      */

133     boolean getJavaMailDebugMode();
134
135     /**
136      * JavaMailDebugMode sets the debug setting in the mail session.
137      *
138      * @param debugMode setting for debug mode
139      * @since carbon 1.2
140      */

141     void setJavaMailDebugMode(boolean debugMode);
142 }
143
Popular Tags