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

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

public abstract class AutodiscoverResponseCollection<TResponse extends AutodiscoverResponse>
extends AutodiscoverResponse
implements java.lang.Iterable<TResponse>

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


Constructor Summary
protected 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 responses in the collection.
protected abstract  java.lang.String getResponseCollectionXmlElementName()
          Gets the name of the response collection XML element.
protected abstract  java.lang.String getResponseInstanceXmlElementName()
          Gets the name of the response instance XML element.
protected  java.util.List<TResponse> getResponses()
          Gets the responses.
 TResponse getTResponseAtIndex(int index)
          * Gets the response at the specified index.
 java.util.Iterator<TResponse> iterator()
          Gets an Iterator that iterates through the elements of the collection.
protected  void loadFromXml(microsoft.exchange.webservices.data.EwsXmlReader reader, java.lang.String endElementName)
          * Loads response from XML.
 
Methods inherited from class microsoft.exchange.webservices.data.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

protected AutodiscoverResponseCollection()
* Initializes a new instance of the AutodiscoverResponseCollection class.

Method Detail

getCount

public int getCount()
* Gets the number of responses 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

protected java.util.List<TResponse> getResponses()
Gets the responses.

Returns:
the responses

loadFromXml

protected void loadFromXml(microsoft.exchange.webservices.data.EwsXmlReader reader,
                           java.lang.String endElementName)
                    throws java.lang.Exception
* Loads response from XML.

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

getResponseCollectionXmlElementName

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

Returns:
Response collection XMl element name.

getResponseInstanceXmlElementName

protected abstract java.lang.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 java.util.Iterator<TResponse> iterator()
Gets an Iterator that iterates through the elements of the collection.

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