Class PullSubscription
- java.lang.Object
-
- microsoft.exchange.webservices.data.notification.SubscriptionBase
-
- microsoft.exchange.webservices.data.notification.PullSubscription
-
public final class PullSubscription extends SubscriptionBase
Represents a pull subscription.
-
-
Constructor Summary
Constructors Constructor Description PullSubscription(ExchangeService service)Initializes a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IAsyncResultbeginGetEvents(AsyncCallback callback, Object state)Begins an asynchronous request to obtain a collection of events that occurred on the subscribed folder since the point in time defined by the Watermark propertyIAsyncResultbeginUnsubscribe(AsyncCallback callback, Object state)Begins an asynchronous request to unsubscribe from the pull subscription.GetEventsResultsendGetEvents(IAsyncResult asyncResult)Ends an asynchronous request to obtain a collection of events that occurred on the subscribed folder since the point in time defined by the Watermark property.voidendUnsubscribe(IAsyncResult asyncResult)Ends an asynchronous request to unsubscribe from the pull subscription.GetEventsResultsgetEvents()Obtains a collection of events that occurred on the subscribed folder since the point in time defined by the Watermark property.booleanisMoreEventsAvailable()Gets a value indicating whether more events are available on the server.voidunsubscribe()Unsubscribes from the pull subscription.-
Methods inherited from class microsoft.exchange.webservices.data.notification.SubscriptionBase
getId, getService, getUsesWatermark, getWaterMark, loadFromXml, setId, setWaterMark
-
-
-
-
Constructor Detail
-
PullSubscription
public PullSubscription(ExchangeService service) throws Exception
Initializes a new instance.- Parameters:
service- the service- Throws:
Exception- the exception
-
-
Method Detail
-
getEvents
public GetEventsResults getEvents() throws Exception
Obtains a collection of events that occurred on the subscribed folder since the point in time defined by the Watermark property. When GetEvents succeeds, Watermark is updated.- Returns:
- Returns a collection of events that occurred since the last watermark
- Throws:
Exception- the exception
-
beginGetEvents
public IAsyncResult beginGetEvents(AsyncCallback callback, Object state) throws Exception
Begins an asynchronous request to obtain a collection of events that occurred on the subscribed folder since the point in time defined by the Watermark property- Parameters:
callback- The AsyncCallback delegatestate- An object that contains state information for this request- Returns:
- An IAsyncResult that references the asynchronous request
- Throws:
Exception
-
endGetEvents
public GetEventsResults endGetEvents(IAsyncResult asyncResult) throws Exception
Ends an asynchronous request to obtain a collection of events that occurred on the subscribed folder since the point in time defined by the Watermark property. When EndGetEvents succeeds, Watermark is updated.- Parameters:
asyncResult- An IAsyncResult that references the asynchronous request.- Returns:
- Returns a collection of events that occurred since the last watermark.
- Throws:
Exception
-
unsubscribe
public void unsubscribe() throws Exception
Unsubscribes from the pull subscription.- Throws:
Exception- the exception
-
beginUnsubscribe
public IAsyncResult beginUnsubscribe(AsyncCallback callback, Object state) throws Exception
Begins an asynchronous request to unsubscribe from the pull subscription.- Parameters:
callback- The AsyncCallback delegate.state- An object that contains state information for this request- Returns:
- An IAsyncResult that references the asynchronous request
- Throws:
Exception
-
endUnsubscribe
public void endUnsubscribe(IAsyncResult asyncResult) throws Exception
Ends an asynchronous request to unsubscribe from the pull subscription.- Parameters:
asyncResult- An IAsyncResult that references the asynchronous request.- Throws:
Exception
-
isMoreEventsAvailable
public boolean isMoreEventsAvailable()
Gets a value indicating whether more events are available on the server. MoreEventsAvailable is undefined (null) until GetEvents is called.- Returns:
- true, if is more events available
-
-