SALES: 1-800-867-1380

SubscriptionClient.BeginAcceptMessageSession Method (String, TimeSpan, AsyncCallback, Object)

Begins an asynchronous operation to accept a message session.

Namespace:  Microsoft.ServiceBus.Messaging
Assembly:  Microsoft.ServiceBus (in Microsoft.ServiceBus.dll)

public IAsyncResult BeginAcceptMessageSession(
	string sessionId,
	TimeSpan timeout,
	AsyncCallback callback,
	Object state
)

Parameters

sessionId
Type: System.String
The session identifier of the message session.
timeout
Type: System.TimeSpan
The time span the server waits for processing messages before it times out.
callback
Type: System.AsyncCallback
An AsyncCallback delegate that references the method to invoke when the operation is complete.
state
Type: System.Object
A user-defined object that contains state information about the asynchronous operation.

Return Value

Type: System.IAsyncResult
An IAsyncResult that references the asynchronous operation to accept a message session.

ExceptionCondition
ArgumentException

Thrown if sessionId is null, empty, or white spaces.

ArgumentOutOfRangeException

Thrown if serverWaitTime is not a positive TimeSpan value.

TimeoutException

Thrown if the operation exceeded the timeout value set by serverWaitTime.

OperationCanceledException

Thrown if the client is already closed, aborted, or disposed.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft