Class BootConfLoader
Gets the boot configuration for app chassis.
Reads the local process config to determine where the metabase is and what file system to use to connect to it.
Once metabase connection is established get all information from there identifying the host by sky/Host/$name.
If the name of the host is not set in config, then take it from SKY_HOST_NAME environment var. If that name is blank then
take host name from: DEFAULT_WORLD_GLOBAL_ZONE_PATH+LOCAL_COMPUTER_NAME (NetBIOSName)
Inheritance
System.Object
BootConfLoader
Implements
System.IDisposable
Inherited Members
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()
Assembly: Azos.Sky.dll
Syntax
public sealed class BootConfLoader : DisposableObject, IDisposable
Fields
CMD_ARG_APP_NAME
Used to specify application name from command line
Declaration
public const string CMD_ARG_APP_NAME = "app-name"
Field Value
Type |
Description |
System.String |
|
CMD_ARG_SKY_SWITCH
Declaration
public const string CMD_ARG_SKY_SWITCH = "sky"
Field Value
Type |
Description |
System.String |
|
CONFIG_APPLICATION_NAME_ATTR
Declaration
public const string CONFIG_APPLICATION_NAME_ATTR = "app-name"
Field Value
Type |
Description |
System.String |
|
CONFIG_FS_SECTION
Declaration
public const string CONFIG_FS_SECTION = "file-system"
Field Value
Type |
Description |
System.String |
|
CONFIG_HOST_NAME_ATTR
Specifies host name in metabase, i.e. "/USA/East/Cle/A/I/wmed0001"
Declaration
public const string CONFIG_HOST_NAME_ATTR = "name"
Field Value
Type |
Description |
System.String |
|
CONFIG_HOST_SECTION
Declaration
public const string CONFIG_HOST_SECTION = "host"
Field Value
Type |
Description |
System.String |
|
Declaration
public const string CONFIG_METABASE_SECTION = "metabase"
Field Value
Type |
Description |
System.String |
|
CONFIG_ROOT_ATTR
Declaration
public const string CONFIG_ROOT_ATTR = "root"
Field Value
Type |
Description |
System.String |
|
CONFIG_SESSION_CONNECT_PARAMS_SECTION
Declaration
public const string CONFIG_SESSION_CONNECT_PARAMS_SECTION = "session-connect-params"
Field Value
Type |
Description |
System.String |
|
CONFIG_SKY_SECTION
Declaration
public const string CONFIG_SKY_SECTION = "sky"
Field Value
Type |
Description |
System.String |
|
DEFAULT_HOST_ZONE_PATH
Used to append to local machine name if ENV_VAR_HOST_NAME is not set, then this value is concatenated with local machine name
Declaration
public const string DEFAULT_HOST_ZONE_PATH = "/World.r/Global.noc/Default.z"
Field Value
Type |
Description |
System.String |
|
ENV_VAR_HOST_NAME
Declaration
public const string ENV_VAR_HOST_NAME = "SKY_HOST_NAME"
Field Value
Type |
Description |
System.String |
|
Declaration
public const string ENV_VAR_METABASE_FS_CSTRING = "SKY_METABASE_FS_CSTRING"
Field Value
Type |
Description |
System.String |
|
Declaration
public const string ENV_VAR_METABASE_FS_ROOT = "SKY_METABASE_FS_ROOT"
Field Value
Type |
Description |
System.String |
|
Declaration
public const string ENV_VAR_METABASE_FS_TYPE = "SKY_METABASE_FS_TYPE"
Field Value
Type |
Description |
System.String |
|
LOG_FROM_BOOTLOADER
Declaration
public const string LOG_FROM_BOOTLOADER = "AppBootLoader"
Field Value
Type |
Description |
System.String |
|
Properties
BootApplication
References app chassis under which this booted
Declaration
public IApplication BootApplication { get; }
Property Value
DynamicHostNameSuffix
For dynamic hosts, host name suffix as determined at boot. It is the last part of HostName for dynamic hosts
including the separation character
Declaration
public string DynamicHostNameSuffix { get; }
Property Value
Type |
Description |
System.String |
|
HostName
Host name as determined at boot
Declaration
public string HostName { get; }
Property Value
Type |
Description |
System.String |
|
IsDynamicHost
True when metabase section host declares this host as dynamic and HostName ends with DynamicHostNameSuffix
Declaration
public bool IsDynamicHost { get; }
Property Value
Type |
Description |
System.Boolean |
|
Loaded
Returns true after configuration has loaded
Declaration
public bool Loaded { get; }
Property Value
Type |
Description |
System.Boolean |
|
LoadException
Returns exception (if any) has occurred during application config loading process
Declaration
public Exception LoadException { get; }
Property Value
Type |
Description |
System.Exception |
|
Metabase as determined at boot or null in case of failure
Declaration
public Metabank Metabase { get; }
Property Value
ParentZoneGovernorPrimaryHostName
Returns primary zone governor parent host as determined at boot or null if this is the top-level host
Declaration
public string ParentZoneGovernorPrimaryHostName { get; }
Property Value
Type |
Description |
System.String |
|
SystemApplicationType
Application container system type
Declaration
public SystemApplicationType SystemApplicationType { get; }
Property Value
Methods
Destructor()
Declaration
protected override void Destructor()
Overrides
Load(String[], Configuration)
Loads initial application container configuration (app container may re-read it in future using metabase) per supplied local one also connecting the metabase
Declaration
public Configuration Load(string[] cmdArgs, Configuration bootConfig)
Parameters
Type |
Name |
Description |
System.String[] |
cmdArgs |
|
Configuration |
bootConfig |
|
Returns
ProcessAllExistingIncludes(ConfigSectionNode, String, String)
Declaration
public static void ProcessAllExistingIncludes(ConfigSectionNode node, string includePragma, string level)
Parameters
Type |
Name |
Description |
ConfigSectionNode |
node |
|
System.String |
includePragma |
|
System.String |
level |
|
writeLog(MessageType, String)
Declaration
public void writeLog(MessageType type, string text)
Parameters
Type |
Name |
Description |
MessageType |
type |
|
System.String |
text |
|
Implements
System.IDisposable
Extension Methods