Interface ISecurityStoreFeature

The base interface for features that update security stores.

Inherited Members
IFeature.Session
Namespace: PushTechnology.ClientInterface.Client.Features.Control.Clients.SecurityControl
Assembly: Diffusion.Client.dll
Syntax
public interface ISecurityStoreFeature : IFeature
Remarks

This feature can not be obtained directly as it is part of ISecurityControl and ISystemAuthenticationControl.

Methods

UpdateStoreAsync(String)

Sends a command script to the server to update the security store.

Declaration
Task<object> UpdateStoreAsync(string commandScript)
Parameters
Type Name Description
System.String commandScript

The command script to send to the server.

Returns
Type Description
System.Threading.Tasks.Task<System.Object>

The Task representing the current operation.

Remarks

If the operation completes successfully, the Task result will be null. The return value of this operation is Task{Object} rather than Task to provide better forward compatibility with future iterations of this API that may provide a non-null result with a more specific type.

The script may be generated using a IScriptBuilder obtained from the feature.

Each line of commandScript is a command to update the store.

The server attempts to execute each command in order against a copy of the store. If any command fails, none of the changes will be applied. If all commands succeed, the changes will be applied.

If the server is configured for topic replication, then the changes will be replicated to all members of the cluster.

This method is the same as calling UpdateStoreAsync(String, CancellationToken) with System.Threading.CancellationToken.None.

Exceptions
Type Condition
System.ArgumentNullException

The commandScript is null.

CommandScriptException

The given commandScript is invalid. Thrown by the returned Task.

SessionSecurityException

The calling session does not have MODIFY_SECURITY permission. Thrown by the returned Task.

ClusterRoutingException

A transient cluster error occured. Thrown by the returned Task.

SessionClosedException

The calling session is closed. Thrown by the returned Task.

UpdateStoreAsync(String, CancellationToken)

Sends a command script to the server to update the security store.

Declaration
Task<object> UpdateStoreAsync(string commandScript, CancellationToken cancellationToken)
Parameters
Type Name Description
System.String commandScript

The command script to send to the server.

System.Threading.CancellationToken cancellationToken

The cancellation token used to cancel the current operation.

Returns
Type Description
System.Threading.Tasks.Task<System.Object>

The Task representing the current operation.

Remarks

If the operation completes successfully, the Task result will be null. The return value of this operation is Task{Object} rather than Task to provide better forward compatibility with future iterations of this API that may provide a non-null result with a more specific type.

The script may be generated using a IScriptBuilder obtained from the feature.

Each line of commandScript is a command to update the store.

The server attempts to execute each command in order against a copy of the store. If any command fails, none of the changes will be applied. If all commands succeed, the changes will be applied.

Exceptions
Type Condition
System.ArgumentNullException

The commandScript is null.

CommandScriptException

The given commandScript is invalid. Thrown by the returned Task.

SessionSecurityException

The calling session does not have MODIFY_SECURITY permission. Thrown by the returned Task.

ClusterRoutingException

A transient cluster error occured. Thrown by the returned Task.

SessionClosedException

The calling session is closed. Thrown by the returned Task.

Back to top