gnu.mail.providers.pop3
Class POP3Store

java.lang.Object
  extended by javax.mail.Service
      extended by javax.mail.Store
          extended by gnu.mail.providers.pop3.POP3Store

public final class POP3Store
extends Store

The storage class implementing the POP3 mail protocol.

Version:
1.3
Author:
Chris Burdess, Nic Ferrier

Field Summary
 
Fields inherited from class javax.mail.Service
debug, session, url
 
Constructor Summary
POP3Store(Session session, URLName urlname)
          Constructor.
 
Method Summary
 void close()
          Closes the connection.
 Folder getDefaultFolder()
          Returns the root folder.
 Folder getFolder(java.lang.String s)
          Returns the folder with the specified name.
 Folder getFolder(URLName urlname)
          Returns the folder whose name is the file part of the specified URLName.
protected  javax.net.ssl.TrustManager getTrustManager()
          Returns a trust manager used for TLS negotiation.
protected  boolean protocolConnect(java.lang.String host, int port, java.lang.String username, java.lang.String password)
          Connects to the POP3 server and authenticates with the specified parameters.
 
Methods inherited from class javax.mail.Store
addFolderListener, addStoreListener, getPersonalNamespaces, getSharedNamespaces, getUserNamespaces, notifyFolderListeners, notifyFolderRenamedListeners, notifyStoreListeners, removeFolderListener, removeStoreListener
 
Methods inherited from class javax.mail.Service
addConnectionListener, connect, connect, connect, getURLName, isConnected, notifyConnectionListeners, queueEvent, removeConnectionListener, setConnected, setURLName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

POP3Store

public POP3Store(Session session,
                 URLName urlname)
Constructor.

Method Detail

protocolConnect

protected boolean protocolConnect(java.lang.String host,
                                  int port,
                                  java.lang.String username,
                                  java.lang.String password)
                           throws MessagingException
Connects to the POP3 server and authenticates with the specified parameters.

Overrides:
protocolConnect in class Service
Parameters:
host - the name of the host to connect to
port - the port to use (-1 for the default port)
username - the username
password - the password
Returns:
true on success, false if authentication failed
Throws:
AuthenticationFailedException - on authentication failure
MessagingException - for non-authentication failures

getTrustManager

protected javax.net.ssl.TrustManager getTrustManager()
                                              throws MessagingException
Returns a trust manager used for TLS negotiation.

Throws:
MessagingException

close

public void close()
           throws MessagingException
Closes the connection.

Overrides:
close in class Service
Throws:
MessagingException

getDefaultFolder

public Folder getDefaultFolder()
                        throws MessagingException
Returns the root folder.

Specified by:
getDefaultFolder in class Store
Throws:
MessagingException

getFolder

public Folder getFolder(java.lang.String s)
                 throws MessagingException
Returns the folder with the specified name.

Specified by:
getFolder in class Store
Parameters:
s - the folder name
Throws:
MessagingException

getFolder

public Folder getFolder(URLName urlname)
                 throws MessagingException
Returns the folder whose name is the file part of the specified URLName.

Specified by:
getFolder in class Store
Parameters:
urlname - a URLName denoting a folder
Throws:
MessagingException


© Copyright 2003, 2004 The Free Software Foundation, All rights reserved