java.lang.Object
com.ibm.dtfj.image.javacore.JCImageProcess
- All Implemented Interfaces:
ImageProcess
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addEnvironment
(Object key, Object value) NON-DTFJ Overwrites whatever was there if a key already exists.void
addImageThread
(JCImageThread thread) NON-DTFJvoid
addLibrary
(JCImageModule module) NON-DTFJvoid
addRuntime
(JavaRuntime javaRuntime) NON-DTFJFetch the command line for this process.Find the thread which triggered the creation of the imageGet the environment variables for this process.Get the module representing the executable within the image.getID()
Get the system-wide identifier for the process.NON-DTFJNON-DTFJIterator<?>
Get the set of shared libraries which are loaded in this process.getLibrary
(String name) NON-DTFJint
Determine the pointer size used by this process.Gets the OS specific properties for this process.Iterator<?>
Get the set of the known ManagedRuntime environments in the image.Get signal name (if signal was available in javacore).int
Get signal number (if signal was available in javacore)Iterator<?>
Get the set of image threads in the image.void
setCommandLine
(String commandLine) Non-DTFJ.void
setCurrentThreadID
(long imageThreadID) NON-DTFJvoid
setExecutable
(ImageModule execMod) NON-DTFJvoid
NON-DTFJvoid
setPointerSize
(int pointerSize) void
setSignal
(int signal) Non-DTFJ.
-
Constructor Details
-
JCImageProcess
- Throws:
JCInvalidArgumentsException
-
-
Method Details
-
getCommandLine
Description copied from interface:ImageProcess
Fetch the command line for this process. This may be the exact command line the user issued, or it may be a reconstructed command line based on argv[] and argc.- Specified by:
getCommandLine
in interfaceImageProcess
- Returns:
- the command line for the process
- Throws:
DataUnavailable
- if the information cannot be providedCorruptDataException
-
getCurrentThread
Description copied from interface:ImageProcess
Find the thread which triggered the creation of the image- Specified by:
getCurrentThread
in interfaceImageProcess
- Returns:
- the ImageThread which caused the image to be created, or null if the image was not created due to a specific thread
- Throws:
CorruptDataException
- See Also:
-
addEnvironment
NON-DTFJ Overwrites whatever was there if a key already exists.- Parameters:
key
-value
-
-
getEnvironment
Description copied from interface:ImageProcess
Get the environment variables for this process.- Specified by:
getEnvironment
in interfaceImageProcess
- Returns:
- the environment variables for this process
- Throws:
DataUnavailable
- if the information cannot be providedCorruptDataException
-
getExecutable
Description copied from interface:ImageProcess
Get the module representing the executable within the image.- Specified by:
getExecutable
in interfaceImageProcess
- Returns:
- the module representing the executable within the image (as opposed to modules representing libraries)
- Throws:
DataUnavailable
- if the information cannot be providedCorruptDataException
- See Also:
-
getID
Description copied from interface:ImageProcess
Get the system-wide identifier for the process.- Specified by:
getID
in interfaceImageProcess
- Returns:
- a system-wide identifier for the process (e.g. a process id (pid) on Unix like systems)
- Throws:
DataUnavailable
- if the information cannot be providedCorruptDataException
-
getLibraries
Description copied from interface:ImageProcess
Get the set of shared libraries which are loaded in this process.- Specified by:
getLibraries
in interfaceImageProcess
- Returns:
- an iterator to iterate over the shared libraries which are loaded in this process
- Throws:
DataUnavailable
- if the information cannot be providedCorruptDataException
- See Also:
-
addLibrary
NON-DTFJ- Parameters:
module
-
-
getLibrary
NON-DTFJ- Parameters:
name
-
-
getPointerSize
public int getPointerSize()Description copied from interface:ImageProcess
Determine the pointer size used by this process. Currently supported values are 31, 32 or 64. In the future, other pointer sizes may also be supported.- Specified by:
getPointerSize
in interfaceImageProcess
- Returns:
- the size of a pointer, in bits
-
setPointerSize
public void setPointerSize(int pointerSize) - Parameters:
pointerSize
-
-
setSignal
public void setSignal(int signal) Non-DTFJ. Sets signal number found in javacore- Parameters:
signal
-
-
setCommandLine
Non-DTFJ. Sets command line found in javacore -
getRuntimes
Description copied from interface:ImageProcess
Get the set of the known ManagedRuntime environments in the image.- Specified by:
getRuntimes
in interfaceImageProcess
- Returns:
- an iterator to iterate over all of the known ManagedRuntime environments in the image. In a typical image, there will be only one runtime, and it will be an instance of JavaRuntime. However any user of this API should be aware that there is a possibility that other runtimes may exist in the image
- See Also:
-
addRuntime
NON-DTFJ- Parameters:
javaRuntime
-
-
getSignalName
Get signal name (if signal was available in javacore).- Specified by:
getSignalName
in interfaceImageProcess
- Returns:
- the name of the OS signal in this process which triggered the creation of this image, or null if the image was not created because of a signal in this process
- Throws:
DataUnavailable
- if the information cannot be providedCorruptDataException
-
getSignalNumber
Get signal number (if signal was available in javacore)- Specified by:
getSignalNumber
in interfaceImageProcess
- Returns:
- the OS signal number in this process which triggered the creation of this image, or 0 if the image was not created because of a signal in this process
- Throws:
DataUnavailable
- if the information cannot be providedCorruptDataException
-
getThreads
Description copied from interface:ImageProcess
Get the set of image threads in the image.- Specified by:
getThreads
in interfaceImageProcess
- Returns:
- an iterator to iterate over each ImageThread in the image There is not necessarily any relationship between JavaThreads and ImageThreads. A JVM implementation may use an n:m mapping of JavaThreads to ImageThreads, and not all ImageThreads are necessarily attached.
- See Also:
-
addImageThread
NON-DTFJ- Parameters:
thread
-
-
getImageThread
NON-DTFJ- Parameters:
id
-
-
getImageAddressSpace
NON-DTFJ -
setExecutable
NON-DTFJ -
setID
NON-DTFJ -
setCurrentThreadID
public void setCurrentThreadID(long imageThreadID) NON-DTFJ -
getProperties
Description copied from interface:ImageProcess
Gets the OS specific properties for this process.- Specified by:
getProperties
in interfaceImageProcess
- Returns:
- a set of OS specific properties
-