microsoft.exchange.webservices.data.core.request
Class UnsubscribeRequest

java.lang.Object
  extended by microsoft.exchange.webservices.data.core.request.ServiceRequestBase<T>
      extended by microsoft.exchange.webservices.data.core.request.SimpleServiceRequestBase<ServiceResponseCollection<TResponse>>
          extended by microsoft.exchange.webservices.data.core.request.MultiResponseServiceRequest<ServiceResponse>
              extended by microsoft.exchange.webservices.data.core.request.UnsubscribeRequest

public class UnsubscribeRequest
extends MultiResponseServiceRequest<ServiceResponse>

The Class UnsubscribeRequest.


Constructor Summary
UnsubscribeRequest(ExchangeService service)
          Instantiates a new unsubscribe request.
 
Method Summary
protected  HttpWebRequest buildEwsHttpWebRequest()
          Builds the HttpWebRequest object for current service request with exception handling.
protected  ServiceResponse createServiceResponse(ExchangeService service, int responseIndex)
          Creates service response.
protected  int getExpectedResponseMessageCount()
          Gets the expected response message count.
protected  ExchangeVersion getMinimumRequiredServerVersion()
          Gets the request version.
protected  String getResponseMessageXmlElementName()
          Gets the name of the response message XML element.
protected  String getResponseXmlElementName()
          Gets the name of the response XML element.
 String getSubscriptionId()
          Gets the subscription id.
 String getXmlElementName()
          Gets the name of the XML element.
 void setSubscriptionId(String subscriptionId)
          Sets the subscription id.
protected  void validate()
          Validate the request.
protected  void writeElementsToXml(EwsServiceXmlWriter writer)
          Writes XML elements.
 
Methods inherited from class microsoft.exchange.webservices.data.core.request.MultiResponseServiceRequest
endExecute, execute, getErrorHandlingMode, parseResponse
 
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, getEwsHttpWebResponse, getResponseStream, getService, processWebException, readPreamble, readResponse, readResponse, readSoapFault, throwIfNotSupportedByRequestedServerVersion, traceResponse, validateAndEmitRequest, writeAttributesToXml, writeBodyToXml, writeToXml
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnsubscribeRequest

public UnsubscribeRequest(ExchangeService service)
                   throws Exception
Instantiates a new unsubscribe request.

Parameters:
service - the service
Throws:
Exception
Method Detail

createServiceResponse

protected ServiceResponse createServiceResponse(ExchangeService service,
                                                int responseIndex)
Creates service response.

Specified by:
createServiceResponse in class MultiResponseServiceRequest<ServiceResponse>
Parameters:
service - the service
responseIndex - the response index
Returns:
Service response.

getExpectedResponseMessageCount

protected int getExpectedResponseMessageCount()
Gets the expected response message count.

Specified by:
getExpectedResponseMessageCount in class MultiResponseServiceRequest<ServiceResponse>
Returns:
Number of expected response messages.

getXmlElementName

public String getXmlElementName()
Gets the name of the XML element.

Specified by:
getXmlElementName in class ServiceRequestBase<ServiceResponseCollection<ServiceResponse>>
Returns:
Xml element name.

getResponseXmlElementName

protected String getResponseXmlElementName()
Gets the name of the response XML element.

Specified by:
getResponseXmlElementName in class ServiceRequestBase<ServiceResponseCollection<ServiceResponse>>
Returns:
Xml element name.

getResponseMessageXmlElementName

protected String getResponseMessageXmlElementName()
Gets the name of the response message XML element.

Specified by:
getResponseMessageXmlElementName in class MultiResponseServiceRequest<ServiceResponse>
Returns:
Xml element name.

validate

protected void validate()
                 throws ServiceLocalException,
                        Exception
Validate the request.

Overrides:
validate in class ServiceRequestBase<ServiceResponseCollection<ServiceResponse>>
Throws:
ServiceLocalException - the service local exception
Exception - the exception

writeElementsToXml

protected void writeElementsToXml(EwsServiceXmlWriter writer)
                           throws XMLStreamException,
                                  ServiceXmlSerializationException
Writes XML elements.

Specified by:
writeElementsToXml in class ServiceRequestBase<ServiceResponseCollection<ServiceResponse>>
Parameters:
writer - the writer
Throws:
XMLStreamException - the XML stream exception
ServiceXmlSerializationException - the service xml serialization exception

getMinimumRequiredServerVersion

protected ExchangeVersion getMinimumRequiredServerVersion()
Gets the request version.

Specified by:
getMinimumRequiredServerVersion in class ServiceRequestBase<ServiceResponseCollection<ServiceResponse>>
Returns:
Earliest Exchange version in which this request is supported.

getSubscriptionId

public String getSubscriptionId()
Gets the subscription id.

Returns:
the subscription id

setSubscriptionId

public void setSubscriptionId(String subscriptionId)
Sets the subscription id.

Parameters:
subscriptionId - the new subscription id

buildEwsHttpWebRequest

protected HttpWebRequest buildEwsHttpWebRequest()
                                         throws Exception
Description copied from class: ServiceRequestBase
Builds the HttpWebRequest object for current service request with exception handling.

Overrides:
buildEwsHttpWebRequest in class ServiceRequestBase<ServiceResponseCollection<ServiceResponse>>
Returns:
An HttpWebRequest instance
Throws:
Exception - on error


Copyright © 2012–2015 Microsoft. All rights reserved.