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

UpdateStore(String, IUpdateStoreCallback)

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

Declaration
void UpdateStore(string commandScript, IUpdateStoreCallback callback)
Parameters
Type Name Description
System.String commandScript

The command script to send to the server.

IUpdateStoreCallback callback

The callback to receive status notifications for this operation.

Remarks

Caution

Deprecated since 6.7. Methods that use callbacks are deprecated and will be removed in a future release. Use a Task instead.

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.

UpdateStore<TContext>(String, TContext, IUpdateStoreContextCallback<TContext>)

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

Declaration
void UpdateStore<TContext>(string commandScript, TContext context, IUpdateStoreContextCallback<TContext> callback)
Parameters
Type Name Description
System.String commandScript

The command script to send to the server.

TContext context

The context of this operation.

IUpdateStoreContextCallback<TContext> callback

The callback to receive status notifications for this operation.

Type Parameters
Name Description
TContext

The context type.

Remarks

Caution

Deprecated since 6.7. Methods that use contextual callbacks are deprecated and will be removed in a future release. Use a Task instead.

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.

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
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
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.

CancellationToken cancellationToken

The cancellation token used to cancel the current operation.

Returns
Type Description
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
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