Package mireka.filter.proxy
Class BackendClient
- Object
-
- mireka.filter.proxy.BackendClient
-
public class BackendClient extends ObjectBackendClient decorates aClientWithProxyErrorHandlinginstance with memorization of connection state, i.e. previous exceptions.
-
-
Constructor Summary
Constructors Constructor Description BackendClient(BackendServer backendServer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconnect()voiddata(java.io.InputStream data)Sends data to backend server.voidfrom(String from)booleanhasAcceptedRecipient()voidquit()Sends QUIT command and closes the connection.voidrecipient(Recipient recipient)
-
-
-
Constructor Detail
-
BackendClient
public BackendClient(BackendServer backendServer)
-
-
Method Detail
-
connect
public void connect() throws BackendRejectException, org.subethamail.smtp.RejectException- Throws:
BackendRejectExceptionorg.subethamail.smtp.RejectException
-
from
public void from(String from) throws BackendRejectException, org.subethamail.smtp.RejectException- Throws:
BackendRejectExceptionorg.subethamail.smtp.RejectException
-
recipient
public void recipient(Recipient recipient) throws org.subethamail.smtp.RejectException, BackendRejectException
- Throws:
org.subethamail.smtp.RejectExceptionBackendRejectException
-
hasAcceptedRecipient
public boolean hasAcceptedRecipient()
-
data
public void data(java.io.InputStream data) throws org.subethamail.smtp.RejectException, org.subethamail.smtp.TooMuchDataException, java.io.IOExceptionSends data to backend server. It must not be called if no recipient was accepted previously. It does not memorize an exception coming from the backed server, but DATA is expected to be the last command anyway (except QUIT).- Throws:
org.subethamail.smtp.RejectExceptionorg.subethamail.smtp.TooMuchDataExceptionjava.io.IOException
-
quit
public void quit()
Sends QUIT command and closes the connection. This is allowed in any state.
-
-