public class NNTPTransport extends Transport
Constructor and Description |
---|
NNTPTransport(Session session,
URLName url)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the connection.
|
protected boolean |
protocolConnect(java.lang.String host,
int port,
java.lang.String username,
java.lang.String password)
Performs the protocol connection.
|
void |
sendMessage(Message message,
Address[] addresses)
Post an article.
|
addTransportListener, notifyTransportListeners, removeTransportListener, send, send, send, send
addConnectionListener, connect, connect, connect, connect, getURLName, isConnected, notifyConnectionListeners, queueEvent, removeConnectionListener, setConnected, setURLName, toString
protected boolean protocolConnect(java.lang.String host, int port, java.lang.String username, java.lang.String password) throws MessagingException
protocolConnect
in class Service
host
- the name of the host to connect toport
- the port to use (-1 for the default port)username
- the usernamepassword
- the passwordAuthenticationFailedException
- on authentication failureMessagingException
- for non-authentication failuresNNTPStore.protocolConnect(java.lang.String, int, java.lang.String, java.lang.String)
public void close() throws MessagingException
close
in class Service
MessagingException
NNTPStore.close()
public void sendMessage(Message message, Address[] addresses) throws MessagingException
sendMessage
in class Transport
message
- a MimeMessageaddresses
- an array of Address(ignored!)SendFailedException
- if the send failed because of
invalid addressesMessagingException
- if the transport is not connected