|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.mail.Service javax.mail.Transport org.apache.geronimo.javamail.transport.nntp.NNTPTransport
public class NNTPTransport
Simple implementation of NNTP transport. Just does plain RFC977-ish delivery.
There is no way to indicate failure for a given recipient (it's possible to have a recipient address rejected). The sun impl throws exceptions even if others successful), but maybe we do a different way...
Field Summary | |
---|---|
protected NNTPConnection |
connection
|
protected static int |
DEFAULT_NNTP_PORT
|
protected static int |
DEFAULT_NNTP_SSL_PORT
|
protected static String |
NNTP_FROM
property keys for protocol properties. |
protected ProtocolProperties |
props
|
Fields inherited from class javax.mail.Service |
---|
debug, session, url |
Constructor Summary | |
---|---|
|
NNTPTransport(Session session,
URLName name)
Normal constructor for an NNTPTransport() object. |
protected |
NNTPTransport(Session session,
URLName name,
String protocol,
int defaultPort,
boolean sslConnection)
Common constructor used by the POP3Store and POP3SSLStore classes to do common initialization of defaults. |
Method Summary | |
---|---|
void |
close()
Close the connection. |
protected boolean |
protocolConnect(String host,
int port,
String username,
String password)
Do the protocol connection for an NNTP transport. |
void |
sendMessage(Message message,
Address[] addresses)
Send a message to multiple addressees. |
Methods inherited from class javax.mail.Transport |
---|
addTransportListener, notifyTransportListeners, removeTransportListener, send, send |
Methods inherited from class javax.mail.Service |
---|
addConnectionListener, connect, connect, connect, connect, finalize, getURLName, isConnected, notifyConnectionListeners, queueEvent, removeConnectionListener, setConnected, setURLName, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static final String NNTP_FROM
protected static final int DEFAULT_NNTP_PORT
protected static final int DEFAULT_NNTP_SSL_PORT
protected ProtocolProperties props
protected NNTPConnection connection
Constructor Detail |
---|
public NNTPTransport(Session session, URLName name)
session
- The attached session.name
- An optional URLName object containing target information.protected NNTPTransport(Session session, URLName name, String protocol, int defaultPort, boolean sslConnection)
session
- The host session instance.name
- The URLName of the target.protocol
- The protocol type ("pop3"). This helps us in
retrieving protocol-specific session properties.defaultPort
- The default port used by this protocol. For pop3, this will
be 110. The default for pop3 with ssl is 995.sslConnection
- Indicates whether an SSL connection should be used to initial
contact the server. This is different from the STARTTLS
support, which switches the connection to SSL after the
initial startup.Method Detail |
---|
protected boolean protocolConnect(String host, int port, String username, String password) throws MessagingException
protocolConnect
in class Service
host
- The target host name.port
- The server port number.user
- The authentication user (if any).password
- The server password. Might not be sent directly if more
sophisticated authentication is used.
MessagingException
public void sendMessage(Message message, Address[] addresses) throws MessagingException
sendMessage
in class Transport
message
- The message we're sending.addresses
- An array of addresses to send to.
MessagingException
public void close() throws MessagingException
close
in class Service
MessagingException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |