gnu.mail.providers.nntp

Class NNTPTransport


public class NNTPTransport
extends Transport

An NNTP transport provider. This uses an NNTPConnection to handle all the protocol-related functionality.

Field Summary

Fields inherited from class javax.mail.Service

debug, session, url

Constructor Summary

NNTPTransport(Session session, URLName url)
Constructor.

Method Summary

void
close()
Close the connection.
protected boolean
protocolConnect(String host, int port, String username, String password)
Performs the protocol connection.
void
sendMessage(Message message, Address[] addresses)
Post an article.

Methods inherited from class javax.mail.Transport

addTransportListener, notifyTransportListeners, removeTransportListener, send, send, sendMessage

Methods inherited from class javax.mail.Service

addConnectionListener, close, connect, connect, connect, getURLName, isConnected, notifyConnectionListeners, protocolConnect, removeConnectionListener, setConnected, setURLName, toString

Constructor Details

NNTPTransport

public NNTPTransport(Session session,
                     URLName url)
Constructor.

Parameters:
session - the session
url - the connection URL

Method Details

close

public void close()
            throws MessagingException
Close the connection.
Overrides:
close in interface Service

See Also:
NNTPStore.close()


protocolConnect

protected boolean protocolConnect(String host,
                                  int port,
                                  String username,
                                  String password)
            throws MessagingException
Performs the protocol connection.
Overrides:
protocolConnect in interface Service

See Also:
NNTPStore.protocolConnect(String,int,String,String)


sendMessage

public void sendMessage(Message message,
                        Address[] addresses)
            throws MessagingException
Post an article.
Overrides:
sendMessage in interface Transport

Parameters:
message - a MimeMessage
addresses - an array of Address(ignored!)