public class EhloResponse extends Object
This class is thread-safe.
Modifier and Type | Method and Description |
---|---|
String |
getEhloDomain()
Gets the domain provided with the EHLO command (e.g.
|
Optional<Long> |
getMaxMessageSize()
Gets the maximum message size if specified by the server.
|
Set<String> |
getSupportedExtensions()
Gets the raw extensions returned by the server.
|
boolean |
isAuthLoginSupported()
Gets whether LOGIN authentication is supported.
|
boolean |
isAuthPlainSupported()
Gets whether PLAIN authentication is supported.
|
boolean |
isAuthXoauth2Supported()
Gets whether XOAUTH2 authentication is supported.
|
boolean |
isSupported(Extension ext)
Gets whether the specified
Extension is supported by the server. |
static EhloResponse |
parse(String ehloDomain,
Iterable<CharSequence> lines)
Parses an EHLO response.
|
static EhloResponse |
parse(String ehloDomain,
Iterable<CharSequence> lines,
EnumSet<Extension> disabledExtensions)
Parses an EHLO response.
|
public static EhloResponse parse(String ehloDomain, Iterable<CharSequence> lines)
ehloDomain
- the domain provided with the EHLO command (e.g. "example.com" if "EHLO example.com"
was sent to the remote server)lines
- the lines returned by the serverEhloResponse
object representing the responsepublic static EhloResponse parse(String ehloDomain, Iterable<CharSequence> lines, EnumSet<Extension> disabledExtensions)
ehloDomain
- the domain provided with the EHLO command (e.g. "example.com" if "EHLO example.com"
was sent to the remote server)lines
- the lines returned by the serverdisabledExtensions
- extensions which should not be marked as supported in the returned EhloResponse
,
even if the server says it supports themEhloResponse
object representing the responsepublic String getEhloDomain()
public boolean isSupported(Extension ext)
Extension
is supported by the server.public boolean isAuthPlainSupported()
public boolean isAuthLoginSupported()
public boolean isAuthXoauth2Supported()
public Optional<Long> getMaxMessageSize()
Copyright © 2018. All rights reserved.