Class SubscribeToPullNotificationsRequest
- 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<SubscribeResponse<TSubscription>>
-
- microsoft.exchange.webservices.data.core.request.SubscribeToPullNotificationsRequest
-
public class SubscribeToPullNotificationsRequest extends MultiResponseServiceRequest<SubscribeResponse<TSubscription>>
Represents a "pull" Subscribe request.
-
-
Constructor Summary
Constructors Constructor Description SubscribeToPullNotificationsRequest(ExchangeService service)Instantiates a new subscribe to pull notification 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 SubscribeResponse<PullSubscription>createServiceResponse(ExchangeService service, int responseIndex)Creates the service response.List<EventType>getEventTypes()Gets the event types.protected intgetExpectedResponseMessageCount()Gets the expected response message count.FolderIdWrapperListgetFolderIds()Gets the folder ids.protected ExchangeVersiongetMinimumRequiredServerVersion()Gets the minimum server version required to process this request.protected StringgetResponseMessageXmlElementName()Gets the name of the response message XML element.protected StringgetResponseXmlElementName()Gets the name of the response XML element.protected StringgetSubscriptionXmlElementName()Gets the name of the subscription XML element.intgetTimeout()Gets the timeout.StringgetWatermark()Gets the watermark.StringgetXmlElementName()Gets the name of the XML element.protected voidinternalWriteElementsToXml(EwsServiceXmlWriter writer)Reads response elements from XML.voidsetTimeOut(int timeout)Sets the time out.voidsetWatermark(String watermark)Sets the watermark.protected voidvalidate()Validate 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
-
SubscribeToPullNotificationsRequest
public SubscribeToPullNotificationsRequest(ExchangeService service) throws Exception
Instantiates a new subscribe to pull notification request.- Parameters:
service- the service- Throws:
Exception- the exception
-
-
Method Detail
-
getTimeout
public int getTimeout()
Gets the timeout.- Returns:
- the timeout
-
setTimeOut
public void setTimeOut(int timeout)
Sets the time out.- Parameters:
timeout- the new time out
-
validate
protected void validate() throws Exception
Validate request.- Throws:
Exception- the exception
-
createServiceResponse
protected SubscribeResponse<PullSubscription> createServiceResponse(ExchangeService service, int responseIndex) throws Exception
Creates the service response.- Specified by:
createServiceResponsein classMultiResponseServiceRequest<SubscribeResponse<PullSubscription>>- Parameters:
service- The service.responseIndex- Index of the response.- Returns:
- Service response.
- Throws:
Exception- the exception
-
getMinimumRequiredServerVersion
protected ExchangeVersion getMinimumRequiredServerVersion()
Gets the minimum server version required to process this request.- Specified by:
getMinimumRequiredServerVersionin classServiceRequestBase<ServiceResponseCollection<SubscribeResponse<PullSubscription>>>- Returns:
- Exchange server version.
-
getSubscriptionXmlElementName
protected String getSubscriptionXmlElementName()
Gets the name of the subscription XML element.- Returns:
- XML element name
-
internalWriteElementsToXml
protected void internalWriteElementsToXml(EwsServiceXmlWriter writer) throws XMLStreamException, ServiceXmlSerializationException
Reads response elements from XML.- Parameters:
writer- the writer- Throws:
XMLStreamException- the XML stream exceptionServiceXmlSerializationException- the service xml serialization exception
-
getExpectedResponseMessageCount
protected int getExpectedResponseMessageCount()
Gets the expected response message count.- Specified by:
getExpectedResponseMessageCountin classMultiResponseServiceRequest<SubscribeResponse<TSubscription extends SubscriptionBase>>- Returns:
- Number of expected response messages.
-
getXmlElementName
public String getXmlElementName()
Gets the name of the XML element.- Specified by:
getXmlElementNamein classServiceRequestBase<ServiceResponseCollection<SubscribeResponse<TSubscription extends SubscriptionBase>>>- Returns:
- XML element name
-
getResponseXmlElementName
protected String getResponseXmlElementName()
Gets the name of the response XML element.- Specified by:
getResponseXmlElementNamein classServiceRequestBase<ServiceResponseCollection<SubscribeResponse<TSubscription extends SubscriptionBase>>>- Returns:
- XML element name
-
getResponseMessageXmlElementName
protected String getResponseMessageXmlElementName()
Gets the name of the response message XML element.- Specified by:
getResponseMessageXmlElementNamein classMultiResponseServiceRequest<SubscribeResponse<TSubscription extends SubscriptionBase>>- Returns:
- XML element name
-
writeElementsToXml
protected void writeElementsToXml(EwsServiceXmlWriter writer) throws Exception
Writes XML elements.- Specified by:
writeElementsToXmlin classServiceRequestBase<ServiceResponseCollection<SubscribeResponse<TSubscription extends SubscriptionBase>>>- Parameters:
writer- the writer- Throws:
Exception- the exception
-
getFolderIds
public FolderIdWrapperList getFolderIds()
Gets the folder ids.- Returns:
- the folder ids
-
getWatermark
public String getWatermark()
Gets the watermark.- Returns:
- the watermark
-
setWatermark
public void setWatermark(String watermark)
Sets the watermark.- Parameters:
watermark- the new watermark
-
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<SubscribeResponse<TSubscription extends SubscriptionBase>>>- Returns:
- An HttpWebRequest instance
- Throws:
Exception- on error
-
-