public static interface ProcessHandle.Info
Optional<T>
allowing explicit tests
and actions if the value is available.Modifier and Type | Method and Description |
---|---|
Optional<String[]> |
arguments()
Returns an array of Strings of the arguments of the process.
|
Optional<String> |
command()
Returns the executable pathname of the process.
|
Optional<String> |
commandLine()
Returns the command line of the process.
|
Optional<Instant> |
startInstant()
Returns the start time of the process.
|
Optional<Duration> |
totalCpuDuration()
Returns the total cputime accumulated of the process.
|
Optional<String> |
user()
Return the user of the process.
|
Optional<String> command()
Optional<String>
of the executable pathname
of the processOptional<String> commandLine()
If command()
and arguments()
return
non-empty optionals, this is simply a convenience method which concatenates
the values of the two functions separated by spaces. Otherwise it will return a
best-effort, platform dependent representation of the command line.
The executable pathname may contain only the name of the executable without the full path information. It is undecideable whether white space separates different arguments or is part of a single argument.
Optional<String>
of the command line
of the processOptional<String[]> arguments()
Optional<String[]>
of the arguments of the processOptional<Instant> startInstant()
Optional<Instant>
of the start time of the processOptional<Duration> totalCpuDuration()
Optional<Duration>
for the accumulated total cputime Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2016, Oracle and/or its affiliates. All rights reserved.
DRAFT 9-internal+0-2016-01-26-133437.ivan.openjdk9onspinwait