@microsoft/windows-admin-center-sdk
Version:
Microsoft - Windows Admin Center Shell
73 lines (72 loc) • 2.45 kB
TypeScript
import { CimConnection } from '../data/cim-connection';
import { FileTransfer } from '../data/file-transfer';
import { PowerShellConnection } from '../data/powershell-connection';
import { EnvironmentConnectionTypeInfo } from '../manifest/environment-modules';
import { Connection } from './connection';
import { ConnectionManager } from './connection-manager';
/**
* Provides a shortcut to accessing common information about the active connection.
*/
export declare class ActiveConnection {
private connectionManager;
private cimConnection;
private powerShellConnection;
private fileTransfer;
/**
* map data of connection type information.
*/
private map;
/**
* Gets the active connection
*/
get value(): Connection;
/**
* Sets the active connection
*/
set value(value: Connection);
/**
* Indicates if the active connection is to a server
*/
get isServer(): boolean;
/**
* Indicates if the active connection is to a cluster
*/
get isCluster(): boolean;
/**
* Indicates if the active connection is to a node (cluster or server)
*/
get isNode(): boolean;
/**
* Indicates if the active connection is to a failover cluster
* @deprecated since 09/16/19. Please use isBritannicEnabled from ClusterInventoryCache instead
*/
get isFailoverCluster(): boolean;
/**
* Indicates if the active connection is to a windows client
*/
get isWindowsClient(): boolean;
/**
* Indicates if the active connection is to an EFLOW device
*/
get isEflowDevice(): boolean;
/**
* If the active connection is a cluster, the cluster node names. Otherwise, an empty array
*/
get clusterNodes(): string[];
/**
* If the active connection is a node (cluster or server), the node name. Otherwise, null.
*/
get nodeName(): string;
/**
* If the active connection is a node (cluster or server), the valid node name (may be alias). Otherwise, null.
*/
get validNodeName(): string;
/**
* Gets the connection type info for the active connection
*/
get connectionTypeInfo(): EnvironmentConnectionTypeInfo;
/**
* Constructor for the active connection class
*/
constructor(connectionManager: ConnectionManager, cimConnection: CimConnection, powerShellConnection: PowerShellConnection, fileTransfer: FileTransfer);
}