|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmicrosoft.exchange.webservices.data.core.request.ServiceRequestBase<T>
public abstract class ServiceRequestBase<T>
Represents an abstract service request.
| Constructor Summary | |
|---|---|
protected |
ServiceRequestBase(ExchangeService service)
Initializes a new instance. |
| Method Summary | |
|---|---|
protected HttpWebRequest |
buildEwsHttpPoolingWebRequest()
Builds a HttpWebRequest object from a pooling connection manager for current service request with exception handling. |
protected HttpWebRequest |
buildEwsHttpWebRequest()
Builds the HttpWebRequest object for current service request with exception handling. |
protected HttpWebRequest |
getEwsHttpWebResponse(HttpWebRequest request)
Gets the IEwsHttpWebRequest object from the specifiedHttpWebRequest object with exception handling |
protected abstract ExchangeVersion |
getMinimumRequiredServerVersion()
Gets the minimum server version required to process this request. |
protected static InputStream |
getResponseStream(HttpWebRequest request)
Gets the response stream (may be wrapped with GZip/Deflate stream to decompress content). |
protected abstract String |
getResponseXmlElementName()
Gets the name of the response XML element. |
ExchangeService |
getService()
Gets the service. |
abstract String |
getXmlElementName()
Gets the name of the XML element. |
protected abstract T |
parseResponse(EwsServiceXmlReader reader)
Parses the response. |
protected void |
processWebException(Exception webException,
HttpWebRequest req)
Processes the web exception. |
protected void |
readPreamble(EwsServiceXmlReader ewsXmlReader)
Reads any preamble data not part of the core response. |
protected T |
readResponse(EwsServiceXmlReader ewsXmlReader)
Reads the response. |
protected T |
readResponse(HttpWebRequest response)
Reads the response. |
protected SoapFaultDetails |
readSoapFault(EwsServiceXmlReader reader)
Reads the SOAP fault. |
protected void |
throwIfNotSupportedByRequestedServerVersion()
Throw exception if request is not supported in requested server version. |
protected void |
traceResponse(HttpWebRequest request,
ByteArrayOutputStream memoryStream)
Traces the response. |
protected void |
validate()
Validate request. |
protected HttpWebRequest |
validateAndEmitRequest()
Validates request parameters, and emits the request to the server. |
protected void |
writeAttributesToXml(EwsServiceXmlWriter writer)
Writes XML attribute. |
protected void |
writeBodyToXml(EwsServiceXmlWriter writer)
Writes XML body. |
protected abstract void |
writeElementsToXml(EwsServiceXmlWriter writer)
Writes XML elements. |
protected void |
writeToXml(EwsServiceXmlWriter writer)
Writes XML. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected ServiceRequestBase(ExchangeService service)
throws ServiceVersionException
service - The service.
ServiceVersionException - the service version exception| Method Detail |
|---|
public abstract String getXmlElementName()
protected abstract String getResponseXmlElementName()
protected abstract ExchangeVersion getMinimumRequiredServerVersion()
protected abstract T parseResponse(EwsServiceXmlReader reader)
throws Exception
reader - The reader.
Exception - the exception
protected abstract void writeElementsToXml(EwsServiceXmlWriter writer)
throws Exception
writer - The writer.
Exception - the exception
protected void validate()
throws Exception
ServiceLocalException - the service local exception
Exception - the exception
protected void writeBodyToXml(EwsServiceXmlWriter writer)
throws Exception
writer - The writer.
Exception - the exception
protected void writeAttributesToXml(EwsServiceXmlWriter writer)
throws ServiceXmlSerializationException
writer - The writer.
ServiceXmlSerializationException - the service xml serialization exceptionpublic ExchangeService getService()
protected void throwIfNotSupportedByRequestedServerVersion()
throws ServiceVersionException
ServiceVersionException - the service version exception
protected void writeToXml(EwsServiceXmlWriter writer)
throws Exception
writer - The writer.
Exception - the exception
protected static InputStream getResponseStream(HttpWebRequest request)
throws IOException,
EWSHttpException
request - HttpWebRequest object from which response stream can be read.
IOException - Signals that an I/O exception has occurred.
EWSHttpException - the EWS http exception
protected void traceResponse(HttpWebRequest request,
ByteArrayOutputStream memoryStream)
throws XMLStreamException,
IOException,
EWSHttpException
request - the responsememoryStream - the response content in a MemoryStream
XMLStreamException - the XML stream exception
IOException - signals that an I/O exception has occurred
EWSHttpException - the EWS http exception
protected T readResponse(HttpWebRequest response)
throws Exception
response - HTTP web request
Exception - on error
protected T readResponse(EwsServiceXmlReader ewsXmlReader)
throws Exception
ewsXmlReader - The XML reader.
Exception - the exception
protected void readPreamble(EwsServiceXmlReader ewsXmlReader)
throws Exception
ewsXmlReader - The EwsServiceXmlReader.
Exception - on error
protected void processWebException(Exception webException,
HttpWebRequest req)
throws Exception
webException - the web exceptionreq - HTTP Request object used to send the http request
Exception - on errorprotected SoapFaultDetails readSoapFault(EwsServiceXmlReader reader)
reader - The reader.
protected HttpWebRequest validateAndEmitRequest()
throws Exception
Exception - on error
protected HttpWebRequest buildEwsHttpWebRequest()
throws Exception
Exception - on error
protected HttpWebRequest buildEwsHttpPoolingWebRequest()
throws Exception
Used for subscriptions.
Exception - on error
protected HttpWebRequest getEwsHttpWebResponse(HttpWebRequest request)
throws Exception
request - The specified HttpWebRequest
Exception - on error
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||