public class SafeProcessHandle extends SafeHandleZeroOrMinusOneIsInvalid
.NET documentation at https://learn.microsoft.com/dotnet/api/Microsoft.Win32.SafeHandles.SafeProcessHandle
Powered by JCOBridge: more info at https://www.jcobridge.com
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
assemblyFullName
Fully assembly qualified name: System.Diagnostics.Process, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
|
static java.lang.String |
assemblyShortName
Assembly name: System.Diagnostics.Process
|
static java.lang.String |
className
Qualified class name: Microsoft.Win32.SafeHandles.SafeProcessHandle
|
static JCType |
classType
The type managed from JCOBridge.
|
| Constructor and Description |
|---|
SafeProcessHandle()
Initializes a new instance by invoking the .NET constructor.
|
SafeProcessHandle(java.lang.Object instance)
Internal constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static SafeProcessHandle |
cast(IJCOBridgeReflected from)
Try to cast the
IJCOBridgeReflected instance into SafeProcessHandle, a cast assert is made to check if types are compatible. |
java.lang.String |
getJCOAssemblyName()
Returns the full name of the assembly of the .NET type.
|
java.lang.String |
getJCOClassName()
Returns the full name of the .NET type.
|
java.lang.Object |
getJCOInstance()
Returns the underlying object managed by the bridge.
|
java.lang.String |
getJCOObjectName()
Returns the name of the .NET type qualified with its assembly.
|
JCType |
getJCOType()
Returns the
JCType of the .NET type. |
int |
getProcessId()
Gets the value of the .NET property ProcessId.
|
void |
Kill()
Invokes the .NET member Kill.
|
static SafeProcessHandle |
Open(int processId)
Invokes the .NET member Open.
|
void |
Resume()
Invokes the .NET member Resume.
|
void |
setJCOInstance(JCObject instance)
Sets the underlying object managed by the bridge.
|
void |
setProcessId(int ProcessId)
Sets the value of the .NET property ProcessId.
|
boolean |
Signal(PosixSignal signal)
Invokes the .NET member Signal.
|
static SafeProcessHandle |
Start(ProcessStartInfo startInfo)
Invokes the .NET member Start.
|
static boolean |
TryOpen(int processId,
JCORefOut<SafeProcessHandle> processHandle)
Invokes the .NET member TryOpen.
|
boolean |
TryWaitForExit(TimeSpan timeout,
JCORefOut<ProcessExitStatus> exitStatus)
Invokes the .NET member TryWaitForExit.
|
ProcessExitStatus |
WaitForExit()
Invokes the .NET member WaitForExit.
|
Task_1 |
WaitForExitAsync(CancellationToken cancellationToken)
Invokes the .NET member WaitForExitAsync.
|
Task_1 |
WaitForExitOrKillOnCancellationAsync(CancellationToken cancellationToken)
Invokes the .NET member WaitForExitOrKillOnCancellationAsync.
|
ProcessExitStatus |
WaitForExitOrKillOnTimeout(TimeSpan timeout)
Invokes the .NET member WaitForExitOrKillOnTimeout.
|
close, Close, DangerousAddRef, DangerousRelease, Dispose, getIsClosed, getIsInvalid, SetHandleAsInvalidpublic static final java.lang.String assemblyFullName
public static final java.lang.String assemblyShortName
public static final java.lang.String className
public SafeProcessHandle()
throws java.lang.Throwable,
ArgumentNullException,
PlatformNotSupportedException
java.lang.Throwable - if the .NET constructor failsArgumentNullException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itpublic SafeProcessHandle(java.lang.Object instance)
throws java.lang.Throwable
instance - the underlying bridge object: it must be a JCObjectjava.lang.Throwable - if instance is not a JCObjectpublic static SafeProcessHandle cast(IJCOBridgeReflected from) throws java.lang.Throwable
IJCOBridgeReflected instance into SafeProcessHandle, a cast assert is made to check if types are compatible.from - IJCOBridgeReflected instance to be castedSafeProcessHandle instancejava.lang.Throwable - in case of error during cast operationpublic java.lang.String getJCOAssemblyName()
NetObjectgetJCOAssemblyName in interface IJCOBridgeReflectedgetJCOAssemblyName in class SafeHandleZeroOrMinusOneIsInvalidpublic java.lang.String getJCOClassName()
NetObjectgetJCOClassName in interface IJCOBridgeReflectedgetJCOClassName in class SafeHandleZeroOrMinusOneIsInvalidpublic java.lang.Object getJCOInstance()
NetObjectgetJCOInstance in interface IJCOBridgeReflectedgetJCOInstance in class SafeHandleZeroOrMinusOneIsInvalidnull if there is nonepublic java.lang.String getJCOObjectName()
NetObjectgetJCOObjectName in interface IJCOBridgeReflectedgetJCOObjectName in class SafeHandleZeroOrMinusOneIsInvalidpublic JCType getJCOType()
NetObjectJCType of the .NET type.getJCOType in interface IJCOBridgeReflectedgetJCOType in class SafeHandleZeroOrMinusOneIsInvalidpublic int getProcessId()
throws java.lang.Throwable,
ArgumentNullException,
ArgumentException,
PlatformNotSupportedException,
NotSupportedException,
ArgumentOutOfRangeException,
CultureNotFoundException,
InvalidOperationException,
ObjectDisposedException
java.lang.Throwable - if the call fails in the bridge or in the CLRArgumentNullException - if the .NET member raises itArgumentException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itNotSupportedException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itCultureNotFoundException - if the .NET member raises itInvalidOperationException - if the .NET member raises itObjectDisposedException - if the .NET member raises itpublic void Kill()
throws java.lang.Throwable,
ArgumentNullException,
ArgumentException,
PlatformNotSupportedException,
NotSupportedException,
ArgumentOutOfRangeException,
CultureNotFoundException,
InvalidOperationException,
ObjectDisposedException,
IndexOutOfRangeException,
FormatException,
Win32Exception
java.lang.Throwable - if the call fails in the bridge or in the CLRArgumentNullException - if the .NET member raises itArgumentException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itNotSupportedException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itCultureNotFoundException - if the .NET member raises itInvalidOperationException - if the .NET member raises itObjectDisposedException - if the .NET member raises itIndexOutOfRangeException - if the .NET member raises itFormatException - if the .NET member raises itWin32Exception - if the .NET member raises itpublic static SafeProcessHandle Open(int processId) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, IndexOutOfRangeException, FormatException, MissingMethodException, TargetInvocationException, UnauthorizedAccessException, Win32Exception
processId - the argument of type intjava.lang.Throwable - if the call fails in the bridge or in the CLRArgumentException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itNotSupportedException - if the .NET member raises itObjectDisposedException - if the .NET member raises itInvalidOperationException - if the .NET member raises itIndexOutOfRangeException - if the .NET member raises itFormatException - if the .NET member raises itMissingMethodException - if the .NET member raises itTargetInvocationException - if the .NET member raises itUnauthorizedAccessException - if the .NET member raises itWin32Exception - if the .NET member raises itpublic void Resume()
throws java.lang.Throwable,
ArgumentException,
ArgumentNullException,
PlatformNotSupportedException,
ArgumentOutOfRangeException,
InvalidOperationException,
NotSupportedException,
ArrayTypeMismatchException,
CultureNotFoundException,
ObjectDisposedException,
IndexOutOfRangeException,
FormatException,
Win32Exception
java.lang.Throwable - if the call fails in the bridge or in the CLRArgumentException - if the .NET member raises itArgumentNullException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itInvalidOperationException - if the .NET member raises itNotSupportedException - if the .NET member raises itArrayTypeMismatchException - if the .NET member raises itCultureNotFoundException - if the .NET member raises itObjectDisposedException - if the .NET member raises itIndexOutOfRangeException - if the .NET member raises itFormatException - if the .NET member raises itWin32Exception - if the .NET member raises itpublic void setJCOInstance(JCObject instance)
NetObjectsetJCOInstance in class SafeHandleZeroOrMinusOneIsInvalidinstance - the new underlying objectpublic void setProcessId(int ProcessId)
throws java.lang.Throwable
ProcessId - the new value of the propertyjava.lang.Throwable - if the call fails in the bridge or in the CLRpublic boolean Signal(PosixSignal signal) throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, NotSupportedException, ArgumentOutOfRangeException, CultureNotFoundException, InvalidOperationException, ObjectDisposedException, IndexOutOfRangeException, FormatException, Win32Exception
signal - the argument of type PosixSignaljava.lang.Throwable - if the call fails in the bridge or in the CLRArgumentNullException - if the .NET member raises itArgumentException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itNotSupportedException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itCultureNotFoundException - if the .NET member raises itInvalidOperationException - if the .NET member raises itObjectDisposedException - if the .NET member raises itIndexOutOfRangeException - if the .NET member raises itFormatException - if the .NET member raises itWin32Exception - if the .NET member raises itpublic static SafeProcessHandle Start(ProcessStartInfo startInfo) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, ArgumentNullException, IndexOutOfRangeException, FormatException, OutOfMemoryException, MissingMethodException, TargetInvocationException, IOException, ThreadStateException, LockRecursionException, AbandonedMutexException, Win32Exception, KeyNotFoundException, MissingMemberException, CryptographicException, SynchronizationLockException
startInfo - the argument of type ProcessStartInfojava.lang.Throwable - if the call fails in the bridge or in the CLRArgumentException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itNotSupportedException - if the .NET member raises itObjectDisposedException - if the .NET member raises itInvalidOperationException - if the .NET member raises itArgumentNullException - if the .NET member raises itIndexOutOfRangeException - if the .NET member raises itFormatException - if the .NET member raises itOutOfMemoryException - if the .NET member raises itMissingMethodException - if the .NET member raises itTargetInvocationException - if the .NET member raises itIOException - if the .NET member raises itThreadStateException - if the .NET member raises itLockRecursionException - if the .NET member raises itAbandonedMutexException - if the .NET member raises itWin32Exception - if the .NET member raises itKeyNotFoundException - if the .NET member raises itMissingMemberException - if the .NET member raises itCryptographicException - if the .NET member raises itSynchronizationLockException - if the .NET member raises itpublic static boolean TryOpen(int processId,
JCORefOut<SafeProcessHandle> processHandle)
throws java.lang.Throwable,
ArgumentException,
ArgumentOutOfRangeException,
PlatformNotSupportedException,
NotSupportedException,
ObjectDisposedException,
InvalidOperationException,
IndexOutOfRangeException,
FormatException,
MissingMethodException,
TargetInvocationException,
UnauthorizedAccessException,
Win32Exception
processId - the argument of type intprocessHandle - the argument of type JCORefOut<SafeProcessHandle>java.lang.Throwable - if the call fails in the bridge or in the CLRArgumentException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itNotSupportedException - if the .NET member raises itObjectDisposedException - if the .NET member raises itInvalidOperationException - if the .NET member raises itIndexOutOfRangeException - if the .NET member raises itFormatException - if the .NET member raises itMissingMethodException - if the .NET member raises itTargetInvocationException - if the .NET member raises itUnauthorizedAccessException - if the .NET member raises itWin32Exception - if the .NET member raises itpublic boolean TryWaitForExit(TimeSpan timeout, JCORefOut<ProcessExitStatus> exitStatus) throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, NotSupportedException, ArgumentOutOfRangeException, CultureNotFoundException, InvalidOperationException, ObjectDisposedException, MissingMethodException, TargetInvocationException, DuplicateWaitObjectException, UnauthorizedAccessException, OutOfMemoryException, ApplicationException, OverflowException, AbandonedMutexException, Win32Exception
timeout - the argument of type TimeSpanexitStatus - the argument of type JCORefOut<ProcessExitStatus>java.lang.Throwable - if the call fails in the bridge or in the CLRArgumentNullException - if the .NET member raises itArgumentException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itNotSupportedException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itCultureNotFoundException - if the .NET member raises itInvalidOperationException - if the .NET member raises itObjectDisposedException - if the .NET member raises itMissingMethodException - if the .NET member raises itTargetInvocationException - if the .NET member raises itDuplicateWaitObjectException - if the .NET member raises itUnauthorizedAccessException - if the .NET member raises itOutOfMemoryException - if the .NET member raises itApplicationException - if the .NET member raises itOverflowException - if the .NET member raises itAbandonedMutexException - if the .NET member raises itWin32Exception - if the .NET member raises itpublic ProcessExitStatus WaitForExit() throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, NotSupportedException, ArgumentOutOfRangeException, CultureNotFoundException, InvalidOperationException, ObjectDisposedException, MissingMethodException, TargetInvocationException, DuplicateWaitObjectException, UnauthorizedAccessException, OutOfMemoryException, ApplicationException, OverflowException, AbandonedMutexException, Win32Exception
java.lang.Throwable - if the call fails in the bridge or in the CLRArgumentNullException - if the .NET member raises itArgumentException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itNotSupportedException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itCultureNotFoundException - if the .NET member raises itInvalidOperationException - if the .NET member raises itObjectDisposedException - if the .NET member raises itMissingMethodException - if the .NET member raises itTargetInvocationException - if the .NET member raises itDuplicateWaitObjectException - if the .NET member raises itUnauthorizedAccessException - if the .NET member raises itOutOfMemoryException - if the .NET member raises itApplicationException - if the .NET member raises itOverflowException - if the .NET member raises itAbandonedMutexException - if the .NET member raises itWin32Exception - if the .NET member raises itpublic Task_1 WaitForExitAsync(CancellationToken cancellationToken) throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, NotSupportedException, ArgumentOutOfRangeException, CultureNotFoundException, InvalidOperationException, ObjectDisposedException, MissingMethodException, TargetInvocationException, ThreadStateException, SynchronizationLockException, OutOfMemoryException, ThreadStartException, UnreachableException, TaskSchedulerException, TaskCanceledException, AggregateException, NullReferenceException, FormatException, Win32Exception
cancellationToken - the argument of type CancellationTokenjava.lang.Throwable - if the call fails in the bridge or in the CLRArgumentNullException - if the .NET member raises itArgumentException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itNotSupportedException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itCultureNotFoundException - if the .NET member raises itInvalidOperationException - if the .NET member raises itObjectDisposedException - if the .NET member raises itMissingMethodException - if the .NET member raises itTargetInvocationException - if the .NET member raises itThreadStateException - if the .NET member raises itSynchronizationLockException - if the .NET member raises itOutOfMemoryException - if the .NET member raises itThreadStartException - if the .NET member raises itUnreachableException - if the .NET member raises itTaskSchedulerException - if the .NET member raises itTaskCanceledException - if the .NET member raises itAggregateException - if the .NET member raises itNullReferenceException - if the .NET member raises itFormatException - if the .NET member raises itWin32Exception - if the .NET member raises itpublic Task_1 WaitForExitOrKillOnCancellationAsync(CancellationToken cancellationToken) throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, NotSupportedException, ArgumentOutOfRangeException, CultureNotFoundException, InvalidOperationException, ObjectDisposedException, MissingMethodException, TargetInvocationException, ThreadStateException, SynchronizationLockException, OutOfMemoryException, ThreadStartException, FormatException, Win32Exception, UnreachableException, TaskSchedulerException, TaskCanceledException, AggregateException, NullReferenceException
cancellationToken - the argument of type CancellationTokenjava.lang.Throwable - if the call fails in the bridge or in the CLRArgumentNullException - if the .NET member raises itArgumentException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itNotSupportedException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itCultureNotFoundException - if the .NET member raises itInvalidOperationException - if the .NET member raises itObjectDisposedException - if the .NET member raises itMissingMethodException - if the .NET member raises itTargetInvocationException - if the .NET member raises itThreadStateException - if the .NET member raises itSynchronizationLockException - if the .NET member raises itOutOfMemoryException - if the .NET member raises itThreadStartException - if the .NET member raises itFormatException - if the .NET member raises itWin32Exception - if the .NET member raises itUnreachableException - if the .NET member raises itTaskSchedulerException - if the .NET member raises itTaskCanceledException - if the .NET member raises itAggregateException - if the .NET member raises itNullReferenceException - if the .NET member raises itpublic ProcessExitStatus WaitForExitOrKillOnTimeout(TimeSpan timeout) throws java.lang.Throwable, ArgumentNullException, ArgumentException, PlatformNotSupportedException, NotSupportedException, ArgumentOutOfRangeException, CultureNotFoundException, InvalidOperationException, ObjectDisposedException, MissingMethodException, TargetInvocationException, DuplicateWaitObjectException, UnauthorizedAccessException, OutOfMemoryException, ApplicationException, OverflowException, AbandonedMutexException, IndexOutOfRangeException, FormatException, Win32Exception
timeout - the argument of type TimeSpanjava.lang.Throwable - if the call fails in the bridge or in the CLRArgumentNullException - if the .NET member raises itArgumentException - if the .NET member raises itPlatformNotSupportedException - if the .NET member raises itNotSupportedException - if the .NET member raises itArgumentOutOfRangeException - if the .NET member raises itCultureNotFoundException - if the .NET member raises itInvalidOperationException - if the .NET member raises itObjectDisposedException - if the .NET member raises itMissingMethodException - if the .NET member raises itTargetInvocationException - if the .NET member raises itDuplicateWaitObjectException - if the .NET member raises itUnauthorizedAccessException - if the .NET member raises itOutOfMemoryException - if the .NET member raises itApplicationException - if the .NET member raises itOverflowException - if the .NET member raises itAbandonedMutexException - if the .NET member raises itIndexOutOfRangeException - if the .NET member raises itFormatException - if the .NET member raises itWin32Exception - if the .NET member raises it