ISession.Deprovision Method

Solclient

ISessionDeprovision Method
version: 7.2.1.27
Deprovisions or removes a durable ITopicEndpoint or IQueue from the appliance. Endpoint deprovisioning can be carried out in a synchronous or asynchronous mode, depending upon the provision flags passed in to this method. If WaitForConfirm is specified in flags, the calling thread is blocked until the endpoint deprovisioning attempt either succeeds or is determined to have failed. If WaitForConfirm is not set, SOLCLIENT_IN_PROGRESS is returned when the endpoint deprovision request is successfully sent, and the remove attempt proceeds in the background.

An Endpoint provision timer, controlled by the property ProvisionTimeoutInMsecs, controls the maximum amount of time a deprovsion attempt lasts for. Upon expiry of this timer, a ProvisionError event is returned in the session event delegate.

Namespace: SolaceSystems.Solclient.Messaging
Assembly: SolaceSystems.Solclient.Messaging (in SolaceSystems.Solclient.Messaging.dll) Version: 7.2.1.27 (7.2.1.27)
Syntax
ReturnCode Deprovision(
	IEndpoint endpoint,
	int flags,
	Object correlationKey
)
Function Deprovision ( 
	endpoint As IEndpoint,
	flags As Integer,
	correlationKey As Object
) As ReturnCode
ReturnCode Deprovision(
	IEndpoint^ endpoint, 
	int flags, 
	Object^ correlationKey
)

Parameters

endpoint
Type: SolaceSystems.Solclient.MessagingIEndpoint
Endpoint to deprovision (must be a durable ITopicEndpoint or IQueue)
flags
Type: SystemInt32
Allowed flags include: WaitForConfirm: if specified, this call blocks the calling thread until a confirmation is received from the appliance.IgnoreErrorIfEndpointDoesNotExist: if specified, this call will not return an error if the Endpoint does not exist.
correlationKey
Type: SystemObject
When specified (i.e. non null reference passed in), this correlationKey is returned in CorrelationKey.

Return Value

Type: ReturnCode
SOLCLIENT_WOULD_BLOCK, if the operation cannot be accepted by the API immediately, SOLCLIENT_OK if successful, or SOLCLIENT_IN_PROGRESS if in progress.
Exceptions
ExceptionCondition
OperationErrorException Throws OperationErrorException if it fails to deprovision or delete the Endpoint. The possible reasons are:
  • The operation could not complete due to an invalid appliance or session state.
  • No Endpoint with the same name exists on the appliance, AND the user has not specified the IgnoreErrorIfEndpointDoesNotExist.
Note: The ErroInfo property in OperationErrorException will have a specific SubCode indicating what error case the application encountered. Possible sub-codes:
ObjectDisposedException Thrown when the session is already disposed (terminal state).
ArgumentNullException
ArgumentOutOfRangeException
See Also