ISession.Provision Method

Solclient

ISessionProvision Method
version: 7.2.1.27
Provisions a durable ITopicEndpoint or IQueue on the appliance. Endpoint creation 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 creation attempt either succeeds or is determined to have failed. If WaitForConfirm is not specified in flags, SOLCLIENT_IN_PROGRESS is returned when the endpoint provision request is successfully sent, and the creation attempt proceeds in the background.

An Endpoint provision timer, controlled by the property ProvisionTimeoutInMsecs, controls the maximum amount of time a provision 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 Provision(
	IEndpoint endpoint,
	EndpointProperties props,
	int flags,
	Object correlationKey
)
Function Provision ( 
	endpoint As IEndpoint,
	props As EndpointProperties,
	flags As Integer,
	correlationKey As Object
) As ReturnCode
ReturnCode Provision(
	IEndpoint^ endpoint, 
	EndpointProperties^ props, 
	int flags, 
	Object^ correlationKey
)

Parameters

endpoint
Type: SolaceSystems.Solclient.MessagingIEndpoint
Endpoint to create (must be a durable ITopicEndpoint or IQueue).
props
Type: SolaceSystems.Solclient.MessagingEndpointProperties
Properties of the Endpoint to create. Setting a property in EnpointProperties with a null value indicates that the application will accept the appliance's defaults. If the Endpoint already exists, leaving the property value null indicates that application accepts any value already specified for that Endpoint.
flags
Type: SystemInt32
Allowed flags include: WaitForConfirm: if specified this call blocks the calling thread until a confirmation is received from the appliance.IgnoreErrorIfEndpointAlreadyExists: if specified this call will not return an error if the Endpoint already exists.
correlationKey
Type: SystemObject
When specified (i.e. non null reference passed in), this correlationKey is returned in CorrelationKey - It is ignored if WaitForConfirm is specified.

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 in the following cases: The operation could not complete due to an invalid appliance or session state. An Endpoint with the same name already exists, and the user did not pass IgnoreErrorIfEndpointAlreadyExists was not specified in flags. A property mismatch error has occurred. This occurs if the user has passed in true for ignoreErrorIfEndpointAlreadyExists AND and Endpoint with the same name already exists AND the provision property passed in by the application and what is currently provisioned on the appliance are not equal. 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