Java Doc for Session.java in  » Web-Server » Quadcap-Web-Server » com » quadcap » pop3 » client » 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 Server » Quadcap Web Server » com.quadcap.pop3.client 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.quadcap.pop3.client.Session

Session
public class Session (Code)
This class implementes a simple mapping of the POP3 protocol onto methods of a java class.
author:
   Stan Bailes


Field Summary
final public static  intCR
     Useful constant for CR.
final public static  intERR
     Useful constant for ERR status.
final public static  intLF
     Useful constant for LF.
final public static  intOK
     Useful constant for OK status.
 Stringhost
     server portion of host address.
 InputStreamin
     Input (responses) from server.
 OutputStreamout
     Output (commands) to the server.
 intport
     the port portion of the host address.
 ByteArrayOutputStreamresp
     A temporary area used to collect server responses.
 Stringresponse
     The last response, as a string.
 Socketsocket
     Sockect used to communicate with the server.

Constructor Summary
public  Session(String host, int port)
     Construct a POP3 client object.

Method Summary
public  intconnect()
     Open the socket to the server and return the status code for the server's greeting.
public  intdele(String msg)
    
public  intdele(int i)
    
public  intgetResponse()
     Read a response line from the server.
public  InputStreamgetResponse(boolean get)
     Prepare to read multi-line response.
public  InputStreamlist()
    
public  Vectorlist(String msg)
    
public  intpass(String pass)
    
public  intquit()
    
 InputStreamresponseCmd(byte[] cmd, String val)
     Execute a command which expects a multi-line response.
public  InputStreamretr(String msg)
    
public  InputStreamretr(int i)
    
public  intrset()
    
 intsimpleCmd(byte[] cmd, String val)
     Execute a simple command which just expects an OR or ERR response.
public  Vectorstat()
    
public  InputStreamtop(String msg, int lines)
    
public  InputStreamuidl()
    
public  Vectoruidl(String msg)
    
public  intuser(String name)
    
 VectorvectorCmd(byte[] cmd, String val)
     Execute a command which needs to parse the response line.
 voidwriteCmd(byte[] cmd, String val)
     Write a POP3 command and arguments.

Field Detail
CR
final public static int CR(Code)
Useful constant for CR.



ERR
final public static int ERR(Code)
Useful constant for ERR status.



LF
final public static int LF(Code)
Useful constant for LF.



OK
final public static int OK(Code)
Useful constant for OK status.



host
String host(Code)
server portion of host address.



in
InputStream in(Code)
Input (responses) from server.



out
OutputStream out(Code)
Output (commands) to the server.



port
int port(Code)
the port portion of the host address.



resp
ByteArrayOutputStream resp(Code)
A temporary area used to collect server responses.



response
String response(Code)
The last response, as a string.



socket
Socket socket(Code)
Sockect used to communicate with the server.




Constructor Detail
Session
public Session(String host, int port)(Code)
Construct a POP3 client object. Initialize the host/port information, but don't actually open the socket.
Parameters:
  host - the server's host name
Parameters:
  port - the server's port number




Method Detail
connect
public int connect() throws IOException, UnknownHostException(Code)
Open the socket to the server and return the status code for the server's greeting.



dele
public int dele(String msg) throws IOException(Code)



dele
public int dele(int i) throws IOException(Code)



getResponse
public int getResponse() throws IOException(Code)
Read a response line from the server. We expect this to be a string of the form '+OK ...' or '-ERR ...'. OK or ERR.



getResponse
public InputStream getResponse(boolean get) throws IOException(Code)
Prepare to read multi-line response. Return an input stream which must be read to actually get the response.



list
public InputStream list() throws IOException(Code)



list
public Vector list(String msg) throws IOException(Code)



pass
public int pass(String pass) throws IOException(Code)



quit
public int quit() throws IOException(Code)



responseCmd
InputStream responseCmd(byte[] cmd, String val) throws IOException(Code)
Execute a command which expects a multi-line response.



retr
public InputStream retr(String msg) throws IOException(Code)



retr
public InputStream retr(int i) throws IOException(Code)



rset
public int rset() throws IOException(Code)



simpleCmd
int simpleCmd(byte[] cmd, String val) throws IOException(Code)
Execute a simple command which just expects an OR or ERR response.



stat
public Vector stat() throws IOException(Code)



top
public InputStream top(String msg, int lines) throws IOException(Code)



uidl
public InputStream uidl() throws IOException(Code)



uidl
public Vector uidl(String msg) throws IOException(Code)



user
public int user(String name) throws IOException(Code)



vectorCmd
Vector vectorCmd(byte[] cmd, String val) throws IOException(Code)
Execute a command which needs to parse the response line.



writeCmd
void writeCmd(byte[] cmd, String val) throws IOException(Code)
Write a POP3 command and arguments.
Parameters:
  cmd - a byte array containing the command literal
Parameters:
  val - a String to be appended to the 'cmd'



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.