|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmicrosoft.exchange.webservices.data.ExchangeServiceBase
public abstract class ExchangeServiceBase
Represents an abstract binding to an Exchange Service.
Constructor Summary | |
---|---|
protected |
ExchangeServiceBase()
|
protected |
ExchangeServiceBase(ExchangeServiceBase service)
Initializes a new instance from existing one. |
protected |
ExchangeServiceBase(ExchangeServiceBase service,
ExchangeVersion requestedServerVersion)
|
protected |
ExchangeServiceBase(ExchangeVersion requestedServerVersion)
* Initializes a new instance. |
protected |
ExchangeServiceBase(ExchangeVersion requestedServerVersion,
java.util.TimeZone timeZone)
|
protected |
ExchangeServiceBase(java.util.TimeZone timeZone)
|
Method Summary | |
---|---|
static boolean |
checkURIPath(java.lang.String location)
|
protected java.lang.String |
convertDateTimeToUniversalDateTimeString(java.util.Date dt)
Converts the date time to universal date time string. |
protected java.util.Date |
convertStartDateToUnspecifiedDateTime(java.lang.String value)
Converts xs:dateTime string with either "Z", "-00:00" bias, or "" suffixes to unspecified StartDate value ignoring the suffix.Needs to fix E14:232996. |
protected java.util.Date |
convertUniversalDateTimeStringToDate(java.lang.String dateString)
Converts the universal date time string to local date time. |
protected void |
doOnSerializeCustomSoapHeaders(javax.xml.stream.XMLStreamWriter writer)
Calls the custom SOAP header serialisation event handlers, if defined. |
boolean |
getAcceptGzipEncoding()
Gets a value indicating whether GZip compression encoding should be accepted. |
java.lang.String |
getCookie(java.net.URL url)
Gets the cookie. |
ExchangeCredentials |
getCredentials()
Gets the credentials used to authenticate with the Exchange Web Services. |
java.util.Map<java.lang.String,java.lang.String> |
getHttpHeaders()
Gets a collection of HTTP headers that will be sent with each request to EWS. |
java.util.Map<java.lang.String,java.lang.String> |
getHttpResponseHeaders()
Gets a collection of HTTP headers from the last response. |
java.util.List<microsoft.exchange.webservices.data.ICustomXmlSerialization> |
getOnSerializeCustomSoapHeaders()
Gets the on serialize custom soap headers. |
ExchangeVersion |
getRequestedServerVersion()
Gets the requested server version. |
ExchangeServerInfo |
getServerInfo()
* Gets information associated with the server that processed the last request. |
protected static byte[] |
getSessionKey()
Gets the session key. |
protected org.apache.commons.httpclient.HttpConnectionManager |
getSimpleHttpConnectionManager()
Static members |
int |
getTimeout()
Gets the timeout used when sending HTTP requests and when receiving HTTP responses, in milliseconds. |
java.util.EnumSet<TraceFlags> |
getTraceFlags()
Gets the trace flags. |
ITraceListener |
getTraceListener()
Gets the trace listener. |
boolean |
getUseDefaultCredentials()
Gets a value indicating whether the credentials of the user currently logged into Windows should be used to authenticate with the Exchange Web Services. |
java.lang.String |
getUserAgent()
Gets the user agent. |
WebProxy |
getWebProxy()
Gets the web proxy that should be used when sending requests to EWS. |
protected void |
internalProcessHttpErrorResponse(microsoft.exchange.webservices.data.HttpWebRequest httpWebResponse,
java.lang.Exception webException,
TraceFlags responseHeadersTraceFlag,
TraceFlags responseTraceFlag)
This method doesn't handle 500 ISE errors. |
boolean |
isPreAuthenticate()
Gets a value that indicates whether HTTP pre-authentication should be performed. |
boolean |
isTraceEnabled()
Gets a value indicating whether tracing is enabled. |
protected boolean |
isTraceEnabledFor(TraceFlags traceFlags)
Determines whether tracing is enabled for specified trace flag(s). |
protected microsoft.exchange.webservices.data.HttpWebRequest |
prepareHttpWebRequestForUrl(java.net.URI url,
boolean acceptGzipEncoding,
boolean allowAutoRedirect)
* Creates an HttpWebRequest instance and initialises it with the appropriate parameters, based on the configuration of this service object. |
protected abstract void |
processHttpErrorResponse(microsoft.exchange.webservices.data.HttpWebRequest httpWebResponse,
java.lang.Exception webException)
|
protected void |
processHttpResponseHeaders(TraceFlags traceType,
microsoft.exchange.webservices.data.HttpWebRequest request)
Traces the HTTP response headers. |
void |
setAcceptGzipEncoding(boolean acceptGzipEncoding)
Gets a value indicating whether GZip compression encoding should be accepted. |
void |
setCookie(java.net.URL url,
java.lang.String value)
Gets the cookie container. |
void |
setCredentials(ExchangeCredentials credentials)
Sets the credentials used to authenticate with the Exchange Web Services. |
protected void |
setCustomUserAgent(java.lang.String userAgent)
Sets the user agent to a custom value |
void |
setOnSerializeCustomSoapHeaders(java.util.List<microsoft.exchange.webservices.data.ICustomXmlSerialization> onSerializeCustomSoapHeaders)
Sets the on serialize custom soap headers. |
void |
setPreAuthenticate(boolean preAuthenticate)
Sets a value that indicates whether HTTP pre-authentication should be performed. |
void |
setTimeout(int timeout)
Sets the timeout used when sending HTTP requests and when receiving HTTP respones, in milliseconds. |
void |
setTraceEnabled(boolean traceEnabled)
Sets a value indicating whether tracing is enabled. |
void |
setTraceFlags(java.util.EnumSet<TraceFlags> traceFlags)
Sets the trace flags. |
void |
setTraceListener(ITraceListener traceListener)
Sets the trace listener. |
void |
setUseDefaultCredentials(boolean value)
* Sets a value indicating whether the credentials of the user currently logged into Windows should be used to authenticate with the Exchange Web Services. |
void |
setUserAgent(java.lang.String userAgent)
Sets the user agent. |
void |
setWebProxy(WebProxy value)
Sets the web proxy that should be used when sending requests to EWS. |
protected void |
traceHttpRequestHeaders(TraceFlags traceType,
microsoft.exchange.webservices.data.HttpWebRequest request)
Traces the HTTP request headers. |
protected void |
traceMessage(TraceFlags traceType,
java.lang.String logEntry)
* Logs the specified string to the TraceListener if tracing is enabled. |
protected void |
traceXml(TraceFlags traceType,
java.io.ByteArrayOutputStream stream)
Logs the specified XML to the TraceListener if tracing is enabled. |
protected void |
validate()
* Validates this instance. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected ExchangeServiceBase(ExchangeServiceBase service, ExchangeVersion requestedServerVersion)
service
- requestedServerVersion
- protected ExchangeServiceBase(ExchangeServiceBase service)
service
- The other service.ExchangeServiceBase
protected ExchangeServiceBase()
protected ExchangeServiceBase(ExchangeVersion requestedServerVersion, java.util.TimeZone timeZone)
protected ExchangeServiceBase(java.util.TimeZone timeZone)
protected ExchangeServiceBase(ExchangeVersion requestedServerVersion)
requestedServerVersion
- The requested server version.Method Detail |
---|
protected org.apache.commons.httpclient.HttpConnectionManager getSimpleHttpConnectionManager()
protected void doOnSerializeCustomSoapHeaders(javax.xml.stream.XMLStreamWriter writer)
writer
- The XmlWriter to which to write the custom SOAP headers.protected microsoft.exchange.webservices.data.HttpWebRequest prepareHttpWebRequestForUrl(java.net.URI url, boolean acceptGzipEncoding, boolean allowAutoRedirect) throws ServiceLocalException, java.net.URISyntaxException
url
- The URL that the HttpWebRequest should target.acceptGzipEncoding
- If true, ask server for GZip compressed content.allowAutoRedirect
- If true, redirection responses will be automatically followed.
ServiceLocalException
- the service local exception
java.net.URISyntaxException
- the uRI syntax exceptionprotected void internalProcessHttpErrorResponse(microsoft.exchange.webservices.data.HttpWebRequest httpWebResponse, java.lang.Exception webException, TraceFlags responseHeadersTraceFlag, TraceFlags responseTraceFlag) throws java.lang.Exception
httpWebResponse
- webException
- responseHeadersTraceFlag
- responseTraceFlag
-
java.lang.Exception
public static boolean checkURIPath(java.lang.String location)
location
-
protected abstract void processHttpErrorResponse(microsoft.exchange.webservices.data.HttpWebRequest httpWebResponse, java.lang.Exception webException) throws java.lang.Exception
httpWebResponse
- webException
-
java.lang.Exception
protected boolean isTraceEnabledFor(TraceFlags traceFlags)
traceFlags
- The trace flags.
protected void traceMessage(TraceFlags traceType, java.lang.String logEntry) throws javax.xml.stream.XMLStreamException, java.io.IOException
traceType
- Kind of trace entry.logEntry
- The entry to log.
javax.xml.stream.XMLStreamException
- the xML stream exception
java.io.IOException
- Signals that an I/O exception has occurred.protected void traceXml(TraceFlags traceType, java.io.ByteArrayOutputStream stream)
traceType
- Kind of trace entry.stream
- The stream containing XML.protected void traceHttpRequestHeaders(TraceFlags traceType, microsoft.exchange.webservices.data.HttpWebRequest request) throws java.net.URISyntaxException, EWSHttpException, javax.xml.stream.XMLStreamException, java.io.IOException
traceType
- Kind of trace entry.request
- The request
EWSHttpException
java.net.URISyntaxException
java.io.IOException
javax.xml.stream.XMLStreamException
protected java.util.Date convertUniversalDateTimeStringToDate(java.lang.String dateString)
dateString
- The value.
protected java.util.Date convertStartDateToUnspecifiedDateTime(java.lang.String value) throws java.text.ParseException
value
- The string value to parse.
java.text.ParseException
protected java.lang.String convertDateTimeToUniversalDateTimeString(java.util.Date dt)
dt
- the date
protected void setCustomUserAgent(java.lang.String userAgent)
userAgent
- User agent string to set on the serviceprotected void validate() throws ServiceLocalException
ServiceLocalException
- the service local exceptionpublic void setCookie(java.net.URL url, java.lang.String value) throws java.io.IOException, java.net.URISyntaxException
url
- the urlvalue
- the value
java.io.IOException
- , URISyntaxException
java.net.URISyntaxException
- the uRI syntax exceptionpublic java.lang.String getCookie(java.net.URL url) throws java.io.IOException, java.net.URISyntaxException
url
- the url
java.io.IOException
- Signals that an I/O exception has occurred.
java.net.URISyntaxException
- the uRI syntax exceptionpublic boolean isTraceEnabled()
public void setTraceEnabled(boolean traceEnabled)
traceEnabled
- true to enable tracingpublic java.util.EnumSet<TraceFlags> getTraceFlags()
public void setTraceFlags(java.util.EnumSet<TraceFlags> traceFlags)
traceFlags
- A set of trace flagspublic ITraceListener getTraceListener()
public void setTraceListener(ITraceListener traceListener)
traceListener
- the trace listener.public ExchangeCredentials getCredentials()
public void setCredentials(ExchangeCredentials credentials)
credentials
- Exchange credentials.public boolean getUseDefaultCredentials()
public void setUseDefaultCredentials(boolean value)
value
- the new use default credentialspublic int getTimeout()
public void setTimeout(int timeout)
timeout
- timeout in millisecondspublic boolean isPreAuthenticate()
public void setPreAuthenticate(boolean preAuthenticate)
preAuthenticate
- true to enable pre-authenticationpublic boolean getAcceptGzipEncoding()
public void setAcceptGzipEncoding(boolean acceptGzipEncoding)
acceptGzipEncoding
- true to enable compressionpublic ExchangeVersion getRequestedServerVersion()
public java.lang.String getUserAgent()
public void setUserAgent(java.lang.String userAgent)
userAgent
- The user agentpublic ExchangeServerInfo getServerInfo()
public WebProxy getWebProxy()
public void setWebProxy(WebProxy value)
value
- the Proxy Informationpublic java.util.Map<java.lang.String,java.lang.String> getHttpHeaders()
public java.util.List<microsoft.exchange.webservices.data.ICustomXmlSerialization> getOnSerializeCustomSoapHeaders()
public void setOnSerializeCustomSoapHeaders(java.util.List<microsoft.exchange.webservices.data.ICustomXmlSerialization> onSerializeCustomSoapHeaders)
onSerializeCustomSoapHeaders
- the new on serialize custom soap headersprotected void processHttpResponseHeaders(TraceFlags traceType, microsoft.exchange.webservices.data.HttpWebRequest request) throws javax.xml.stream.XMLStreamException, java.io.IOException, EWSHttpException
tracetype
- kind of trace entryresponse
- The response
EWSHttpException
java.io.IOException
javax.xml.stream.XMLStreamException
public java.util.Map<java.lang.String,java.lang.String> getHttpResponseHeaders()
protected static byte[] getSessionKey()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |