microsoft.exchange.webservices.data
Class PullSubscription

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

public final class PullSubscription
extends SubscriptionBase

Represents a pull subscription.


Constructor Summary
protected PullSubscription(ExchangeService service)
          Initializes a new instance.
 
Method Summary
 IAsyncResult beginGetEvents(microsoft.exchange.webservices.data.AsyncCallback callback, java.lang.Object state)
          Begins an asynchronous request to obtain a collection of events that occurred on the subscribed folders since the point in time defined by the Watermark property
 IAsyncResult beginUnsubscribe(microsoft.exchange.webservices.data.AsyncCallback callback, java.lang.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 folders since the point in time defined by the Watermark property.When EndGetEvents succeeds, Watermark is updated.
 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 folders 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.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

protected PullSubscription(ExchangeService service)
                    throws java.lang.Exception
Initializes a new instance.

Parameters:
service - the service
Throws:
java.lang.Exception - the exception
Method Detail

getEvents

public GetEventsResults getEvents()
                           throws java.lang.Exception
Obtains a collection of events that occurred on the subscribed folders 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:
java.lang.Exception - the exception

beginGetEvents

public IAsyncResult beginGetEvents(microsoft.exchange.webservices.data.AsyncCallback callback,
                                   java.lang.Object state)
                            throws java.lang.Exception
Begins an asynchronous request to obtain a collection of events that occurred on the subscribed folders 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
Throws:
java.lang.Exception

endGetEvents

public GetEventsResults endGetEvents(IAsyncResult asyncResult)
                              throws java.lang.Exception
Ends an asynchronous request to obtain a collection of events that occurred on the subscribed folders 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.
state - An object that contains state information for this request
Throws:
java.lang.Exception

unsubscribe

public void unsubscribe()
                 throws java.lang.Exception
Unsubscribes from the pull subscription.

Throws:
java.lang.Exception - the exception

beginUnsubscribe

public IAsyncResult beginUnsubscribe(microsoft.exchange.webservices.data.AsyncCallback callback,
                                     java.lang.Object state)
                              throws java.lang.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
Throws:
java.lang.Exception

endUnsubscribe

public void endUnsubscribe(IAsyncResult asyncResult)
                    throws java.lang.Exception
Ends an asynchronous request to unsubscribe from the pull subscription.

Parameters:
asyncResult - An IAsyncResult that references the asynchronous request.
Throws:
java.lang.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