Source Code Cross Referenced for SMTPSession.java in  » Web-Mail » james-2.3.1 » org » apache » james » smtpserver » 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 » Web Mail » james 2.3.1 » org.apache.james.smtpserver 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /****************************************************************
002:         * Licensed to the Apache Software Foundation (ASF) under one   *
003:         * or more contributor license agreements.  See the NOTICE file *
004:         * distributed with this work for additional information        *
005:         * regarding copyright ownership.  The ASF licenses this file   *
006:         * to you under the Apache License, Version 2.0 (the            *
007:         * "License"); you may not use this file except in compliance   *
008:         * with the License.  You may obtain a copy of the License at   *
009:         *                                                              *
010:         *   http://www.apache.org/licenses/LICENSE-2.0                 *
011:         *                                                              *
012:         * Unless required by applicable law or agreed to in writing,   *
013:         * software distributed under the License is distributed on an  *
014:         * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
015:         * KIND, either express or implied.  See the License for the    *
016:         * specific language governing permissions and limitations      *
017:         * under the License.                                           *
018:         ****************************************************************/package org.apache.james.smtpserver;
019:
020:        import org.apache.james.util.watchdog.Watchdog;
021:        import org.apache.mailet.Mail;
022:
023:        import java.io.IOException;
024:        import java.io.InputStream;
025:        import java.util.HashMap;
026:
027:        /**
028:         * All the handlers access this interface to communicate with
029:         * SMTPHandler object
030:         */
031:
032:        public interface SMTPSession {
033:
034:            // Keys used to store/lookup data in the internal state hash map
035:            public final static String MESG_FAILED = "MESG_FAILED"; // Message failed flag
036:            public final static String SENDER = "SENDER_ADDRESS"; // Sender's email address
037:            public final static String RCPT_LIST = "RCPT_LIST"; // The message recipients
038:            public final static String CURRENT_HELO_MODE = "CURRENT_HELO_MODE"; // HELO or EHLO
039:
040:            /**
041:             * Writes response string to the client
042:             *
043:             * @param respString String that needs to send to the client
044:             */
045:            void writeResponse(String respString);
046:
047:            /**
048:             * Reads a line of characters off the command line.
049:             *
050:             * @return the trimmed input line
051:             * @throws IOException if an exception is generated reading in the input characters
052:             */
053:            String readCommandLine() throws IOException;
054:
055:            /**
056:             * Returns ResponseBuffer, this optimizes the unecessary creation of resources
057:             * by each handler object
058:             *
059:             * @return responseBuffer
060:             */
061:            StringBuffer getResponseBuffer();
062:
063:            /**
064:             * Clears the response buffer, returning the String of characters in the buffer.
065:             *
066:             * @return the data in the response buffer
067:             */
068:            String clearResponseBuffer();
069:
070:            /**
071:             * Returns Inputstream for handling messages and commands
072:             *
073:             * @return InputStream object
074:             */
075:            InputStream getInputStream();
076:
077:            /**
078:             * Returns currently process command name
079:             *
080:             * @return current command name
081:             */
082:            String getCommandName();
083:
084:            /**
085:             * Returns currently process command argument
086:             *
087:             * @return current command argument
088:             */
089:            String getCommandArgument();
090:
091:            /**
092:             * Returns Mail object for message handlers to process
093:             *
094:             * @return Mail object
095:             */
096:            Mail getMail();
097:
098:            /**
099:             * Sets the MailImpl object for further processing
100:             *
101:             * @param mail MailImpl object
102:             */
103:            void setMail(Mail mail);
104:
105:            /**
106:             * Returns host name of the client
107:             *
108:             * @return hostname of the client
109:             */
110:            String getRemoteHost();
111:
112:            /**
113:             * Returns host ip address of the client
114:             *
115:             * @return host ip address of the client
116:             */
117:            String getRemoteIPAddress();
118:
119:            /**
120:             * this makes the message to be dropped inprotocol
121:             *
122:             */
123:            void abortMessage();
124:
125:            /**
126:             * this makes the session to close
127:             *
128:             */
129:            void endSession();
130:
131:            /**
132:             * Returns the session status
133:             *
134:             * @return if the session is open or closed
135:             */
136:            boolean isSessionEnded();
137:
138:            /**
139:             * Returns Map that consists of the state of the SMTPSession
140:             *
141:             * @return map of the current SMTPSession state
142:             */
143:            HashMap getState();
144:
145:            /**
146:             * Resets message-specific, but not authenticated user, state.
147:             *
148:             */
149:            void resetState();
150:
151:            /**
152:             * Returns SMTPHandler service wide configuration
153:             *
154:             * @return SMTPHandlerConfigurationData
155:             */
156:            SMTPHandlerConfigurationData getConfigurationData();
157:
158:            /**
159:             * Sets the blocklisted value
160:             *
161:             * @param blocklisted
162:             */
163:            void setBlockListed(boolean blocklisted);
164:
165:            /**
166:             * Returns the blocklisted status
167:             *
168:             * @return blocklisted
169:             */
170:            boolean isBlockListed();
171:
172:            /**
173:             * Returns whether Relaying is allowed or not
174:             *
175:             * @return the relaying status
176:             */
177:            boolean isRelayingAllowed();
178:
179:            /**
180:             * Returns whether Authentication is required or not
181:             *
182:             * @return authentication required or not
183:             */
184:            boolean isAuthRequired();
185:
186:            /**
187:             * Returns whether remote server needs to send HELO/EHLO
188:             *
189:             * @return HELO/EHLO required or not
190:             */
191:            boolean useHeloEhloEnforcement();
192:
193:            /**
194:             * Returns the user name associated with this SMTP interaction.
195:             *
196:             * @return the user name
197:             */
198:            String getUser();
199:
200:            /**
201:             * Sets the user name associated with this SMTP interaction.
202:             *
203:             * @param userID the user name
204:             */
205:            void setUser(String user);
206:
207:            /**
208:             * Returns Watchdog object used for handling timeout
209:             *
210:             * @return Watchdog object
211:             */
212:            Watchdog getWatchdog();
213:
214:            /**
215:             * Returns the SMTP session id
216:             *
217:             * @return SMTP session id
218:             */
219:            String getSessionID();
220:
221:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.