microsoft.exchange.webservices.data.SubscribeResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of exchange-ws-api Show documentation
Show all versions of exchange-ws-api Show documentation
The source came from http://archive.msdn.microsoft.com/ewsjavaapi
Support for Maven has been added.
The newest version!
/**************************************************************************
* copyright file="SubscribeResponse.java" company="Microsoft"
* Copyright (c) Microsoft Corporation. All rights reserved.
*
* Defines the SubscribeResponse.java.
**************************************************************************/
package microsoft.exchange.webservices.data;
import javax.xml.stream.XMLStreamException;
/**
* Represents the base response class to subscription creation operations.
*
* @param
* Subscription type
*/
final class SubscribeResponse extends
ServiceResponse {
/** The subscription. */
private TSubscription subscription;
/**
* Initializes a new instance of the SubscribeResponse<TSubscription
* class.
*
* @param subscription
* The Subscription
*/
protected SubscribeResponse(TSubscription subscription) {
super();
EwsUtilities.EwsAssert(subscription != null, "SubscribeResponse.ctor",
"subscription is null");
this.subscription = subscription;
}
/**
* * Reads response elements from XML.
*
* @param reader
* The reader.
* @throws ServiceXmlDeserializationException
* the service xml deserialization exception
* @throws XMLStreamException
* the xML stream exception
* @throws InstantiationException
* the instantiation exception
* @throws IllegalAccessException
* the illegal access exception
* @throws ServiceLocalException
* the service local exception
* @throws Exception
* the exception
*/
@Override
protected void readElementsFromXml(EwsServiceXmlReader reader)
throws ServiceXmlDeserializationException, XMLStreamException,
InstantiationException, IllegalAccessException,
ServiceLocalException, Exception {
super.readElementsFromXml(reader);
this.subscription.loadFromXml(reader);
}
/**
* Gets the subscription.
*
* @return the subscription
*/
public TSubscription getSubscription() {
return this.subscription;
}
}