Show / Hide Table of Contents

Class DefaultOrchestrationManager

The default orchestration manager.

Inheritance
System.Object
Loggable
DefaultOrchestrationManager
Implements
ILoggable
IOrchestrationManager
IAsyncInitializable
IAsyncFinalizable
Inherited Members
Loggable.Logger
Loggable.GetLogger()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Kephas.Orchestration
Assembly: Kephas.Orchestration.dll
Syntax
[OverridePriority(Priority.Low)]
public class DefaultOrchestrationManager : Loggable, ILoggable, IOrchestrationManager, IAsyncInitializable, IAsyncFinalizable

Constructors

| Improve this Doc View Source

DefaultOrchestrationManager(IAppRuntime, IEventHub, IMessageBroker, IExportFactory<IProcessStarterFactory>)

Initializes a new instance of the DefaultOrchestrationManager class.

Declaration
public DefaultOrchestrationManager(IAppRuntime appRuntime, IEventHub eventHub, IMessageBroker messageBroker, IExportFactory<IProcessStarterFactory> processStarterFactoryFactory)
Parameters
Type Name Description
IAppRuntime appRuntime

The application runtime.

IEventHub eventHub

The event hub.

IMessageBroker messageBroker

The message broker.

IExportFactory<IProcessStarterFactory> processStarterFactoryFactory

Factory for the process starter factory.

Properties

| Improve this Doc View Source

AppContext

Gets a context for the application.

Declaration
public IContext AppContext { get; }
Property Value
Type Description
IContext

The application context.

| Improve this Doc View Source

AppRuntime

Gets the application runtime.

Declaration
public IAppRuntime AppRuntime { get; }
Property Value
Type Description
IAppRuntime

The application runtime.

| Improve this Doc View Source

EventHub

Gets the event hub.

Declaration
public IEventHub EventHub { get; }
Property Value
Type Description
IEventHub

The event hub.

| Improve this Doc View Source

LiveApps

Gets the live apps cache.

Declaration
protected ConcurrentDictionary<string, IAppEvent> LiveApps { get; }
Property Value
Type Description
System.Collections.Concurrent.ConcurrentDictionary<System.String, IAppEvent>

The live apps cache.

| Improve this Doc View Source

MessageBroker

Gets the message broker.

Declaration
public IMessageBroker MessageBroker { get; }
Property Value
Type Description
IMessageBroker

The message broker.

| Improve this Doc View Source

TimerDueTime

Gets or sets the timer due time.

Declaration
protected TimeSpan TimerDueTime { get; set; }
Property Value
Type Description
System.TimeSpan

The timer due time.

| Improve this Doc View Source

TimerPeriod

Gets or sets the timer period.

Declaration
protected TimeSpan TimerPeriod { get; set; }
Property Value
Type Description
System.TimeSpan

The timer period.

Methods

| Improve this Doc View Source

CreateAppHeartbeatEvent()

Creates application heartbeat event.

Declaration
protected virtual AppHeartbeatEvent CreateAppHeartbeatEvent()
Returns
Type Description
AppHeartbeatEvent

The new application heartbeat event.

| Improve this Doc View Source

CreateProcessStarterFactory(IAppInfo, IExpando, IContext)

Creates a new process starter factory.

Declaration
protected virtual IProcessStarterFactory CreateProcessStarterFactory(IAppInfo appInfo, IExpando arguments, IContext context = null)
Parameters
Type Name Description
IAppInfo appInfo

Information describing the application.

IExpando arguments

The arguments.

IContext context

Optional. A context for initialization.

Returns
Type Description
IProcessStarterFactory

The new process starter factory.

| Improve this Doc View Source

CreateStopAppMessage(IRuntimeAppInfo, IContext)

Creates stop application message.

Declaration
protected virtual StopAppMessage CreateStopAppMessage(IRuntimeAppInfo runtimeAppInfo, IContext context = null)
Parameters
Type Name Description
IRuntimeAppInfo runtimeAppInfo

Information describing the runtime application.

IContext context

Optional. A context for initialization.

Returns
Type Description
StopAppMessage

The new stop application message.

| Improve this Doc View Source

FinalizeAsync(IContext, CancellationToken)

Finalizes the service.

Declaration
public virtual Task FinalizeAsync(IContext context, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
IContext context

The context for finalization.

System.Threading.CancellationToken cancellationToken

Optional. The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task

An asynchronous result.

| Improve this Doc View Source

GetAppExecutableArgs(IAppInfo)

Gets the app executable arguments.

Declaration
protected virtual IEnumerable<string> GetAppExecutableArgs(IAppInfo appInfo)
Parameters
Type Name Description
IAppInfo appInfo

Information describing the application.

Returns
Type Description
System.Collections.Generic.IEnumerable<System.String>

The app executable arguments.

| Improve this Doc View Source

GetAppExecutablePath(IAppInfo)

Gets the app executable path.

Declaration
protected virtual string GetAppExecutablePath(IAppInfo appInfo)
Parameters
Type Name Description
IAppInfo appInfo

Information describing the application.

Returns
Type Description
System.String

The app executable path.

| Improve this Doc View Source

GetAppKey(IRuntimeAppInfo)

Gets the application key in the live apps collection.

Declaration
protected virtual string GetAppKey(IRuntimeAppInfo appInfo)
Parameters
Type Name Description
IRuntimeAppInfo appInfo

Information describing the application.

Returns
Type Description
System.String

The application key.

| Improve this Doc View Source

GetLiveAppsAsync(IContext, CancellationToken)

Gets the live apps asynchronously.

Declaration
public virtual Task<IEnumerable<IRuntimeAppInfo>> GetLiveAppsAsync(IContext context = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
IContext context

Optional. The context.

System.Threading.CancellationToken cancellationToken

Optional. The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<IRuntimeAppInfo>>

An asynchronous result that yields the live apps.

| Improve this Doc View Source

InitializeAsync(IContext, CancellationToken)

Initializes the service asynchronously.

Declaration
public virtual Task InitializeAsync(IContext context, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
IContext context

A context for initialization.

System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task

An awaitable task.

| Improve this Doc View Source

InitializeLiveAppsAsync(CancellationToken)

Initializes the live apps cache asynchronously.

Declaration
protected virtual Task InitializeLiveAppsAsync(CancellationToken cancellationToken)
Parameters
Type Name Description
System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task

An asynchronous result.

| Improve this Doc View Source

OnAppHeartbeatAsync(AppHeartbeatEvent, IContext, CancellationToken)

Callback invoked when an application notified its heartbeat.

Declaration
protected virtual Task OnAppHeartbeatAsync(AppHeartbeatEvent appEvent, IContext context, CancellationToken cancellationToken)
Parameters
Type Name Description
AppHeartbeatEvent appEvent

The application event.

IContext context

An optional context for initialization.

System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task

An asynchronous result.

| Improve this Doc View Source

OnAppStartedAsync(AppStartedEvent, IContext, CancellationToken)

Callback invoked when an application was started.

Declaration
protected virtual Task OnAppStartedAsync(AppStartedEvent appEvent, IContext context, CancellationToken cancellationToken)
Parameters
Type Name Description
AppStartedEvent appEvent

The application event.

IContext context

An optional context for initialization.

System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task

An asynchronous result.

| Improve this Doc View Source

OnAppStoppedAsync(AppStoppedEvent, IContext, CancellationToken)

Callback invoked when an application was stopped.

Declaration
protected virtual Task OnAppStoppedAsync(AppStoppedEvent appEvent, IContext context, CancellationToken cancellationToken)
Parameters
Type Name Description
AppStoppedEvent appEvent

The application event.

IContext context

An optional context for initialization.

System.Threading.CancellationToken cancellationToken

The cancellation token.

Returns
Type Description
System.Threading.Tasks.Task

An asynchronous result.

| Improve this Doc View Source

OnHeartbeat(Object)

Executes the heartbeat timer action.

Declaration
protected virtual void OnHeartbeat(object state)
Parameters
Type Name Description
System.Object state

The state.

| Improve this Doc View Source

StartAppAsync(IAppInfo, IExpando, IContext, CancellationToken)

Starts the application asynchronously.

Declaration
public virtual Task<IOperationResult> StartAppAsync(IAppInfo appInfo, IExpando arguments, IContext context = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
IAppInfo appInfo

Information describing the application.

IExpando arguments

The arguments.

IContext context

Optional. The context.

System.Threading.CancellationToken cancellationToken

Optional. The cancellation token.

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

An asynchronous result that yields an operation result.

| Improve this Doc View Source

StopAppAsync(IRuntimeAppInfo, IContext, CancellationToken)

Stops a running application asynchronously.

Declaration
public virtual Task<IOperationResult> StopAppAsync(IRuntimeAppInfo runtimeAppInfo, IContext context = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type Name Description
IRuntimeAppInfo runtimeAppInfo

Information describing the runtime application.

IContext context

Optional. The context.

System.Threading.CancellationToken cancellationToken

Optional. The cancellation token.

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

An asynchronous result that yields an operation result.

Implements

ILoggable
IOrchestrationManager
IAsyncInitializable
IAsyncFinalizable

Extension Methods

DynamicObjectExtensions.SetPropertyValue(Object, String, Object)
DynamicObjectExtensions.TrySetPropertyValue(Object, String, Object)
DynamicObjectExtensions.GetPropertyValue(Object, String)
DynamicObjectExtensions.TryGetPropertyValue(Object, String, out Object)
DynamicObjectExtensions.GetRuntimeTypeInfo(Object)
DynamicObjectExtensions.ToDynamic(Object)
DynamicObjectExtensions.ToExpando(Object)
BehaviorValue.ToBehaviorValue<TValue>(TValue)
CollectionExtensions.AddRange<T, TItem>(T, IEnumerable<TItem>)
LoggingExtensions.GetLogger(Object, IContext)
TypeExtensions.GetAbstractType(Object)
TypeExtensions.GetAbstractTypeInfo(Object)
ReflectionHelper.GetTypeInfo(Object)
EntityEntryExtensions.TryGetAttachedEntityEntry(Object)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX