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 TypeMethodDescriptionvoidaddEnvironmentVariable(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.voidaddProperty(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) voidsetCommandLine(String cmdLine) Set command linevoidsetCurrentThreadID(long imageThreadID) Sets the current threadvoidsetExecutable(ImageModule execMod) Sets the module as the process executablevoidSets the id of the processvoidsetPointerSize(int size) Valid values: 64, 32, or 31 (s390) bits.voidsetRegisters(Map regs) Set registers if available in javacore.voidsetSignal(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:IImageProcessBuilderAt 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:
getCurrentJavaRuntimeBuilderin interfaceIImageProcessBuilder- Returns:
- current java runtime factory. Must never be null.
-
getJavaRuntimeBuilder
- Specified by:
getJavaRuntimeBuilderin interfaceIImageProcessBuilder- Parameters:
builderID- unique id that looks up a java runtime factory- Returns:
- found java runtime factory, or null.
-
generateJavaRuntimeBuilder
Description copied from interface:IImageProcessBuilderGenerates 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:
generateJavaRuntimeBuilderin interfaceIImageProcessBuilder- Parameters:
id-- Returns:
- generated java runtime factory.
- Throws:
BuilderFailureException- if java runtime factory is not created.
-
addLibrary
Description copied from interface:IImageProcessBuilderWill 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:
addLibraryin 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:IImageProcessBuilderValid values: 64, 32, or 31 (s390) bits.- Specified by:
setPointerSizein interfaceIImageProcessBuilder- Parameters:
size-
-
addImageThread
public ImageThread addImageThread(long nativeThreadID, long systemThreadID, Properties properties) throws BuilderFailureException Description copied from interface:IImageProcessBuilderAdds 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:
addImageThreadin 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:
setSignalin interfaceIImageProcessBuilder- Parameters:
signal- number
-
setCommandLine
Set command line- Specified by:
setCommandLinein interfaceIImageProcessBuilder- Parameters:
command- line string
-
addImageStackSection
Add a stack section to an existing image thread- Specified by:
addImageStackSectionin interfaceIImageProcessBuilder- Parameters:
thread- The native threadsection- The section we want to add- Returns:
-
setRegisters
Set registers if available in javacore.- Specified by:
setRegistersin interfaceIImageProcessBuilder- Parameters:
regs- Map of registers
-
addEnvironmentVariable
Add environment variables- Specified by:
addEnvironmentVariablein interfaceIImageProcessBuilder- Parameters:
name-value-
-
addRoutine
Description copied from interface:IImageProcessBuilderAdd a routine to a module- Specified by:
addRoutinein interfaceIImageProcessBuilder- Parameters:
library-name-address-- Returns:
-
addImageStackFrame
public ImageStackFrame addImageStackFrame(long nativeThreadID, String name, long baseAddress, long procAddress) Description copied from interface:IImageProcessBuilderAdds a stack frame to an image thread- Specified by:
addImageStackFramein interfaceIImageProcessBuilder- Parameters:
nativeThreadID-name- of routine- Returns:
-
setExecutable
Description copied from interface:IImageProcessBuilderSets the module as the process executable- Specified by:
setExecutablein interfaceIImageProcessBuilder- Parameters:
execMod-
-
setID
Description copied from interface:IImageProcessBuilderSets the id of the process- Specified by:
setIDin interfaceIImageProcessBuilder- Parameters:
pid- String
-
setCurrentThreadID
public void setCurrentThreadID(long imageThreadID) Description copied from interface:IImageProcessBuilderSets the current thread- Specified by:
setCurrentThreadIDin interfaceIImageProcessBuilder- Parameters:
imageThreadID-
-
addProperty
Description copied from interface:IImageProcessBuilderAdds/updates a property for the library- Specified by:
addPropertyin interfaceIImageProcessBuilder- Parameters:
library- the modulename- the property namevalue- the property value
-