Package alt.javax.mail

# Interface Service

All Known Subinterfaces:
  `Transport`

All Known Implementing Classes:
  `MockService`, `MockTransport`, `ServiceImpl`, `TransportImpl`

public interface Service

## Method Summary

Modifier and Type
Method
Description
`void`
`addConnectionListener(ConnectionListener connectionListener)`
`void`
`close()`
`void`
`connect()`
`void`
`connect(String host, int port, String user, String password)`
`void`
`connect(String host, String user, String password)`
`URLName`
`getURLName()`
`boolean`
`isConnected()`
`void`
`removeConnectionListener(ConnectionListener connectionListener)`
`String`
`toString()`

## Method Details

### connect

void connect() throws MessagingException

Throws:
  `MessagingException`

### connect

void connect(String host, String user, String password) throws MessagingException

Throws:
  `MessagingException`

### connect

void connect(String host, int port, String user, String password) throws MessagingException

Throws:
  `MessagingException`

### isConnected

boolean isConnected()

### close

void close() throws MessagingException

Throws:
  `MessagingException`

### getURLName

URLName getURLName()

### addConnectionListener

void addConnectionListener(ConnectionListener connectionListener)

### removeConnectionListener

void removeConnectionListener(ConnectionListener connectionListener)

### toString

String toString()

Overrides:
  `toString` in class `Object`