IServerEvents
Assembly: ServiceStack.dll
Declaration
public interface IServerEvents : IDisposable
Methods
NotifyAll(String, Object)
Declaration
void NotifyAll(string selector, object message)
Parameters
Type | Name |
---|
System.String | selector |
System.Object | message |
NotifyAllAsync(String, Object, CancellationToken)
Declaration
Task NotifyAllAsync(string selector, object message, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|
System.String | selector |
System.Object | message |
System.Threading.CancellationToken | token |
NotifyAllJsonAsync(String, String, CancellationToken)
Declaration
Task NotifyAllJsonAsync(string selector, string json, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|
System.String | selector |
System.String | json |
System.Threading.CancellationToken | token |
NotifyChannel(String, String, Object)
Declaration
void NotifyChannel(string channel, string selector, object message)
Parameters
Type | Name |
---|
System.String | channel |
System.String | selector |
System.Object | message |
NotifyChannelAsync(String, String, Object, CancellationToken)
Declaration
Task NotifyChannelAsync(string channel, string selector, object message, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|
System.String | channel |
System.String | selector |
System.Object | message |
System.Threading.CancellationToken | token |
NotifyChannelJsonAsync(String, String, String, CancellationToken)
Declaration
Task NotifyChannelJsonAsync(string channel, string selector, string json, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|
System.String | channel |
System.String | selector |
System.String | json |
System.Threading.CancellationToken | token |
NotifySubscription(String, String, Object, String)
Declaration
void NotifySubscription(string subscriptionId, string selector, object message, string channel = null)
Parameters
Type | Name |
---|
System.String | subscriptionId |
System.String | selector |
System.Object | message |
System.String | channel |
NotifySubscriptionAsync(String, String, Object, String, CancellationToken)
Declaration
Task NotifySubscriptionAsync(string subscriptionId, string selector, object message, string channel = null, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|
System.String | subscriptionId |
System.String | selector |
System.Object | message |
System.String | channel |
System.Threading.CancellationToken | token |
NotifySubscriptionJsonAsync(String, String, String, String, CancellationToken)
Declaration
Task NotifySubscriptionJsonAsync(string subscriptionId, string selector, string json, string channel = null, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|
System.String | subscriptionId |
System.String | selector |
System.String | json |
System.String | channel |
System.Threading.CancellationToken | token |
NotifyUserId(String, String, Object, String)
Declaration
void NotifyUserId(string userId, string selector, object message, string channel = null)
Parameters
Type | Name |
---|
System.String | userId |
System.String | selector |
System.Object | message |
System.String | channel |
NotifyUserIdAsync(String, String, Object, String, CancellationToken)
Declaration
Task NotifyUserIdAsync(string userId, string selector, object message, string channel = null, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|
System.String | userId |
System.String | selector |
System.Object | message |
System.String | channel |
System.Threading.CancellationToken | token |
NotifyUserIdJsonAsync(String, String, String, String, CancellationToken)
Declaration
Task NotifyUserIdJsonAsync(string userId, string selector, string json, string channel = null, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|
System.String | userId |
System.String | selector |
System.String | json |
System.String | channel |
System.Threading.CancellationToken | token |
NotifyUserName(String, String, Object, String)
Declaration
void NotifyUserName(string userName, string selector, object message, string channel = null)
Parameters
Type | Name |
---|
System.String | userName |
System.String | selector |
System.Object | message |
System.String | channel |
NotifyUserNameAsync(String, String, Object, String, CancellationToken)
Declaration
Task NotifyUserNameAsync(string userName, string selector, object message, string channel = null, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|
System.String | userName |
System.String | selector |
System.Object | message |
System.String | channel |
System.Threading.CancellationToken | token |
NotifyUserNameJsonAsync(String, String, String, String, CancellationToken)
Declaration
Task NotifyUserNameJsonAsync(string userName, string selector, string json, string channel = null, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|
System.String | userName |
System.String | selector |
System.String | json |
System.String | channel |
System.Threading.CancellationToken | token |
NotifySession(String, String, Object, String)
Declaration
void NotifySession(string sessionId, string selector, object message, string channel = null)
Parameters
Type | Name |
---|
System.String | sessionId |
System.String | selector |
System.Object | message |
System.String | channel |
NotifySessionAsync(String, String, Object, String, CancellationToken)
Declaration
Task NotifySessionAsync(string sessionId, string selector, object message, string channel = null, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|
System.String | sessionId |
System.String | selector |
System.Object | message |
System.String | channel |
System.Threading.CancellationToken | token |
NotifySessionJsonAsync(String, String, String, String, CancellationToken)
Declaration
Task NotifySessionJsonAsync(string sessionId, string selector, string json, string channel = null, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|
System.String | sessionId |
System.String | selector |
System.String | json |
System.String | channel |
System.Threading.CancellationToken | token |
GetSubscriptionInfo(String)
Declaration
SubscriptionInfo GetSubscriptionInfo(string id)
Returns
ServiceStack.SubscriptionInfo
Parameters
GetSubscriptionInfosByUserId(String)
Declaration
List<SubscriptionInfo> GetSubscriptionInfosByUserId(string userId)
Returns
System.Collections.Generic.List<ServiceStack.SubscriptionInfo>
Parameters
Type | Name |
---|
System.String | userId |
GetAllSubscriptionInfos()
Declaration
List<SubscriptionInfo> GetAllSubscriptionInfos()
Returns
System.Collections.Generic.List<ServiceStack.SubscriptionInfo>
RegisterAsync(IEventSubscription, Dictionary<String, String>, CancellationToken)
Declaration
Task RegisterAsync(IEventSubscription subscription, Dictionary<string, string> connectArgs = null, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|
ServiceStack.IEventSubscription | subscription |
System.Collections.Generic.Dictionary<System.String,System.String> | connectArgs |
System.Threading.CancellationToken | token |
UnRegisterAsync(String, CancellationToken)
Declaration
Task UnRegisterAsync(string subscriptionId, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|
System.String | subscriptionId |
System.Threading.CancellationToken | token |
GetNextSequence(String)
Declaration
long GetNextSequence(string sequenceId)
Returns
System.Int64
Parameters
Type | Name |
---|
System.String | sequenceId |
RemoveExpiredSubscriptions()
Declaration
int RemoveExpiredSubscriptions()
Returns
System.Int32
RemoveExpiredSubscriptionsAsync(CancellationToken)
Declaration
Task<int> RemoveExpiredSubscriptionsAsync(CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<System.Int32>
Parameters
Type | Name |
---|
System.Threading.CancellationToken | token |
SubscribeToChannels(String, String[])
Declaration
void SubscribeToChannels(string subscriptionId, string[] channels)
Parameters
Type | Name |
---|
System.String | subscriptionId |
System.String[] | channels |
SubscribeToChannelsAsync(String, String[], CancellationToken)
Declaration
Task SubscribeToChannelsAsync(string subscriptionId, string[] channels, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|
System.String | subscriptionId |
System.String[] | channels |
System.Threading.CancellationToken | token |
UnsubscribeFromChannels(String, String[])
Declaration
void UnsubscribeFromChannels(string subscriptionId, string[] channels)
Parameters
Type | Name |
---|
System.String | subscriptionId |
System.String[] | channels |
UnsubscribeFromChannelsAsync(String, String[], CancellationToken)
Declaration
Task UnsubscribeFromChannelsAsync(string subscriptionId, string[] channels, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|
System.String | subscriptionId |
System.String[] | channels |
System.Threading.CancellationToken | token |
QueueAsyncTask(Func<Task>)
Declaration
void QueueAsyncTask(Func<Task> task)
Parameters
Type | Name |
---|
System.Func<System.Threading.Tasks.Task> | task |
GetMemoryServerEvents()
Declaration
MemoryServerEvents GetMemoryServerEvents()
Returns
ServiceStack.MemoryServerEvents
GetSubscriptionsDetails(String[])
Declaration
List<Dictionary<string, string>> GetSubscriptionsDetails(params string[] channels)
Returns
System.Collections.Generic.List<System.Collections.Generic.Dictionary<System.String,System.String>>
Parameters
Type | Name |
---|
System.String[] | channels |
GetAllSubscriptionsDetails()
Declaration
List<Dictionary<string, string>> GetAllSubscriptionsDetails()
Returns
System.Collections.Generic.List<System.Collections.Generic.Dictionary<System.String,System.String>>
PulseAsync(String, CancellationToken)
Declaration
Task<bool> PulseAsync(string subscriptionId, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<System.Boolean>
Parameters
Type | Name |
---|
System.String | subscriptionId |
System.Threading.CancellationToken | token |
Reset()
Start()
Stop()
StopAsync()
Returns
System.Threading.Tasks.Task
GetStats()
Declaration
Dictionary<string, string> GetStats()
Returns
System.Collections.Generic.Dictionary<System.String,System.String>