Interface CommonServiceInterface<S>
- Type Parameters:
S- the entity type returned by the service implementation
- All Known Implementing Classes:
MsftDnsClientServerAddressService, MsftNetAdapterService, MsftNetAdapterToIpAndDnsAndProfileService, MsftNetConnectionProfileService, MsftNetIpAddressService, Win32AssociatedProcessorMemoryService, Win32BaseboardService, Win32BatteryService, Win32BiosService, Win32CacheMemoryService, Win32DesktopMonitorService, Win32DiskDriveService, Win32DiskDriveToDiskPartitionService, Win32DiskDriveToPartitionAndLogicalDiskService, Win32DiskPartitionService, Win32DiskPartitionToLogicalDiskService, Win32EnvironmentService, Win32LogicalDiskService, Win32LogicalDiskToPartitionService, Win32NetworkAdapterConfigurationService, Win32NetworkAdapterService, Win32NetworkAdapterSettingService, Win32NetworkAdapterToConfigurationService, Win32OperatingSystemService, Win32PhysicalMemoryService, Win32PnPEntityService, Win32PortConnectorService, Win32PrinterService, Win32ProcessorService, Win32ProcessorToCacheMemoryService, Win32ProcessService, Win32SoundDeviceService, Win32UserAccountService, Win32VideoControllerService
public interface CommonServiceInterface<S>
Common service interface whose method implementations provide a way to fetch WMI data from PowerShell
in the form of a
List
Useful for implementing services of classes which return more than one instance
such as the Win32_NetworkAdapter WMI class
- Since:
- 2.2.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionget()Implementations of this method are expected to query the PowerShell using methods that automatically handle the PowerShell process lifecycle and then map the results to the expected entity types using a custom implementation or the default methods ofCommonMappingInterfaceget(long timeout) Implementations of this method are expected to skipPowerShellentirely and rely onTerminalUtilityinstead for PowerShell session management and then map the results to the expected entity types using a custom implementation or the default methods ofCommonMappingInterfaceget(com.profesorfalken.jpowershell.PowerShell powerShell) Implementations of this method are expected to query the PowerShell using methods that delegate the responsibility of managing the PowerShell session to the caller and then map the results to the expected entity types using a custom implementation or the default methods ofCommonMappingInterface
-
Method Details
-
get
Implementations of this method are expected to query the PowerShell using methods that automatically handle the PowerShell process lifecycle and then map the results to the expected entity types using a custom implementation or the default methods ofCommonMappingInterface- Returns:
- a
Listof entities of type<S>defined by the caller - Since:
- 2.2.0
-
get
Implementations of this method are expected to query the PowerShell using methods that delegate the responsibility of managing the PowerShell session to the caller and then map the results to the expected entity types using a custom implementation or the default methods ofCommonMappingInterface- Parameters:
powerShell- the caller-managed PowerShell session passed to the method- Returns:
- a
Listof entities of type<S>defined by the caller - Since:
- 2.2.0
-
get
Implementations of this method are expected to skipPowerShellentirely and rely onTerminalUtilityinstead for PowerShell session management and then map the results to the expected entity types using a custom implementation or the default methods ofCommonMappingInterface- Parameters:
timeout- the maximum time (in seconds) to wait for the PowerShell command to complete before terminating the process- Returns:
- a
Listof entities of type<S>defined by the caller - Since:
- 3.1.0
-