Class MultiResponseServiceRequest<TResponse extends ServiceResponse>
- java.lang.Object
-
- microsoft.exchange.webservices.data.core.request.ServiceRequestBase<T>
-
- microsoft.exchange.webservices.data.core.request.SimpleServiceRequestBase<ServiceResponseCollection<TResponse>>
-
- microsoft.exchange.webservices.data.core.request.MultiResponseServiceRequest<TResponse>
-
- Type Parameters:
TResponse- The type of the response.
- Direct Known Subclasses:
ApplyConversationActionRequest,ConvertIdRequest,CopyFolderRequest,CreateAttachmentRequest,CreateFolderRequest,CreateItemRequest,CreateResponseObjectRequest,CreateUserConfigurationRequest,DeleteAttachmentRequest,DeleteFolderRequest,DeleteItemRequest,DeleteUserConfigurationRequest,EmptyFolderRequest,ExecuteDiagnosticMethodRequest,ExpandGroupRequest,ExportItemsRequest,FindFolderRequest,FindItemRequest,GetAttachmentRequest,GetEventsRequest,GetFolderRequest,GetFolderRequestForLoad,GetItemRequest,GetItemRequestForLoad,GetServerTimeZonesRequest,GetUserConfigurationRequest,MoveCopyItemRequest,MoveFolderRequest,ResolveNamesRequest,SendItemRequest,SubscribeToPullNotificationsRequest,SubscribeToPushNotificationsRequest,SubscribeToStreamingNotificationsRequest,SyncFolderHierarchyRequest,SyncFolderItemsRequest,UnsubscribeRequest,UpdateFolderRequest,UpdateItemRequest,UpdateUserConfigurationRequest,UploadItemsRequest
public abstract class MultiResponseServiceRequest<TResponse extends ServiceResponse> extends SimpleServiceRequestBase<ServiceResponseCollection<TResponse>>
Represents a service request that can have multiple response.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedMultiResponseServiceRequest(ExchangeService service, ServiceErrorHandling errorHandlingMode)Initializes a new instance.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract TResponsecreateServiceResponse(ExchangeService service, int responseIndex)Creates the service response.ServiceResponseCollection<TResponse>endExecute(IAsyncResult asyncResult)Ends executing this async request.ServiceResponseCollection<TResponse>execute()Executes this request.protected ServiceErrorHandlinggetErrorHandlingMode()Gets a value indicating how errors should be handled.protected abstract intgetExpectedResponseMessageCount()Gets the expected response message count.protected abstract StringgetResponseMessageXmlElementName()Gets the name of the response message XML element.protected ServiceResponseCollection<TResponse>parseResponse(EwsServiceXmlReader reader)Parses the response.-
Methods inherited from class microsoft.exchange.webservices.data.core.request.SimpleServiceRequestBase
beginExecute, endInternalExecute, internalExecute
-
Methods inherited from class microsoft.exchange.webservices.data.core.request.ServiceRequestBase
buildEwsHttpPoolingWebRequest, buildEwsHttpWebRequest, getEwsHttpWebResponse, getMinimumRequiredServerVersion, getResponseStream, getResponseXmlElementName, getService, getXmlElementName, processWebException, readPreamble, readResponse, readResponse, readSoapFault, throwIfNotSupportedByRequestedServerVersion, traceResponse, validate, validateAndEmitRequest, writeAttributesToXml, writeBodyToXml, writeElementsToXml, writeToXml
-
-
-
-
Constructor Detail
-
MultiResponseServiceRequest
protected MultiResponseServiceRequest(ExchangeService service, ServiceErrorHandling errorHandlingMode) throws Exception
Initializes a new instance.- Parameters:
service- The service.errorHandlingMode- Indicates how errors should be handled.- Throws:
Exception
-
-
Method Detail
-
parseResponse
protected ServiceResponseCollection<TResponse> parseResponse(EwsServiceXmlReader reader) throws Exception
Parses the response.- Specified by:
parseResponsein classServiceRequestBase<ServiceResponseCollection<TResponse extends ServiceResponse>>- Parameters:
reader- The reader.- Returns:
- the Response Object.
- Throws:
Exception- the exception
-
createServiceResponse
protected abstract TResponse createServiceResponse(ExchangeService service, int responseIndex) throws Exception
Creates the service response.- Parameters:
service- The service.responseIndex- Index of the response.- Returns:
- Service response.
- Throws:
Exception- the exception
-
getResponseMessageXmlElementName
protected abstract String getResponseMessageXmlElementName()
Gets the name of the response message XML element.- Returns:
- XML element name
-
getExpectedResponseMessageCount
protected abstract int getExpectedResponseMessageCount()
Gets the expected response message count.- Returns:
- Number of expected response messages.
-
execute
public ServiceResponseCollection<TResponse> execute() throws Exception
Executes this request.- Returns:
- Service response collection.
- Throws:
Exception- the exception
-
endExecute
public ServiceResponseCollection<TResponse> endExecute(IAsyncResult asyncResult) throws Exception
Ends executing this async request.- Parameters:
asyncResult- The async result- Returns:
- Service response collection.
- Throws:
Exception- on error
-
getErrorHandlingMode
protected ServiceErrorHandling getErrorHandlingMode()
Gets a value indicating how errors should be handled.- Returns:
- A value indicating how errors should be handled.
-
-