/**
  * Initializes a new instance of the StreamingSubscriptionConnection class.
  *
  * @param service The ExchangeService instance this connection uses to connect to the server.
  * @param subscriptions Iterable subcriptions
  * @param lifetime The maximum time, in minutes, the connection will remain open. Lifetime must be
  *     between 1 and 30.
  * @throws Exception
  */
 public StreamingSubscriptionConnection(
     ExchangeService service, Iterable<StreamingSubscription> subscriptions, int lifetime)
     throws Exception {
   this(service, lifetime);
   EwsUtilities.validateParamCollection(subscriptions.iterator(), "subscriptions");
   for (StreamingSubscription subscription : subscriptions) {
     this.subscriptions.put(subscription.getId(), subscription);
   }
 }
Ejemplo n.º 2
0
 /**
  * Validate request.
  *
  * @throws Exception the exception
  */
 protected void validate() throws Exception {
   super.validate();
   EwsUtilities.validateParamCollection(this.ids.iterator(), "Ids");
 }