Package de.adrianlange.mcd.model.impl
Class SrvRecordMailserverServiceImpl
- java.lang.Object
-
- de.adrianlange.mcd.model.impl.AbstractMailserverService
-
- de.adrianlange.mcd.model.impl.SrvRecordMailserverServiceImpl
-
- All Implemented Interfaces:
MailserverService,SrvRecordMailserverService
public class SrvRecordMailserverServiceImpl extends AbstractMailserverService implements SrvRecordMailserverService
-
-
Constructor Summary
Constructors Constructor Description SrvRecordMailserverServiceImpl(Protocol protocol, SocketType socketType, String host, Integer port, Integer weight)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IntegergetPriority()Priority of the mailserver service.IntegergetWeight()If two services have the same priority, their selection should be based on their weight.voidsetPriority(Integer priority)voidsetWeight(Integer weight)StringtoString()-
Methods inherited from class de.adrianlange.mcd.model.impl.AbstractMailserverService
getConfigurationMethod, getHost, getPort, getProtocol, getSocketType, setConfigurationMethod, setHost, setPort, setProtocol, setSocketType
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface de.adrianlange.mcd.model.MailserverService
getConfigurationMethod, getHost, getPort, getProtocol, getSocketType
-
-
-
-
Constructor Detail
-
SrvRecordMailserverServiceImpl
public SrvRecordMailserverServiceImpl(Protocol protocol, SocketType socketType, String host, Integer port, Integer weight)
-
-
Method Detail
-
getPriority
public Integer getPriority()
Description copied from interface:SrvRecordMailserverServicePriority of the mailserver service. A service with a smaller priority should be preferred over a service with a larger priority. This also applies across protocols, for example, it can be made clear that the connection via IMAP should be preferred to one via POP3.- Specified by:
getPriorityin interfaceSrvRecordMailserverService- Returns:
- Priority of the mailserver service or
nullif not specified
-
setPriority
public void setPriority(Integer priority)
-
getWeight
public Integer getWeight()
Description copied from interface:SrvRecordMailserverServiceIf two services have the same priority, their selection should be based on their weight. If there are two services, one with weight 7 and one with weight 3, the first one should be taken in 70% of cases. This way a load balancing can be configured.- Specified by:
getWeightin interfaceSrvRecordMailserverService- Returns:
- Weight or
nullif not configured.
-
setWeight
public void setWeight(Integer weight)
-
toString
public String toString()
- Overrides:
toStringin classAbstractMailserverService
-
-