java.lang.Object
com.ibm.dtfj.javacore.builder.javacore.AbstractBuilderComponent
com.ibm.dtfj.javacore.builder.javacore.ImageProcessBuilder
- All Implemented Interfaces:
IImageProcessBuilder
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addEnvironmentVariable
(String name, String value) Add environment variablesaddImageStackFrame
(long nativeThreadID, String name, long baseAddress, long procAddress) Adds a stack frame to an image threadaddImageStackSection
(ImageThread thread, ImageSection section) Add a stack section to an existing image threadaddImageThread
(long nativeThreadID, long systemThreadID, Properties properties) Adds a com.ibm.dtfj.image.ImageThread to the Image process being built.addLibrary
(String name) Will add an com.ibm.dtfj.image.ImageModule for the specified library name.void
addProperty
(ImageModule library, String name, String value) Adds/updates a property for the libraryaddRoutine
(ImageModule library, String name, long address) Add a routine to a moduleGenerates a new java runtime factory.At least one java runtime factory must be associated with an image process factory.getJavaRuntimeBuilder
(String builderID) void
setCommandLine
(String cmdLine) Set command linevoid
setCurrentThreadID
(long imageThreadID) Sets the current threadvoid
setExecutable
(ImageModule execMod) Sets the module as the process executablevoid
Sets the id of the processvoid
setPointerSize
(int size) Valid values: 64, 32, or 31 (s390) bits.void
setRegisters
(Map regs) Set registers if available in javacore.void
setSignal
(int signal) Set signalMethods declared in class com.ibm.dtfj.javacore.builder.javacore.AbstractBuilderComponent
getBuilderContainer, getID
-
Constructor Details
-
ImageProcessBuilder
public ImageProcessBuilder(JCImageAddressSpace imageAddressSpace, String id) throws JCInvalidArgumentsException - Throws:
JCInvalidArgumentsException
-
-
Method Details
-
getCurrentJavaRuntimeBuilder
Description copied from interface:IImageProcessBuilder
At least one java runtime factory must be associated with an image process factory. In multiple runtime environments, the last java runtime generated for this image process may be considered the current java runtime factory.- Specified by:
getCurrentJavaRuntimeBuilder
in interfaceIImageProcessBuilder
- Returns:
- current java runtime factory. Must never be null.
-
getJavaRuntimeBuilder
- Specified by:
getJavaRuntimeBuilder
in interfaceIImageProcessBuilder
- Parameters:
builderID
- unique id that looks up a java runtime factory- Returns:
- found java runtime factory, or null.
-
generateJavaRuntimeBuilder
Description copied from interface:IImageProcessBuilder
Generates a new java runtime factory. If generation fails, an exception is thrown. If the java runtime factory already exists, it returns the latter.- Specified by:
generateJavaRuntimeBuilder
in interfaceIImageProcessBuilder
- Parameters:
id
-- Returns:
- generated java runtime factory.
- Throws:
BuilderFailureException
- if java runtime factory is not created.
-
addLibrary
Description copied from interface:IImageProcessBuilder
Will add an com.ibm.dtfj.image.ImageModule for the specified library name. If the image module already exists, it will return the latter. A null library name returns a null ImageModule.- Specified by:
addLibrary
in interfaceIImageProcessBuilder
- Parameters:
name
- shared library to be added to the com.ibm.dtfj.image.ImageProcess being built by this image process factory.- Returns:
- added/found ImageModule, or null if not added (if the library name isnull)
-
setPointerSize
public void setPointerSize(int size) Description copied from interface:IImageProcessBuilder
Valid values: 64, 32, or 31 (s390) bits.- Specified by:
setPointerSize
in interfaceIImageProcessBuilder
- Parameters:
size
-
-
addImageThread
public ImageThread addImageThread(long nativeThreadID, long systemThreadID, Properties properties) throws BuilderFailureException Description copied from interface:IImageProcessBuilder
Adds a com.ibm.dtfj.image.ImageThread to the Image process being built. If the arguments are invalid and a valid ImageThread cannot be constructed, error occurs.
If the thread already exists, it will populate any missing data into the image thread, and return the latter.
If the thread does not exist, it will create a new ImageThread and register it with the image process being built.- Specified by:
addImageThread
in interfaceIImageProcessBuilder
- Parameters:
nativeThreadID
-systemThreadID
-properties
-Properties
- with String key and String value- Returns:
- generated ImageThread. Must not be null. If a valid image thread cannot be created or found, throw exception.
- Throws:
BuilderFailureException
- if valid image thread was not created or found/updated.
-
setSignal
public void setSignal(int signal) Set signal- Specified by:
setSignal
in interfaceIImageProcessBuilder
- Parameters:
signal
- number
-
setCommandLine
Set command line- Specified by:
setCommandLine
in interfaceIImageProcessBuilder
- Parameters:
command
- line string
-
addImageStackSection
Add a stack section to an existing image thread- Specified by:
addImageStackSection
in interfaceIImageProcessBuilder
- Parameters:
thread
- The native threadsection
- The section we want to add- Returns:
-
setRegisters
Set registers if available in javacore.- Specified by:
setRegisters
in interfaceIImageProcessBuilder
- Parameters:
regs
- Map of registers
-
addEnvironmentVariable
Add environment variables- Specified by:
addEnvironmentVariable
in interfaceIImageProcessBuilder
- Parameters:
name
-value
-
-
addRoutine
Description copied from interface:IImageProcessBuilder
Add a routine to a module- Specified by:
addRoutine
in interfaceIImageProcessBuilder
- Parameters:
library
-name
-address
-- Returns:
-
addImageStackFrame
public ImageStackFrame addImageStackFrame(long nativeThreadID, String name, long baseAddress, long procAddress) Description copied from interface:IImageProcessBuilder
Adds a stack frame to an image thread- Specified by:
addImageStackFrame
in interfaceIImageProcessBuilder
- Parameters:
nativeThreadID
-name
- of routine- Returns:
-
setExecutable
Description copied from interface:IImageProcessBuilder
Sets the module as the process executable- Specified by:
setExecutable
in interfaceIImageProcessBuilder
- Parameters:
execMod
-
-
setID
Description copied from interface:IImageProcessBuilder
Sets the id of the process- Specified by:
setID
in interfaceIImageProcessBuilder
- Parameters:
pid
- String
-
setCurrentThreadID
public void setCurrentThreadID(long imageThreadID) Description copied from interface:IImageProcessBuilder
Sets the current thread- Specified by:
setCurrentThreadID
in interfaceIImageProcessBuilder
- Parameters:
imageThreadID
-
-
addProperty
Description copied from interface:IImageProcessBuilder
Adds/updates a property for the library- Specified by:
addProperty
in interfaceIImageProcessBuilder
- Parameters:
library
- the modulename
- the property namevalue
- the property value
-