jodd.mail
Class Pop3Server

java.lang.Object
  extended by jodd.mail.Pop3Server
All Implemented Interfaces:
ReceiveMailSessionProvider
Direct Known Subclasses:
Pop3SslServer

public class Pop3Server
extends java.lang.Object
implements ReceiveMailSessionProvider

Represents simple plain POP server for sending emails.


Field Summary
protected  javax.mail.Authenticator authenticator
           
protected static int DEFAULT_POP3_PORT
           
protected  java.lang.String host
           
protected static java.lang.String MAIL_POP3_AUTH
           
protected static java.lang.String MAIL_POP3_HOST
           
protected static java.lang.String MAIL_POP3_PORT
           
protected  int port
           
protected static java.lang.String PROTOCOL_POP3
           
protected  java.util.Properties sessionProperties
           
 
Constructor Summary
Pop3Server(java.lang.String host)
          POP3 server defined with its host and default port.
Pop3Server(java.lang.String host, javax.mail.Authenticator authenticator)
           
Pop3Server(java.lang.String host, int port)
          POP3 server defined with its host and port.
Pop3Server(java.lang.String host, int port, javax.mail.Authenticator authenticator)
          SMTP server defined with its host and authentication.
Pop3Server(java.lang.String host, int port, java.lang.String username, java.lang.String password)
           
 
Method Summary
 ReceiveMailSession createSession()
          Creates new receiving mail session.
protected  java.util.Properties createSessionProperties()
          Prepares mail session properties.
 javax.mail.Authenticator getAuthenticator()
          Returns authenticator.
 java.lang.String getHost()
          Returns POP host address.
 int getPort()
          Returns current port.
protected  javax.mail.Store getStore(javax.mail.Session session)
          Returns email store.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAIL_POP3_PORT

protected static final java.lang.String MAIL_POP3_PORT
See Also:
Constant Field Values

MAIL_POP3_HOST

protected static final java.lang.String MAIL_POP3_HOST
See Also:
Constant Field Values

MAIL_POP3_AUTH

protected static final java.lang.String MAIL_POP3_AUTH
See Also:
Constant Field Values

PROTOCOL_POP3

protected static final java.lang.String PROTOCOL_POP3
See Also:
Constant Field Values

DEFAULT_POP3_PORT

protected static final int DEFAULT_POP3_PORT
See Also:
Constant Field Values

host

protected final java.lang.String host

port

protected final int port

authenticator

protected final javax.mail.Authenticator authenticator

sessionProperties

protected final java.util.Properties sessionProperties
Constructor Detail

Pop3Server

public Pop3Server(java.lang.String host)
POP3 server defined with its host and default port.


Pop3Server

public Pop3Server(java.lang.String host,
                  int port)
POP3 server defined with its host and port.


Pop3Server

public Pop3Server(java.lang.String host,
                  javax.mail.Authenticator authenticator)

Pop3Server

public Pop3Server(java.lang.String host,
                  int port,
                  java.lang.String username,
                  java.lang.String password)

Pop3Server

public Pop3Server(java.lang.String host,
                  int port,
                  javax.mail.Authenticator authenticator)
SMTP server defined with its host and authentication.

Method Detail

createSessionProperties

protected java.util.Properties createSessionProperties()
Prepares mail session properties.


createSession

public ReceiveMailSession createSession()
Creates new receiving mail session.

Specified by:
createSession in interface ReceiveMailSessionProvider

getStore

protected javax.mail.Store getStore(javax.mail.Session session)
                             throws javax.mail.NoSuchProviderException
Returns email store.

Throws:
javax.mail.NoSuchProviderException

getHost

public java.lang.String getHost()
Returns POP host address.


getAuthenticator

public javax.mail.Authenticator getAuthenticator()
Returns authenticator.


getPort

public int getPort()
Returns current port.



Copyright © 2003-2013 Jodd Team