Class HangingServiceRequestBase<T>
- java.lang.Object
-
- microsoft.exchange.webservices.data.core.request.ServiceRequestBase<T>
-
- 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
Nested Classes Modifier and Type Class Description static interfaceHangingServiceRequestBase.IHandleResponseObjectstatic interfaceHangingServiceRequestBase.IHangingRequestDisconnectHandler
-
Field Summary
Fields Modifier and Type Field Description static intBUFFER_SIZEprotected intheartbeatFrequencyMillisecondsExpected minimum frequency in response, in milliseconds.
-
Constructor Summary
Constructors Modifier Constructor Description protectedHangingServiceRequestBase(ExchangeService service, HangingServiceRequestBase.IHandleResponseObject handler, int heartbeatFrequency)Initializes a new instance of the HangingServiceRequestBase class.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddOnDisconnectEvent(HangingServiceRequestBase.IHangingRequestDisconnectHandler disconnect)Set event to happen when property disconnect.protected voidclearDisconnectEvents()Clears disconnect events list.voiddisconnect()Disconnects the request.voiddisconnect(HangingRequestDisconnectReason reason, Exception exception)Disconnects the request with the specified reason and exception.voidinternalExecute()Exectures the request.booleanisConnected()Gets a value indicating whether this instance is connected.static booleanisLogAllWireBytes()protected voidreadPreamble(EwsServiceXmlReader ewsXmlReader)Reads any preamble data not part of the core response.protected voidremoveDisconnectEvent(HangingServiceRequestBase.IHangingRequestDisconnectHandler disconnect)Remove the event from happening when property disconnect.static voidsetLogAllWireBytes(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
-
-
-
-
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 objectsheartbeatFrequency- 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:
readPreamblein classServiceRequestBase<T>- Parameters:
ewsXmlReader- The EwsServiceXmlReader.- Throws:
Exception
-
-