Class UnsubscribeRequest
- 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<ServiceResponse>
-
- microsoft.exchange.webservices.data.core.request.UnsubscribeRequest
-
public class UnsubscribeRequest extends MultiResponseServiceRequest<ServiceResponse>
The Class UnsubscribeRequest.
-
-
Constructor Summary
Constructors Constructor Description UnsubscribeRequest(ExchangeService service)Instantiates a new unsubscribe request.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected HttpWebRequestbuildEwsHttpWebRequest()Builds the HttpWebRequest object for current service request with exception handling.protected ServiceResponsecreateServiceResponse(ExchangeService service, int responseIndex)Creates service response.protected intgetExpectedResponseMessageCount()Gets the expected response message count.protected ExchangeVersiongetMinimumRequiredServerVersion()Gets the request version.protected StringgetResponseMessageXmlElementName()Gets the name of the response message XML element.protected StringgetResponseXmlElementName()Gets the name of the response XML element.StringgetSubscriptionId()Gets the subscription id.StringgetXmlElementName()Gets the name of the XML element.voidsetSubscriptionId(String subscriptionId)Sets the subscription id.protected voidvalidate()Validate the request.protected voidwriteElementsToXml(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
-
-
-
-
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:
createServiceResponsein classMultiResponseServiceRequest<ServiceResponse>- Parameters:
service- the serviceresponseIndex- the response index- Returns:
- Service response.
-
getExpectedResponseMessageCount
protected int getExpectedResponseMessageCount()
Gets the expected response message count.- Specified by:
getExpectedResponseMessageCountin classMultiResponseServiceRequest<ServiceResponse>- Returns:
- Number of expected response messages.
-
getXmlElementName
public String getXmlElementName()
Gets the name of the XML element.- Specified by:
getXmlElementNamein classServiceRequestBase<ServiceResponseCollection<ServiceResponse>>- Returns:
- Xml element name.
-
getResponseXmlElementName
protected String getResponseXmlElementName()
Gets the name of the response XML element.- Specified by:
getResponseXmlElementNamein classServiceRequestBase<ServiceResponseCollection<ServiceResponse>>- Returns:
- Xml element name.
-
getResponseMessageXmlElementName
protected String getResponseMessageXmlElementName()
Gets the name of the response message XML element.- Specified by:
getResponseMessageXmlElementNamein classMultiResponseServiceRequest<ServiceResponse>- Returns:
- Xml element name.
-
validate
protected void validate() throws ServiceLocalException, Exception
Validate the request.- Overrides:
validatein classServiceRequestBase<ServiceResponseCollection<ServiceResponse>>- Throws:
ServiceLocalException- the service local exceptionException- the exception
-
writeElementsToXml
protected void writeElementsToXml(EwsServiceXmlWriter writer) throws XMLStreamException, ServiceXmlSerializationException
Writes XML elements.- Specified by:
writeElementsToXmlin classServiceRequestBase<ServiceResponseCollection<ServiceResponse>>- Parameters:
writer- the writer- Throws:
XMLStreamException- the XML stream exceptionServiceXmlSerializationException- the service xml serialization exception
-
getMinimumRequiredServerVersion
protected ExchangeVersion getMinimumRequiredServerVersion()
Gets the request version.- Specified by:
getMinimumRequiredServerVersionin classServiceRequestBase<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:ServiceRequestBaseBuilds the HttpWebRequest object for current service request with exception handling.- Overrides:
buildEwsHttpWebRequestin classServiceRequestBase<ServiceResponseCollection<ServiceResponse>>- Returns:
- An HttpWebRequest instance
- Throws:
Exception- on error
-
-