Java Doc for POP3.java in  » Net » Apache-commons-net-1.4.1 » org » apache » commons » net » pop3 » 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 » Net » Apache commons net 1.4.1 » org.apache.commons.net.pop3 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.commons.net.SocketClient
      org.apache.commons.net.pop3.POP3

All known Subclasses:   org.apache.commons.net.pop3.POP3Client,
POP3
public class POP3 extends SocketClient (Code)
The POP3 class is not meant to be used by itself and is provided only so that you may easily implement your own POP3 client if you so desire. If you have no need to perform your own implementation, you should use org.apache.commons.net.pop3.POP3Client .

Rather than list it separately for each method, we mention here that every method communicating with the server and throwing an IOException can also throw a org.apache.commons.net.MalformedServerReplyException , which is a subclass of IOException. A MalformedServerReplyException will be thrown when the reply received from the server deviates enough from the protocol specification that it cannot be interpreted in a useful manner despite attempts to be as lenient as possible.


author:
   Daniel F. Savarese
See Also:   POP3Client
See Also:   org.apache.commons.net.MalformedServerReplyException



Field Summary
final public static  intAUTHORIZATION_STATE
     A constant representing the POP3 authorization state.
final public static  intDEFAULT_PORT
     The default POP3 port.
final public static  intDISCONNECTED_STATE
     A constant representing the state where the client is not yet connected to a POP3 server.
final public static  intTRANSACTION_STATE
     A constant representing the POP3 transaction state.
final public static  intUPDATE_STATE
     A constant representing the POP3 update state.
final static  String_ERROR
    
final static  String_OK
    
protected  ProtocolCommandSupport_commandSupport_
     A ProtocolCommandSupport object used to manage the registering of ProtocolCommandListeners and te firing of ProtocolCommandEvents.
 String_lastReplyLine
    
 BufferedReader_reader
    
 int_replyCode
    
 Vector_replyLines
    

Constructor Summary
public  POP3()
     The default POP3Client constructor.

Method Summary
protected  void_connectAction_()
     Performs connection initialization and sets state to AUTHORIZATION_STATE .
public  voidaddProtocolCommandListener(ProtocolCommandListener listener)
     Adds a ProtocolCommandListener.
public  voiddisconnect()
     Disconnects the client from the server, and sets the state to DISCONNECTED_STATE .
public  voidgetAdditionalReply()
     Retrieves the additional lines of a multi-line server reply.
public  StringgetReplyString()
     Returns the reply to the last command sent to the server. The value is a single string containing all the reply lines including newlines.
public  String[]getReplyStrings()
     Returns an array of lines received as a reply to the last command sent to the server.
public  intgetState()
     Returns the current POP3 client state.
public  voidremoveProtocolCommandistener(ProtocolCommandListener listener)
     Removes a ProtocolCommandListener.
public  intsendCommand(String command, String args)
     Sends a command an arguments to the server and returns the reply code.


Parameters:
  command - The POP3 command to send.
Parameters:
  args - The command arguments.

public  intsendCommand(String command)
     Sends a command with no arguments to the server and returns the reply code.


Parameters:
  command - The POP3 command to send.

public  intsendCommand(int command, String args)
     Sends a command an arguments to the server and returns the reply code.


Parameters:
  command - The POP3 command to send(one of the POP3Command constants).
Parameters:
  args - The command arguments.

public  intsendCommand(int command)
     Sends a command with no arguments to the server and returns the reply code.


Parameters:
  command - The POP3 command to send(one of the POP3Command constants).

public  voidsetState(int state)
     Sets POP3 client state.

Field Detail
AUTHORIZATION_STATE
final public static int AUTHORIZATION_STATE(Code)
A constant representing the POP3 authorization state. **



DEFAULT_PORT
final public static int DEFAULT_PORT(Code)
The default POP3 port. Set to 110 according to RFC 1288. **



DISCONNECTED_STATE
final public static int DISCONNECTED_STATE(Code)
A constant representing the state where the client is not yet connected to a POP3 server.



TRANSACTION_STATE
final public static int TRANSACTION_STATE(Code)
A constant representing the POP3 transaction state. **



UPDATE_STATE
final public static int UPDATE_STATE(Code)
A constant representing the POP3 update state. **



_ERROR
final static String _ERROR(Code)



_OK
final static String _OK(Code)



_commandSupport_
protected ProtocolCommandSupport _commandSupport_(Code)
A ProtocolCommandSupport object used to manage the registering of ProtocolCommandListeners and te firing of ProtocolCommandEvents.



_lastReplyLine
String _lastReplyLine(Code)



_reader
BufferedReader _reader(Code)



_replyCode
int _replyCode(Code)



_replyLines
Vector _replyLines(Code)




Constructor Detail
POP3
public POP3()(Code)
The default POP3Client constructor. Initializes the state to DISCONNECTED_STATE.




Method Detail
_connectAction_
protected void _connectAction_() throws IOException(Code)
Performs connection initialization and sets state to AUTHORIZATION_STATE .



addProtocolCommandListener
public void addProtocolCommandListener(ProtocolCommandListener listener)(Code)
Adds a ProtocolCommandListener. Delegates this task to POP3._commandSupport_ _commandSupport_ .


Parameters:
  listener - The ProtocolCommandListener to add.




disconnect
public void disconnect() throws IOException(Code)
Disconnects the client from the server, and sets the state to DISCONNECTED_STATE . The reply text information from the last issued command is voided to allow garbage collection of the memory used to store that information.


exception:
  IOException - If there is an error in disconnecting.




getAdditionalReply
public void getAdditionalReply() throws IOException(Code)
Retrieves the additional lines of a multi-line server reply.



getReplyString
public String getReplyString()(Code)
Returns the reply to the last command sent to the server. The value is a single string containing all the reply lines including newlines. If the reply is a single line, but its format ndicates it should be a multiline reply, then you must call POP3.getAdditionalReply getAdditionalReply() to fetch the rest of the reply, and then call getReplyString again. You only have to worry about this if you are implementing your own client using the POP3.sendCommand sendCommand methods.

The last server response.




getReplyStrings
public String[] getReplyStrings()(Code)
Returns an array of lines received as a reply to the last command sent to the server. The lines have end of lines truncated. If the reply is a single line, but its format ndicates it should be a multiline reply, then you must call POP3.getAdditionalReply getAdditionalReply() to fetch the rest of the reply, and then call getReplyStrings again. You only have to worry about this if you are implementing your own client using the POP3.sendCommand sendCommand methods.

The last server response.




getState
public int getState()(Code)
Returns the current POP3 client state.

The current POP3 client state.




removeProtocolCommandistener
public void removeProtocolCommandistener(ProtocolCommandListener listener)(Code)
Removes a ProtocolCommandListener. Delegates this task to POP3._commandSupport_ _commandSupport_ .


Parameters:
  listener - The ProtocolCommandListener to remove.




sendCommand
public int sendCommand(String command, String args) throws IOException(Code)
Sends a command an arguments to the server and returns the reply code.


Parameters:
  command - The POP3 command to send.
Parameters:
  args - The command arguments. The server reply code (either POP3Reply.OK or POP3Reply.ERROR).




sendCommand
public int sendCommand(String command) throws IOException(Code)
Sends a command with no arguments to the server and returns the reply code.


Parameters:
  command - The POP3 command to send. The server reply code (either POP3Reply.OK or POP3Reply.ERROR).




sendCommand
public int sendCommand(int command, String args) throws IOException(Code)
Sends a command an arguments to the server and returns the reply code.


Parameters:
  command - The POP3 command to send(one of the POP3Command constants).
Parameters:
  args - The command arguments. The server reply code (either POP3Reply.OK or POP3Reply.ERROR).




sendCommand
public int sendCommand(int command) throws IOException(Code)
Sends a command with no arguments to the server and returns the reply code.


Parameters:
  command - The POP3 command to send(one of the POP3Command constants). The server reply code (either POP3Reply.OK or POP3Reply.ERROR).




setState
public void setState(int state)(Code)
Sets POP3 client state. This must be one of the _STATE constants.


Parameters:
  state - The new state.




Fields inherited from org.apache.commons.net.SocketClient
final public static String NETASCII_EOL(Code)(Java Doc)
protected int _defaultPort_(Code)(Java Doc)
protected InputStream _input_(Code)(Java Doc)
protected boolean _isConnected_(Code)(Java Doc)
protected OutputStream _output_(Code)(Java Doc)
protected SocketFactory _socketFactory_(Code)(Java Doc)
protected Socket _socket_(Code)(Java Doc)
protected int _timeout_(Code)(Java Doc)

Methods inherited from org.apache.commons.net.SocketClient
protected void _connectAction_() throws IOException(Code)(Java Doc)
public void connect(InetAddress host, int port) throws SocketException, IOException(Code)(Java Doc)
public void connect(String hostname, int port) throws SocketException, IOException(Code)(Java Doc)
public void connect(InetAddress host, int port, InetAddress localAddr, int localPort) throws SocketException, IOException(Code)(Java Doc)
public void connect(String hostname, int port, InetAddress localAddr, int localPort) throws SocketException, IOException(Code)(Java Doc)
public void connect(InetAddress host) throws SocketException, IOException(Code)(Java Doc)
public void connect(String hostname) throws SocketException, IOException(Code)(Java Doc)
public void disconnect() throws IOException(Code)(Java Doc)
public int getDefaultPort()(Code)(Java Doc)
public int getDefaultTimeout()(Code)(Java Doc)
public InetAddress getLocalAddress()(Code)(Java Doc)
public int getLocalPort()(Code)(Java Doc)
public InetAddress getRemoteAddress()(Code)(Java Doc)
public int getRemotePort()(Code)(Java Doc)
public int getSoLinger() throws SocketException(Code)(Java Doc)
public int getSoTimeout() throws SocketException(Code)(Java Doc)
public boolean getTcpNoDelay() throws SocketException(Code)(Java Doc)
public boolean isConnected()(Code)(Java Doc)
public void setDefaultPort(int port)(Code)(Java Doc)
public void setDefaultTimeout(int timeout)(Code)(Java Doc)
public void setSoLinger(boolean on, int val) throws SocketException(Code)(Java Doc)
public void setSoTimeout(int timeout) throws SocketException(Code)(Java Doc)
public void setSocketFactory(SocketFactory factory)(Code)(Java Doc)
public void setTcpNoDelay(boolean on) throws SocketException(Code)(Java Doc)
public boolean verifyRemote(Socket socket)(Code)(Java Doc)

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.