public class Protocol
extends java.lang.Object
implements com.openexchange.groupware.Component, java.io.Serializable
Protocol - Represents both a mail and transport protocol| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ALL
The all identifier.
|
static Protocol |
PROTOCOL_ALL
All protocols supported.
|
| Constructor and Description |
|---|
Protocol(java.lang.String name)
Initializes a new
Protocol |
Protocol(java.lang.String name,
java.lang.String... aliases)
Initializes a new
Protocol |
Protocol(java.lang.String name,
java.lang.String secureName)
Initializes a new
Protocol |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getAbbreviation() |
java.lang.String[] |
getAliases()
Gets the aliases
|
int |
getMaxCount(java.lang.String host,
boolean primary)
Gets the max. number of concurrent mail accesses for specified mail system host.
|
java.lang.String |
getName()
Gets the name
|
int |
hashCode() |
boolean |
isSupported(java.lang.String protocolName)
Checks if given protocol name is supported by this protocol
|
static Protocol |
parseProtocol(java.lang.String protocol)
Parses specified protocol string whose syntax match pattern:
([a-z]+)(? |
java.lang.String |
toString() |
public static final java.lang.String ALL
public static final Protocol PROTOCOL_ALL
public Protocol(java.lang.String name)
Protocolname - The protocol's name in lower casejava.lang.IllegalArgumentException - If name is nullpublic Protocol(java.lang.String name,
java.lang.String secureName)
Protocolname - The protocol's name in lower casesecureName - The protocol's secure name in lower casejava.lang.IllegalArgumentException - If name is nullpublic Protocol(java.lang.String name,
java.lang.String... aliases)
Protocolname - The protocol's name in lower casealiases - The protocol's aliases in lower casejava.lang.IllegalArgumentException - If name is nullpublic static Protocol parseProtocol(java.lang.String protocol) throws com.openexchange.exception.OXException
http or http_https.protocol - The protocol string to parseProtocolcom.openexchange.exception.OXException - If parsing the specified protocol string failspublic int getMaxCount(java.lang.String host,
boolean primary)
throws com.openexchange.exception.OXException
host - The mail system's host nameprimary - true if host denotes primary account; otherwise falsecom.openexchange.exception.OXException - If max-count setting could not be returned for specified host namepublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String[] getAliases()
public java.lang.String getName()
public int hashCode()
hashCode in class java.lang.Objectpublic boolean isSupported(java.lang.String protocolName)
protocolName - The protocol name to checktrue if supported; otherwise falsepublic java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getAbbreviation()
getAbbreviation in interface com.openexchange.groupware.Component