Package mireka.smtp.client
Class BackendServer
- Object
-
- mireka.smtp.client.BackendServer
-
public class BackendServer extends ObjectBackendServer specifies another SMTP server which is used as a proxy target or smarthost. It may be part of anUpstream.
-
-
Constructor Summary
Constructors Constructor Description BackendServer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SmtpClientcreateClient()ClientFactorygetClientFactory()StringgetHost()StringgetPassword()intgetPort()StringgetUser()doublegetWeight()booleanisBackup()voidsetBackup(boolean backup)True indicates that the server should only be used in an Upstream if all non-backup servers failed.voidsetClientFactory(ClientFactory clientFactory)voidsetHost(String host)Sets the domain name or IP address of the backend server.voidsetPassword(String password)voidsetPort(int port)voidsetUser(String user)voidsetWeight(double weight)Relative weight of the server in an Upstream.StringtoString()
-
-
-
Method Detail
-
createClient
public SmtpClient createClient() throws SendException
- Throws:
SendException- if the IP address of the backend server could not be determined based on its domain name.
-
toString
public String toString()
- Overrides:
toStringin classObject
-
getHost
public String getHost()
- Category:
- GETSET
-
setHost
public void setHost(String host)
Sets the domain name or IP address of the backend server. The name may contain a domain name or IPv4 or IPv6 literals in various forms. It guesses the actual type of the name.Examples for legal values:
- mail.example.com
- [192.0.2.0]
- 192.0.2.0
- [IPv6:::1]
- [::1]
- ::1
-
getClientFactory
public ClientFactory getClientFactory()
-
setClientFactory
@Inject public void setClientFactory(ClientFactory clientFactory)
-
getPort
public int getPort()
- Category:
- GETSET
-
setPort
public void setPort(int port)
- Category:
- GETSET
-
getUser
public String getUser()
- Category:
- GETSET
-
setUser
public void setUser(String user)
- Category:
- GETSET
-
getPassword
public String getPassword()
- Category:
- GETSET
-
setPassword
public void setPassword(String password)
- Category:
- GETSET
-
getWeight
public double getWeight()
- Category:
- GETSET
-
setWeight
public void setWeight(double weight)
Relative weight of the server in an Upstream. Default is 1.- Category:
- GETSET
-
isBackup
public boolean isBackup()
- Category:
- GETSET
-
setBackup
public void setBackup(boolean backup)
True indicates that the server should only be used in an Upstream if all non-backup servers failed. Default is false.- Category:
- GETSET
-
-