IPubSubManagerService
Last updated
Last updated
IPubSubManagerService
in assembly SanteDB.Core.Api version 3.0.1980.0
Represents a pub/sub manager service
Event | Type | Description |
---|---|---|
Operation | Response/Return | Input/Parameter | Description |
---|---|---|---|
Upstream publish and subscribe
...
<section xsi:type="ApplicationServiceContextConfigurationSection" threadPoolSize="4">
<serviceProviders>
...
<add type="SanteDB.Client.Upstream.Management.UpstreamPubSubManager, SanteDB.Client, Version=3.0.1980.0, Culture=neutral, PublicKeyToken=null" />
...
</serviceProviders>
Represents a pub/sub manager which stores definitions in a database
...
<section xsi:type="ApplicationServiceContextConfigurationSection" threadPoolSize="4">
<serviceProviders>
...
<add type="SanteDB.Persistence.PubSub.ADO.AdoPubSubManager, SanteDB.Persistence.PubSub.ADO, Version=3.0.1980.0, Culture=neutral, PublicKeyToken=null" />
...
</serviceProviders>
/// Example Implementation
using SanteDB.Core.PubSub;
/// Other usings here
public class MyPubSubManagerService : SanteDB.Core.PubSub.IPubSubManagerService {
public String ServiceName => "My own IPubSubManagerService service";
/// <summary>
/// Fired when a subscription is requested, but not yet registered
/// </summary>
public event EventHandler<DataPersistingEventArgs<PubSubSubscriptionDefinition>> Subscribing;
/// <summary>
/// Fired after a subscription has been registered
/// </summary>
public event EventHandler<DataPersistedEventArgs<PubSubSubscriptionDefinition>> Subscribed;
/// <summary>
/// Fired when an unsubscription is requested
/// </summary>
public event EventHandler<DataPersistingEventArgs<PubSubSubscriptionDefinition>> UnSubscribing;
/// <summary>
/// Fired when a subscription has been terminated
/// </summary>
public event EventHandler<DataPersistedEventArgs<PubSubSubscriptionDefinition>> UnSubscribed;
/// <summary>
/// Fired after a subscription and channel are activating
/// </summary>
public event EventHandler<DataPersistingEventArgs<PubSubSubscriptionDefinition>> Activating;
/// <summary>
/// Fired after a subscription and channel are deactivating
/// </summary>
public event EventHandler<DataPersistingEventArgs<PubSubSubscriptionDefinition>> DeActivating;
/// <summary>
/// Fired after a subscription and channel are activated
/// </summary>
public event EventHandler<DataPersistedEventArgs<PubSubSubscriptionDefinition>> Activated;
/// <summary>
/// Fired after a subscription and channel are deactivated
/// </summary>
public event EventHandler<DataPersistedEventArgs<PubSubSubscriptionDefinition>> DeActivated;
/// <summary>
/// Find an existing channel
/// </summary>
public IQueryResultSet<PubSubChannelDefinition> FindChannel(Expression<Func<PubSubChannelDefinition,Boolean>> filter){
throw new System.NotImplementedException();
}
/// <summary>
/// Find an existing subscription
/// </summary>
public IQueryResultSet<PubSubSubscriptionDefinition> FindSubscription(Expression<Func<PubSubSubscriptionDefinition,Boolean>> filter){
throw new System.NotImplementedException();
}
/// <summary>
/// Find an existing channel
/// </summary>
public IEnumerable<PubSubChannelDefinition> FindChannel(Expression<Func<PubSubChannelDefinition,Boolean>> filter,Int32 offset,Int32 count,Int32& totalResults){
throw new System.NotImplementedException();
}
/// <summary>
/// Find an existing subscription
/// </summary>
public IEnumerable<PubSubSubscriptionDefinition> FindSubscription(Expression<Func<PubSubSubscriptionDefinition,Boolean>> filter,Int32 offset,Int32 count,Int32& totalResults){
throw new System.NotImplementedException();
}
/// <summary>
/// Registers the specified pub-sub channel using the specified dispatcher
/// </summary>
public PubSubChannelDefinition RegisterChannel(String name,Type dispatcherFactoryType,Uri endpoint,IDictionary<String,String> settings){
throw new System.NotImplementedException();
}
/// <summary>
/// Registers the specified pub-sub channel using the specified dispatcher
/// </summary>
public PubSubChannelDefinition RegisterChannel(String name,String dispatchFactoryId,Uri endpoint,IDictionary<String,String> settings){
throw new System.NotImplementedException();
}
/// <summary>
/// Updates the specified pub-sub channel
/// </summary>
public PubSubChannelDefinition UpdateChannel(Guid key,String name,Uri endpoint,IDictionary<String,String> settings){
throw new System.NotImplementedException();
}
/// <summary>
/// Register a new subscription for the specified type
/// </summary>
public PubSubSubscriptionDefinition RegisterSubscription<TModel>(String name,String description,PubSubEventType events,Expression<Func<TModel,Boolean>> filter,Guid channelId,String supportAddress,Nullable<DateTimeOffset> notBefore,Nullable<DateTimeOffset> notAfter){
throw new System.NotImplementedException();
}
/// <summary>
/// Register a new subscription for the specified type
/// </summary>
public PubSubSubscriptionDefinition RegisterSubscription(Type modelType,String name,String description,PubSubEventType events,String hdsiFilter,Guid channelId,String supportAddress,Nullable<DateTimeOffset> notBefore,Nullable<DateTimeOffset> notAfter){
throw new System.NotImplementedException();
}
/// <summary>
/// Update subscription data
/// </summary>
public PubSubSubscriptionDefinition UpdateSubscription(Guid key,String name,String description,PubSubEventType events,String hdsiFilter,String supportAddress,Nullable<DateTimeOffset> notBefore,Nullable<DateTimeOffset> notAfter){
throw new System.NotImplementedException();
}
/// <summary>
/// Activate a subscription
/// </summary>
public PubSubSubscriptionDefinition ActivateSubscription(Guid key,Boolean isActive){
throw new System.NotImplementedException();
}
/// <summary>
/// Gets the subscription information
/// </summary>
public PubSubSubscriptionDefinition GetSubscription(Guid id){
throw new System.NotImplementedException();
}
/// <summary>
/// Gets the channel information
/// </summary>
public PubSubChannelDefinition GetChannel(Guid id){
throw new System.NotImplementedException();
}
/// <summary>
/// Removes the specified channel and all related subscriptions
/// </summary>
public PubSubChannelDefinition RemoveChannel(Guid id){
throw new System.NotImplementedException();
}
/// <summary>
/// Removes the subscription
/// </summary>
public PubSubSubscriptionDefinition RemoveSubscription(Guid id){
throw new System.NotImplementedException();
}
/// <summary>
/// Get subscription by its name
/// </summary>
public PubSubSubscriptionDefinition GetSubscriptionByName(String name){
throw new System.NotImplementedException();
}
}