|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.subethamail.smtp.test.util.Client
public class Client
A crude telnet client that can be used to send SMTP messages and test the responses.
| Constructor Summary | |
|---|---|
Client(String host,
int port)
Establishes a connection to host and port. |
|
| Method Summary | |
|---|---|
void |
close()
|
void |
expect(String expect)
Throws an exception if the response does not start with the specified string. |
void |
expectContains(String expect)
Throws an exception if the response does not contain the specified string. |
protected String |
readResponse()
Get the complete response, including a multiline response. |
void |
send(String msg)
Sends a message to the server, ie "HELO foo.example.com". |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Client(String host,
int port)
throws UnknownHostException,
IOException
IOException
UnknownHostException| Method Detail |
|---|
public void send(String msg)
throws Exception
an - exception if the method cannot send for any reason
Exception
public void expect(String expect)
throws Exception
Exception
public void expectContains(String expect)
throws Exception
Exception
protected String readResponse()
throws Exception
Exception
public void close()
throws Exception
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||