public class AutodiscoverService extends ExchangeServiceBase implements IAutodiscoverRedirectionUrl, IFunctionDelegate
Modifier and Type | Field and Description |
---|---|
protected static int |
AutodiscoverMaxRedirections
The Constant AutodiscoverMaxRedirections.
|
httpClient, httpContext, httpPoolingClient
Constructor and Description |
---|
AutodiscoverService()
Initializes a new instance of the "AutodiscoverService" class.
|
AutodiscoverService(ExchangeServiceBase service)
Initializes a new instance of the "AutodiscoverService" class.
|
AutodiscoverService(ExchangeServiceBase service,
ExchangeVersion requestedServerVersion)
Initializes a new instance of the AutodiscoverService class.
|
AutodiscoverService(ExchangeVersion requestedServerVersion)
Initializes a new instance of the "AutodiscoverService" class.
|
AutodiscoverService(String domain)
Initializes a new instance of the "AutodiscoverService" class.
|
AutodiscoverService(String domain,
ExchangeVersion requestedServerVersion)
Initializes a new instance of the "AutodiscoverService" class.
|
AutodiscoverService(URI url)
Initializes a new instance of the "AutodiscoverService" class.
|
AutodiscoverService(URI url,
ExchangeVersion requestedServerVersion)
Initializes a new instance of the "AutodiscoverService" class.
|
AutodiscoverService(URI url,
String domain)
Initializes a new instance of the "AutodiscoverService" class.
|
AutodiscoverService(URI url,
String domain,
ExchangeVersion requestedServerVersion)
Initializes a new instance of the "AutodiscoverService" class.
|
Modifier and Type | Method and Description |
---|---|
boolean |
autodiscoverRedirectionUrlValidationCallback(String redirectionUrl)
Autodiscover redirection url validation callback.
|
Object |
func(List arg1,
List arg2,
ExchangeVersion arg3,
URI arg4)
Func.
|
protected List<String> |
getAutodiscoverServiceHosts(String domainName,
OutParam<Integer> outParam)
Gets the list of autodiscover service hosts.
|
protected List<URI> |
getAutodiscoverServiceUrls(String domainName,
OutParam<Integer> scpHostCount)
Gets the list of autodiscover service URLs.
|
protected String |
getDnsServerAddress()
Gets the dns server address.
|
String |
getDomain()
Gets the domain this service is bound to.
|
GetDomainSettingsResponseCollection |
getDomainSettings(Iterable<String> domains,
ExchangeVersion requestedVersion,
DomainSettingName... domainSettingNames)
Retrieves the specified settings for a set of domains.
|
protected GetDomainSettingsResponseCollection |
getDomainSettings(List<String> domains,
List<DomainSettingName> settings,
ExchangeVersion requestedVersion)
Gets the domain settings using Autodiscover SOAP service.
|
GetDomainSettingsResponse |
getDomainSettings(String domain,
ExchangeVersion requestedVersion,
DomainSettingName... domainSettingNames)
Retrieves the specified settings for a domain.
|
boolean |
getEnableScpLookup()
Gets a value indicating whether the AutodiscoverService should
perform SCP (ServiceConnectionPoint) record lookup when determining
the Autodiscover service URL.
|
protected <TSettings extends ConfigurationSettingsBase> |
getLegacyUserSettings(Class<TSettings> cls,
String emailAddress)
Calls the legacy Autodiscover service to retrieve configuration settings.
|
protected URI |
getRedirectionUrlFromDnsSrvRecord(String domainName)
Get an autodiscover SRV record in DNS and construct autodiscover URL.
|
IAutodiscoverRedirectionUrl |
getRedirectionUrlValidationCallback()
Gets the redirection url validation callback.
|
URI |
getUrl()
Gets the url this service is bound to.
|
protected GetUserSettingsResponseCollection |
getUserSettings(List<String> smtpAddresses,
List<UserSettingName> settings)
Gets the user settings using Autodiscover SOAP service.
|
GetUserSettingsResponse |
getUserSettings(String userSmtpAddress,
UserSettingName... userSettingNames)
Retrieves the specified settings for single SMTP address.
|
GetUserSettingsResponseCollection |
getUsersSettings(Iterable<String> userSmtpAddresses,
UserSettingName... userSettingNames)
Retrieves the specified settings for a set of users.
|
protected GetUserSettingsResponse |
internalGetLegacyUserSettings(String emailAddress,
List<UserSettingName> requestedSettings)
Gets user settings from Autodiscover legacy endpoint.
|
protected GetUserSettingsResponse |
internalGetSoapUserSettings(String smtpAddress,
List<UserSettingName> requestedSettings)
Calls the SOAP Autodiscover service
for user settings for a single SMTP address.
|
Boolean |
isExternal() |
HttpWebRequest |
prepareHttpWebRequestForUrl(URI url)
Creates an HttpWebRequest instance and initializes it with the
appropriate parameters, based on the configuration of this service
object.
|
void |
processHttpErrorResponse(HttpWebRequest httpWebResponse,
Exception webException)
Processes an HTTP error response.
|
protected void |
setDnsServerAddress(String value)
Sets the dns server address.
|
void |
setDomain(String value)
Sets the domain this service is bound to.
|
void |
setEnableScpLookup(boolean value)
Sets the enable scp lookup.
|
protected void |
setIsExternal(Boolean value) |
void |
setRedirectionUrlValidationCallback(IAutodiscoverRedirectionUrl value)
Sets the redirection url validation callback.
|
void |
setUrl(URI value)
Sets the url this service is bound to.
|
void |
traceResponse(HttpWebRequest request,
ByteArrayOutputStream memoryStream)
Traces the response.
|
checkURIPath, close, convertDateTimeToUniversalDateTimeString, createConnectionSocketFactoryRegistry, doOnSerializeCustomSoapHeaders, getAcceptGzipEncoding, getCredentials, getHttpHeaders, getHttpResponseHeaders, getOnSerializeCustomSoapHeaders, getRequestedServerVersion, getServerInfo, getSessionKey, getTimeout, getTraceFlags, getTraceListener, getUseDefaultCredentials, getUserAgent, getWebProxy, internalProcessHttpErrorResponse, isPreAuthenticate, isTraceEnabled, isTraceEnabledFor, prepareCredentials, prepareHttpPoolingWebRequestForUrl, prepareHttpWebRequestForUrl, processHttpResponseHeaders, setAcceptGzipEncoding, setCredentials, setCustomUserAgent, setMaximumPoolingConnections, setOnSerializeCustomSoapHeaders, setPreAuthenticate, setServerInfo, setTimeout, setTraceEnabled, setTraceFlags, setTraceListener, setUseDefaultCredentials, setUserAgent, setWebProxy, traceHttpRequestHeaders, traceMessage, traceXml, validate
protected static final int AutodiscoverMaxRedirections
public AutodiscoverService() throws ArgumentException
ArgumentException
- on validation errorpublic AutodiscoverService(ExchangeVersion requestedServerVersion) throws ArgumentException
requestedServerVersion
- The requested server versionArgumentException
- on validation errorpublic AutodiscoverService(String domain) throws ArgumentException
domain
- The domain that will be used to determine the URL of the serviceArgumentException
- on validation errorpublic AutodiscoverService(String domain, ExchangeVersion requestedServerVersion) throws ArgumentException
domain
- The domain that will be used to determine the URL of the servicerequestedServerVersion
- The requested server versionArgumentException
- on validation errorpublic AutodiscoverService(URI url) throws ArgumentException
url
- The URL of the serviceArgumentException
- on validation errorpublic AutodiscoverService(URI url, ExchangeVersion requestedServerVersion) throws ArgumentException
url
- The URL of the servicerequestedServerVersion
- The requested server versionArgumentException
- on validation errorpublic AutodiscoverService(URI url, String domain) throws ArgumentException
url
- The URL of the servicedomain
- The domain that will be used to determine the URL of the serviceArgumentException
- on validation errorpublic AutodiscoverService(URI url, String domain, ExchangeVersion requestedServerVersion) throws ArgumentException
url
- The URL of the service.domain
- The domain that will be used to determine the URL of the
service.requestedServerVersion
- The requested server version.ArgumentException
- on validation errorpublic AutodiscoverService(ExchangeServiceBase service, ExchangeVersion requestedServerVersion)
service
- The other service.requestedServerVersion
- The requested server version.public AutodiscoverService(ExchangeServiceBase service)
service
- The service.protected <TSettings extends ConfigurationSettingsBase> TSettings getLegacyUserSettings(Class<TSettings> cls, String emailAddress) throws Exception
TSettings
- the generic typecls
- the clsemailAddress
- The email address to retrieve configuration settings for.Exception
- the exceptionprotected URI getRedirectionUrlFromDnsSrvRecord(String domainName) throws Exception
domainName
- Name of the domain.Exception
- the exceptionprotected GetUserSettingsResponse internalGetLegacyUserSettings(String emailAddress, List<UserSettingName> requestedSettings) throws Exception
emailAddress
- The email address to use.requestedSettings
- The requested settings.Exception
- on errorprotected GetUserSettingsResponse internalGetSoapUserSettings(String smtpAddress, List<UserSettingName> requestedSettings) throws Exception
smtpAddress
- SMTP address.requestedSettings
- The requested settings.Exception
- on errorprotected GetUserSettingsResponseCollection getUserSettings(List<String> smtpAddresses, List<UserSettingName> settings) throws Exception
smtpAddresses
- The SMTP addresses of the users.settings
- The settings.Exception
- the exceptionprotected GetDomainSettingsResponseCollection getDomainSettings(List<String> domains, List<DomainSettingName> settings, ExchangeVersion requestedVersion) throws Exception
domains
- The domains.settings
- The settings.requestedVersion
- Requested version of the Exchange service.Exception
- the exceptionprotected List<URI> getAutodiscoverServiceUrls(String domainName, OutParam<Integer> scpHostCount) throws URISyntaxException
domainName
- Domain name.scpHostCount
- Count of hosts found via SCP lookup.URISyntaxException
- the URI Syntax exceptionprotected List<String> getAutodiscoverServiceHosts(String domainName, OutParam<Integer> outParam) throws URISyntaxException, ClassNotFoundException
domainName
- Domain name.outParam
- the out paramURISyntaxException
- the uRI syntax exceptionClassNotFoundException
- the class not found exceptionpublic void traceResponse(HttpWebRequest request, ByteArrayOutputStream memoryStream) throws XMLStreamException, IOException, EWSHttpException
request
- the requestmemoryStream
- the memory streamXMLStreamException
- the XML stream exceptionIOException
- signals that an I/O exception has occurred.EWSHttpException
- the EWS http exceptionpublic HttpWebRequest prepareHttpWebRequestForUrl(URI url) throws ServiceLocalException, URISyntaxException
url
- The URL that the HttpWebRequest should targetServiceLocalException
- the service local exceptionURISyntaxException
- the uRI syntax exceptionpublic void processHttpErrorResponse(HttpWebRequest httpWebResponse, Exception webException) throws Exception
processHttpErrorResponse
in class ExchangeServiceBase
httpWebResponse
- The HTTP web response.webException
- web exceptionException
- the exceptionpublic boolean autodiscoverRedirectionUrlValidationCallback(String redirectionUrl) throws AutodiscoverLocalException
IAutodiscoverRedirectionUrl
autodiscoverRedirectionUrlValidationCallback
in interface IAutodiscoverRedirectionUrl
redirectionUrl
- the redirection urlAutodiscoverLocalException
- the autodiscover local exceptionpublic GetUserSettingsResponse getUserSettings(String userSmtpAddress, UserSettingName... userSettingNames) throws Exception
This method will run the entire Autodiscover "discovery" algorithm and will follow address and URL redirections.
userSmtpAddress
- The SMTP addresses of the user.userSettingNames
- The user setting names.Exception
- on errorpublic GetUserSettingsResponseCollection getUsersSettings(Iterable<String> userSmtpAddresses, UserSettingName... userSettingNames) throws Exception
userSmtpAddresses
- the user smtp addressesuserSettingNames
- The user setting names.Exception
- the exceptionpublic GetDomainSettingsResponse getDomainSettings(String domain, ExchangeVersion requestedVersion, DomainSettingName... domainSettingNames) throws Exception
domain
- The domain.requestedVersion
- Requested version of the Exchange service.domainSettingNames
- The domain setting names.Exception
- the exceptionpublic GetDomainSettingsResponseCollection getDomainSettings(Iterable<String> domains, ExchangeVersion requestedVersion, DomainSettingName... domainSettingNames) throws Exception
domains
- the domainsrequestedVersion
- Requested version of the Exchange service.domainSettingNames
- The domain setting names.Exception
- the exceptionpublic String getDomain()
public void setDomain(String value) throws ArgumentException
value
- the new domainArgumentException
- on validation errorpublic void setUrl(URI value)
value
- the new urlpublic Boolean isExternal()
protected void setIsExternal(Boolean value)
public IAutodiscoverRedirectionUrl getRedirectionUrlValidationCallback()
public void setRedirectionUrlValidationCallback(IAutodiscoverRedirectionUrl value)
value
- the new redirection url validation callbackprotected String getDnsServerAddress()
protected void setDnsServerAddress(String value)
value
- the new dns server addresspublic boolean getEnableScpLookup()
public void setEnableScpLookup(boolean value)
value
- the new enable scp lookuppublic Object func(List arg1, List arg2, ExchangeVersion arg3, URI arg4) throws ServiceLocalException, Exception
IFunctionDelegate
func
in interface IFunctionDelegate
arg1
- the arg1arg2
- the arg2arg3
- the arg3arg4
- the arg4Exception
- the exceptionServiceLocalException
Copyright © 2012–2015 Microsoft. All rights reserved.