microsoft.exchange.webservices.data.autodiscover
Class AutodiscoverResponseCollection<TResponse extends AutodiscoverResponse>

java.lang.Object
  extended by microsoft.exchange.webservices.data.autodiscover.response.AutodiscoverResponse
      extended by microsoft.exchange.webservices.data.autodiscover.AutodiscoverResponseCollection<TResponse>
Type Parameters:
TResponse - The type of the response in the collection.
All Implemented Interfaces:
Iterable<TResponse>
Direct Known Subclasses:
GetDomainSettingsResponseCollection, GetUserSettingsResponseCollection

public abstract class AutodiscoverResponseCollection<TResponse extends AutodiscoverResponse>
extends AutodiscoverResponse
implements Iterable<TResponse>

Represents a collection of response to a call to the Autodiscover service.


Constructor Summary
AutodiscoverResponseCollection()
          Initializes a new instance of the AutodiscoverResponseCollection class.
 
Method Summary
protected abstract  TResponse createResponseInstance()
          Create a response instance.
 int getCount()
          Gets the number of response in the collection.
protected abstract  String getResponseCollectionXmlElementName()
          Gets the name of the response collection XML element.
protected abstract  String getResponseInstanceXmlElementName()
          Gets the name of the response instance XML element.
 List<TResponse> getResponses()
          Gets the response.
 TResponse getTResponseAtIndex(int index)
          Gets the response at the specified index.
 Iterator<TResponse> iterator()
          Gets an Iterator that iterates through the elements of the collection.
 void loadFromXml(EwsXmlReader reader, String endElementName)
          Loads response from XML.
 
Methods inherited from class microsoft.exchange.webservices.data.autodiscover.response.AutodiscoverResponse
getErrorCode, getErrorMessage, getRedirectionUrl, setErrorCode, setErrorMessage, setRedirectionUrl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AutodiscoverResponseCollection

public AutodiscoverResponseCollection()
Initializes a new instance of the AutodiscoverResponseCollection class.

Method Detail

getCount

public int getCount()
Gets the number of response in the collection.

Returns:
the count

getTResponseAtIndex

public TResponse getTResponseAtIndex(int index)
Gets the response at the specified index.

Parameters:
index - the index
Returns:
the t response at index

getResponses

public List<TResponse> getResponses()
Gets the response.

Returns:
the response

loadFromXml

public void loadFromXml(EwsXmlReader reader,
                        String endElementName)
                 throws Exception
Loads response from XML.

Overrides:
loadFromXml in class AutodiscoverResponse
Parameters:
reader - the reader
endElementName - End element name.
Throws:
Exception - the exception

getResponseCollectionXmlElementName

protected abstract String getResponseCollectionXmlElementName()
Gets the name of the response collection XML element.

Returns:
Response collection XMl element name.

getResponseInstanceXmlElementName

protected abstract String getResponseInstanceXmlElementName()
Gets the name of the response instance XML element.

Returns:
Response collection XMl element name.

createResponseInstance

protected abstract TResponse createResponseInstance()
Create a response instance.

Returns:
TResponse.

iterator

public Iterator<TResponse> iterator()
Gets an Iterator that iterates through the elements of the collection.

Specified by:
iterator in interface Iterable<TResponse extends AutodiscoverResponse>
Returns:
An Iterator for the collection.


Copyright © 2012–2015 Microsoft. All rights reserved.