public class SubscribeToPushNotificationsRequest extends MultiResponseServiceRequest<SubscribeResponse<TSubscription>>
Constructor and Description |
---|
SubscribeToPushNotificationsRequest(ExchangeService service)
Instantiates a new subscribe to push notification request.
|
Modifier and Type | Method and Description |
---|---|
protected HttpWebRequest |
buildEwsHttpWebRequest()
Builds the HttpWebRequest object for current service request with exception handling.
|
protected SubscribeResponse<PushSubscription> |
createServiceResponse(ExchangeService service,
int responseIndex)
Creates the service response.
|
List<EventType> |
getEventTypes()
Gets the event types.
|
protected int |
getExpectedResponseMessageCount()
Gets the expected response message count.
|
FolderIdWrapperList |
getFolderIds()
Gets the folder ids.
|
int |
getFrequency()
Gets the frequency.
|
protected ExchangeVersion |
getMinimumRequiredServerVersion()
Gets the minimum server version required to process this request.
|
protected String |
getResponseMessageXmlElementName()
Gets the name of the response message XML element.
|
protected String |
getResponseXmlElementName()
Gets the name of the response XML element.
|
protected String |
getSubscriptionXmlElementName()
Gets the name of the subscription XML element.
|
URI |
getUrl()
Gets the url.
|
String |
getWatermark()
Gets the watermark.
|
String |
getXmlElementName()
Gets the name of the XML element.
|
protected void |
internalWriteElementsToXml(EwsServiceXmlWriter writer)
Internal method to write XML elements.
|
void |
setFrequency(int frequency)
Sets the frequency.
|
void |
setUrl(URI url)
Sets the url.
|
void |
setWatermark(String watermark)
Sets the watermark.
|
protected void |
validate()
Validate request.
|
protected void |
writeElementsToXml(EwsServiceXmlWriter writer)
Writes XML elements.
|
endExecute, execute, getErrorHandlingMode, parseResponse
beginExecute, endInternalExecute, internalExecute
buildEwsHttpPoolingWebRequest, getEwsHttpWebResponse, getResponseStream, getService, processWebException, readPreamble, readResponse, readResponse, readSoapFault, throwIfNotSupportedByRequestedServerVersion, traceResponse, validateAndEmitRequest, writeAttributesToXml, writeBodyToXml, writeToXml
public SubscribeToPushNotificationsRequest(ExchangeService service) throws Exception
service
- the serviceException
protected void validate() throws Exception
Exception
- the exceptionprotected String getSubscriptionXmlElementName()
protected void internalWriteElementsToXml(EwsServiceXmlWriter writer) throws XMLStreamException, ServiceXmlSerializationException
writer
- the writerXMLStreamException
- the XML stream exceptionServiceXmlSerializationException
- the service xml serialization exceptionprotected SubscribeResponse<PushSubscription> createServiceResponse(ExchangeService service, int responseIndex) throws Exception
MultiResponseServiceRequest
createServiceResponse
in class MultiResponseServiceRequest<SubscribeResponse<PushSubscription>>
service
- The service.responseIndex
- Index of the response.Exception
- the exceptionprotected ExchangeVersion getMinimumRequiredServerVersion()
ServiceRequestBase
getMinimumRequiredServerVersion
in class ServiceRequestBase<ServiceResponseCollection<SubscribeResponse<PushSubscription>>>
public int getFrequency()
public void setFrequency(int frequency)
frequency
- the new frequencyprotected int getExpectedResponseMessageCount()
getExpectedResponseMessageCount
in class MultiResponseServiceRequest<SubscribeResponse<TSubscription extends SubscriptionBase>>
public String getXmlElementName()
getXmlElementName
in class ServiceRequestBase<ServiceResponseCollection<SubscribeResponse<TSubscription extends SubscriptionBase>>>
protected String getResponseXmlElementName()
getResponseXmlElementName
in class ServiceRequestBase<ServiceResponseCollection<SubscribeResponse<TSubscription extends SubscriptionBase>>>
protected String getResponseMessageXmlElementName()
getResponseMessageXmlElementName
in class MultiResponseServiceRequest<SubscribeResponse<TSubscription extends SubscriptionBase>>
protected void writeElementsToXml(EwsServiceXmlWriter writer) throws Exception
writeElementsToXml
in class ServiceRequestBase<ServiceResponseCollection<SubscribeResponse<TSubscription extends SubscriptionBase>>>
writer
- the writerException
- the exceptionpublic FolderIdWrapperList getFolderIds()
public List<EventType> getEventTypes()
public String getWatermark()
public void setWatermark(String watermark)
watermark
- the new watermarkprotected HttpWebRequest buildEwsHttpWebRequest() throws Exception
ServiceRequestBase
buildEwsHttpWebRequest
in class ServiceRequestBase<ServiceResponseCollection<SubscribeResponse<TSubscription extends SubscriptionBase>>>
Exception
- on errorCopyright © 2012–2015 Microsoft. All rights reserved.