Source Code Cross Referenced for SMTPMBean.java in  » JMX » mx4j » mx4j » tools » mail » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » JMX » mx4j » mx4j.tools.mail 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright (C) The MX4J Contributors.
003:         * All rights reserved.
004:         *
005:         * This software is distributed under the terms of the MX4J License version 1.0.
006:         * See the terms of the MX4J License in the documentation provided with this software.
007:         */
008:
009:        package mx4j.tools.mail;
010:
011:        import javax.management.ObjectName;
012:
013:        /**
014:         * Management Interface of a SMTP MBean.
015:         * <p/>
016:         * This MBean is meant to send a mail given certain situation. It may be used to listen to a monitor
017:         * or timer and send a mail.
018:         * <p/>
019:         * To use it you need to add to your classpath the mail.jar from the JavaMail API and the activation.jar
020:         * from the Java Activation Framework.
021:         * <p/>
022:         * Besides you need to configure all the required fields, at least the serverHost and To fields and if your server
023:         * requires login also the serverUsername and serverPassword fields
024:         * <p/>
025:         * The subject and content fields are subject to keyword expansions, i.e. some keyworks put between $ signs will
026:         * be exapnded this can be used to give a more informative message. The current available expansions are
027:         * <p/>
028:         * $date$ -> Current date formatted with locale format
029:         * $time$ -> Current tim formatted with locale format
030:         * $datetime$ -> Current date and time formatted with locale format
031:         * $notification$ -> Notification type
032:         * $observed$ -> ObjectName of the observed object
033:         * $objectname$ -> This MBean's objectname
034:         *
035:         * @version $Revision: 1.4 $
036:         */
037:        public interface SMTPMBean {
038:            /**
039:             * Gets the MBean's objectname which is being listened
040:             */
041:            public ObjectName getObservedObject();
042:
043:            /**
044:             * Sets the observed object. It is expected that the observed MBean is a NotificationBroadcster
045:             * On the contrary the MBean will not be listening to events
046:             */
047:            public void setObservedObject(ObjectName targetMBeanName);
048:
049:            /**
050:             * Returns the notification which will trigger the mail sending
051:             */
052:            public String getNotificationName();
053:
054:            /**
055:             * Sets the notification name which will trigger the mail sending. If it is null any notification
056:             * will trigger a mail
057:             */
058:            public void setNotificationName(String notificationName);
059:
060:            /**
061:             * Gets the server's host as name or IP
062:             */
063:            public String getServerHost();
064:
065:            /**
066:             * Sets the server's host, it can be set as name or IP
067:             */
068:            public void setServerHost(String host);
069:
070:            /**
071:             * Sets the server's port.
072:             */
073:            public void setServerPort(int port);
074:
075:            /**
076:             * Gets the server's port, by default is 25
077:             */
078:            public int getServerPort();
079:
080:            /**
081:             * Sets server's username, use with setLoginToServer(true)
082:             */
083:            public void setServerUsername(String username);
084:
085:            /**
086:             * Gets the username to log to the server
087:             */
088:            public String getServerUsername();
089:
090:            /**
091:             * Sets server's passowrd, use with setLoginToServer(true) and setServerUsername
092:             */
093:            public void setServerPassword(String password);
094:
095:            /**
096:             * Sets whether to login to the SMTP server
097:             */
098:            public void setLoginToServer(boolean login);
099:
100:            /**
101:             * Indicates whether login to the SMTP server will be attpemted
102:             */
103:            public boolean isLoginToServer();
104:
105:            /**
106:             * Sets the send timeout, by default it is 10 secs
107:             */
108:            public void setTimeout(int timeout);
109:
110:            /**
111:             * Returns the timeout used when sending mails
112:             */
113:            public int getTimeout();
114:
115:            /**
116:             * Gets the from address attached to mails
117:             */
118:            public String getFromAddress();
119:
120:            /**
121:             * Sets the form address set to mail
122:             */
123:            public void setFromAddress(String fromAddress);
124:
125:            /**
126:             * Gets the from name presented on the mail
127:             */
128:            public String getFromName();
129:
130:            /**
131:             * Sets the from name presented on the mail
132:             */
133:            public void setFromName(String fromName);
134:
135:            /**
136:             * Gets the MIME type set to the mail
137:             */
138:            public String getMimeType();
139:
140:            /**
141:             * Sets the MIME type, by default it is text/plain
142:             */
143:            public void setMimeType(String mimeType);
144:
145:            /**
146:             * Gets a comma separated list of addresses set in the TO field
147:             */
148:            public String getTo();
149:
150:            /**
151:             * Sets a comma separated list of address which will go in the TO mail field
152:             */
153:            public void setTo(String toAddresses);
154:
155:            /**
156:             * Gets a comma separated list of addresses set in the BCC field
157:             */
158:            public String getBCC();
159:
160:            /**
161:             * Sets a comma separated list of address which will go in the BCC mail field
162:             */
163:            public void setBCC(String bccAddresses);
164:
165:            /**
166:             * Gets a comma separated list of addresses set in the CC field
167:             */
168:            public String getCC();
169:
170:            /**
171:             * Sets a comma separated list of address which will go in the CC mail field
172:             */
173:            public void setCC(String ccAddresses);
174:
175:            /**
176:             * Gets the mail subject
177:             */
178:            public String getSubject();
179:
180:            /**
181:             * Sets the mail's subject, by default is Empty subject. The subject field can contain keyword expansion
182:             */
183:            public void setSubject(String subject);
184:
185:            /**
186:             * Returns the content of the mail
187:             */
188:            public String getContent();
189:
190:            /**
191:             * Sets the content of the mail
192:             */
193:            public void setContent(String content);
194:
195:            /**
196:             * This will directly execute the send mail. It can be used to manually testing the MBean or direct execution
197:             */
198:            public void sendMail();
199:
200:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.