microsoft.exchange.webservices.data.core.request
Class HangingServiceRequestBase<T>

java.lang.Object
  extended by microsoft.exchange.webservices.data.core.request.ServiceRequestBase<T>
      extended by microsoft.exchange.webservices.data.core.request.HangingServiceRequestBase<T>
Direct Known Subclasses:
GetStreamingEventsRequest

public abstract class HangingServiceRequestBase<T>
extends ServiceRequestBase<T>

Represents an abstract, hanging service request.


Nested Class Summary
static interface HangingServiceRequestBase.IHandleResponseObject
           
static interface HangingServiceRequestBase.IHangingRequestDisconnectHandler
           
 
Field Summary
static int BUFFER_SIZE
           
protected  int heartbeatFrequencyMilliseconds
          Expected minimum frequency in response, in milliseconds.
 
Constructor Summary
protected HangingServiceRequestBase(ExchangeService service, HangingServiceRequestBase.IHandleResponseObject handler, int heartbeatFrequency)
          Initializes a new instance of the HangingServiceRequestBase class.
 
Method Summary
 void addOnDisconnectEvent(HangingServiceRequestBase.IHangingRequestDisconnectHandler disconnect)
          Set event to happen when property disconnect.
protected  void clearDisconnectEvents()
          Clears disconnect events list.
 void disconnect()
          Disconnects the request.
 void disconnect(HangingRequestDisconnectReason reason, Exception exception)
          Disconnects the request with the specified reason and exception.
 void internalExecute()
          Exectures the request.
 boolean isConnected()
          Gets a value indicating whether this instance is connected.
static boolean isLogAllWireBytes()
           
protected  void readPreamble(EwsServiceXmlReader ewsXmlReader)
          Reads any preamble data not part of the core response.
protected  void removeDisconnectEvent(HangingServiceRequestBase.IHangingRequestDisconnectHandler disconnect)
          Remove the event from happening when property disconnect.
static void setLogAllWireBytes(boolean logAllWireBytes)
           
 
Methods inherited from class microsoft.exchange.webservices.data.core.request.ServiceRequestBase
buildEwsHttpPoolingWebRequest, buildEwsHttpWebRequest, getEwsHttpWebResponse, getMinimumRequiredServerVersion, getResponseStream, getResponseXmlElementName, getService, getXmlElementName, parseResponse, processWebException, readResponse, readResponse, readSoapFault, throwIfNotSupportedByRequestedServerVersion, traceResponse, validate, validateAndEmitRequest, writeAttributesToXml, writeBodyToXml, writeElementsToXml, writeToXml
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BUFFER_SIZE

public static final int BUFFER_SIZE
See Also:
Constant Field Values

heartbeatFrequencyMilliseconds

protected int heartbeatFrequencyMilliseconds
Expected minimum frequency in response, in milliseconds.

Constructor Detail

HangingServiceRequestBase

protected HangingServiceRequestBase(ExchangeService service,
                                    HangingServiceRequestBase.IHandleResponseObject handler,
                                    int heartbeatFrequency)
                             throws ServiceVersionException
Initializes a new instance of the HangingServiceRequestBase class.

Parameters:
service - The service.
handler - Callback delegate to handle response objects
heartbeatFrequency - Frequency at which we expect heartbeats, in milliseconds.
Throws:
ServiceVersionException
Method Detail

isLogAllWireBytes

public static boolean isLogAllWireBytes()

setLogAllWireBytes

public static void setLogAllWireBytes(boolean logAllWireBytes)

addOnDisconnectEvent

public void addOnDisconnectEvent(HangingServiceRequestBase.IHangingRequestDisconnectHandler disconnect)
Set event to happen when property disconnect.

Parameters:
disconnect - disconnect event

removeDisconnectEvent

protected void removeDisconnectEvent(HangingServiceRequestBase.IHangingRequestDisconnectHandler disconnect)
Remove the event from happening when property disconnect.

Parameters:
disconnect - disconnect event

clearDisconnectEvents

protected void clearDisconnectEvents()
Clears disconnect events list.


internalExecute

public void internalExecute()
                     throws Exception
Exectures the request.

Throws:
Exception

isConnected

public boolean isConnected()
Gets a value indicating whether this instance is connected.

Returns:
true, if this instance is connected; otherwise, false

disconnect

public void disconnect()
Disconnects the request.


disconnect

public void disconnect(HangingRequestDisconnectReason reason,
                       Exception exception)
Disconnects the request with the specified reason and exception.

Parameters:
reason - The reason.
exception - The exception.

readPreamble

protected void readPreamble(EwsServiceXmlReader ewsXmlReader)
                     throws Exception
Reads any preamble data not part of the core response.

Overrides:
readPreamble in class ServiceRequestBase<T>
Parameters:
ewsXmlReader - The EwsServiceXmlReader.
Throws:
Exception


Copyright © 2012–2015 Microsoft. All rights reserved.