microsoft.exchange.webservices.data.notification
Class PullSubscription

java.lang.Object
  extended by microsoft.exchange.webservices.data.notification.SubscriptionBase
      extended by microsoft.exchange.webservices.data.notification.PullSubscription

public final class PullSubscription
extends SubscriptionBase

Represents a pull subscription.


Constructor Summary
PullSubscription(ExchangeService service)
          Initializes a new instance.
 
Method Summary
 IAsyncResult beginGetEvents(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 property
 IAsyncResult beginUnsubscribe(AsyncCallback callback, Object state)
          Begins an asynchronous request to unsubscribe from the pull subscription.
 GetEventsResults endGetEvents(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.
 void endUnsubscribe(IAsyncResult asyncResult)
          Ends an asynchronous request to unsubscribe from the pull subscription.
 GetEventsResults getEvents()
          Obtains a collection of events that occurred on the subscribed folder since the point in time defined by the Watermark property.
 boolean isMoreEventsAvailable()
          Gets a value indicating whether more events are available on the server.
 void unsubscribe()
          Unsubscribes from the pull subscription.
 
Methods inherited from class microsoft.exchange.webservices.data.notification.SubscriptionBase
getId, getService, getUsesWatermark, getWaterMark, loadFromXml, setId, setWaterMark
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 delegate
state - 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


Copyright © 2012–2015 Microsoft. All rights reserved.