Java Doc for VmMirror.java in  » Apache-Harmony-Java-SE » org-package » org » apache » harmony » jpda » tests » framework » jdwp » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Apache Harmony Java SE » org package » org.apache.harmony.jpda.tests.framework.jdwp 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.harmony.jpda.tests.framework.jdwp.VmMirror

VmMirror
public class VmMirror (Code)
This class provides convenient way for communicating with debuggee VM using JDWP packets.

Most methods can throw ReplyErrorCodeException if error occurred in execution of corresponding JDWP command or TestErrorException if any other error occurred.



Field Summary
protected  TestOptionsconfig
     Test run options.
protected  LogWriterlogWriter
     Log to write messages.
public  CapabilitiestargetVMCapabilities
     Target VM Capabilities.

Constructor Summary
public  VmMirror(TestOptions config, LogWriter logWriter)
     Creates new VmMirror instance for given test run options.

Method Summary
public  ReplyPacketClearAllBreakpoints()
     Removes all breakpoints.
public  ReplyPacketadjustTypeLength()
     Adjusts lengths for all VM-specific types.
public  ReplyPacketcapabilities()
     Requests debuggee VM capabilities.
public  ReplyPacketcheckReply(ReplyPacket reply)
     Checks error code of given reply packet and throws ReplyErrorCodeException if any error detected.
public  ReplyPacketclearBreakpoint(int requestID)
     Removes breakpoint according to specified requestID.
public  ReplyPacketclearEvent(byte eventKind, int requestID)
     Clear an event request for specified request ID.
public  voidcloseConnection()
     Closes connection channel used with this VmMirror and stops reading packets.
final public  longcreateString(String value)
     Creates java String in target VM with the given value.
Parameters:
  value - The value of the string.
public  ReplyPacketdispose()
     Disposes connection to debuggee VM.
public  ReplyPacketexit(int exitCode)
     Exits debuggee VM process.
final public  ListgetAllFields(long classID)
    
final public  ListgetAllThreadFrames(long threadID)
    
public  ReplyPacketgetAllThreadID()
     Returns all running thread IDs.
public  longgetArrayID(String arraySignature)
     Gets ArrayID for specified array signature.
public  Value[]getArrayValues(long objectID)
     Returns a range of array components
Parameters:
  objectID - The array object ID.
public  ReplyPacketgetClassBySignature(String classSignature)
     Gets class reference by signature.
Parameters:
  classSignature - class signature.
public  longgetClassID(String classSignature)
     Gets ClassID for specified class signature.
final public  longgetClassObjectId(long refType)
     Returns the class object corresponding to this type
Parameters:
  refType - The reference type ID.
public  StringgetClassSignature(long classID)
     Gets class signature for specified class ID.
public  TransportWrappergetConnection()
     Returns JDWP connection channel used by this VmMirror.
public  longgetFieldID(long classID, String fieldName)
     Returns FieldID for specified class and field name.
public  longgetFieldID(ReplyPacket request, String field)
     Gets FieldID from ReplyPacket.
public  ReplyPacketgetFieldsInClass(long referenceTypeID)
     Gets class fields by class referenceTypeID.
Parameters:
  referenceTypeID - class referenceTypeID.
final public  intgetFrameCount(long threadID)
     Returns the count of frames on this thread's stack
Parameters:
  threadID - The thread object ID.
final public  Value[]getFrameValues(Frame frame)
    
public  longgetInterfaceID(String interfaceSignature)
     Gets InterfaceID for specified interface signature.
final public  longgetLineCodeIndex(long classID, long methodID, int lineNumber)
     Returns a line code index according to a corresponding line number in a method's line table.
Parameters:
  classID - The class object ID.
Parameters:
  methodID - The method ID.
Parameters:
  lineNumber - A source line number.
final public  intgetLineNumber(long classID, long methodID, long codeIndex)
     Returns a source line number according to a corresponding line code index in a method's line table.
Parameters:
  classID - The class object ID.
Parameters:
  methodID - The method ID.
Parameters:
  codeIndex - The line code index.
final public  ReplyPacketgetLineTable(long refType, long methodID)
     Returns line number information for the method, if present.
final public  ListgetLocalVars(Frame frame)
     Returns all variables which are visible within the given frame.
Parameters:
  frame - The frame whose visible local variables to retrieve.
public  longgetMethodID(long classID, String methodName)
     Gets Method ID for specified class and method name.
public  StringgetMethodName(long classID, long methodID)
     Returns method name for specified pair of classID and methodID.
final public  StringgetMethodSignature(long classID, long methodID)
     Returns JNI signature of method.
Parameters:
  classID - The reference type ID.
Parameters:
  methodID - The method ID.
public  ReplyPacketgetMethods(long classReferenceTypeID)
     Gets method reference by signature.
Parameters:
  classReferenceTypeID - class referenceTypeID.
final public  Value[]getObjectReferenceValues(long objectID, long[] fieldIDs)
     Returns the value of one or more instance fields.
final public  longgetReferenceType(long objectID)
    
final public  StringgetReferenceTypeSignature(long refTypeID)
     Returns the JNI signature of a reference type.
final public  Value[]getReferenceTypeValues(long refTypeID, long[] fieldIDs)
    
final public  ReplyPacketgetReflectedType(long classObjectID)
     Returns the reference type reflected by this class object
Parameters:
  classObjectID - The class object ID.
public  intgetRequestID(ReplyPacket request)
     Gets RequestID from specified ReplyPacket.
final public  StringgetStringValue(long objectID)
     Returns the characters contained in the string
Parameters:
  objectID - The String object ID.
final public  longgetSuperclassId(long classID)
    
final public  longgetThisObject(long threadID, long frameID)
     Returns the value of the 'this' reference for this frame
Parameters:
  threadID - The frame's thread ID
Parameters:
  frameID - The frame ID.
final public  ReplyPacketgetThreadFrames(long threadID, int startIndex, int length)
     Returns a set of frames of a certain suspended thread
Parameters:
  threadID - ID of the thread whose frames to obtain
Parameters:
  startIndex - The index of the first frame to retrieve.
Parameters:
  length - The count of frames to retrieve (-1 means all remaining).
final public  longgetThreadGroupID(long threadID)
     Returns the thread group that contains a given thread
Parameters:
  threadID - The thread object ID.
public  StringgetThreadGroupName(long groupID)
    
public  longgetThreadID(String threadName)
     Gets ThreadID for specified thread name.
public  StringgetThreadName(long threadID)
     Returns thread name for specified threadID.
public  intgetThreadStatus(long threadID)
     Returns thread status for specified threadID.
public  longgetTypeID(String typeSignature, byte classTypeTag)
     Gets TypeID for specified type signature and type tag.
final public  ListgetVariableTable(long classID, long methodID)
    
final public  ReplyPacketinvokeInstanceMethod(long objectID, long threadID, String methodName, Value[] args, int options)
     Invokes a member method of the given object.
Parameters:
  objectID - The object ID.
Parameters:
  threadID - The thread ID.
Parameters:
  methodName - The name of method for the invocation.
Parameters:
  args - The arguments for the invocation.
Parameters:
  options - The invocation options.
final public  ReplyPacketinvokeStaticMethod(long classID, long threadID, String methodName, Value[] args, int options)
     Invokes a static method of the given class.
Parameters:
  classID - The class type ID.
Parameters:
  threadID - The thread ID.
Parameters:
  methodName - The name of method for the invocation.
Parameters:
  args - The arguments for the invocation.
Parameters:
  options - The invocation options.
final public  booleanisThreadSuspended(long threadID)
     Checks whether a given thread is suspended or not
Parameters:
  threadID - The thread object ID.
public  ReplyPacketperformCommand(CommandPacket command)
     Sends CommandPacket to debuggee VM and waits for ReplyPacket using default timeout.
public  ReplyPacketperformCommand(CommandPacket command, long timeout)
     Sends CommandPacket to debuggee VM and waits for ReplyPacket using specified timeout.
final public  voidpopFrame(Frame frame)
     Processes JDWP PopFrames command from StackFrame command set.
public  EventPacketreceiveCertainEvent(byte eventKind)
     Waits for expected event kind using default timeout.
public  EventPacketreceiveEvent()
     Waits for EventPacket using default timeout.
public  EventPacketreceiveEvent(long timeout)
     Waits for EventPacket using specified timeout.
public  ReplyPacketreceiveReply(int commandId)
     Waits for reply for command which was sent before by 'sendCommand()' method.
public  ReplyPacketreceiveReply(int commandId, long timeout)
     Waits for reply for command which was sent before by 'sendCommand()' method.
public  ReplyPacketresume()
     Resumes debuggee VM.
public  ReplyPacketresumeThread(long threadID)
    
public  intsendCommand(CommandPacket command)
     Sends CommandPacket to debuggee VM without waiting for the reply.
final public  voidsetArrayValues(long arrayID, int firstIndex, Value[] values)
     Sets a range of array components.
public  ReplyPacketsetBreakpoint(byte typeTag, Breakpoint breakpoint)
     Sets breakpoint to given location.
public  ReplyPacketsetBreakpoint(byte typeTag, Breakpoint breakpoint, byte suspendPolicy)
     Sets breakpoint to given location.
public  ReplyPacketsetBreakpoint(Location location)
     Sets breakpoint to given location.
public  ReplyPacketsetBreakpoint(Location location, byte suspendPolicy)
    
public  longsetBreakpointAtMethodBegin(long classID, String methodName)
     Sets breakpoint at the beginning of method with name methodName.
public  ReplyPacketsetClassLoad(String classSignature)
     Sets ClassLoad event request for given class signature.
public  ReplyPacketsetClassLoad(long referenceTypeID)
     Set ClassLoad event request for given class ID.
public  ReplyPacketsetClassPrepared(String classRegexp)
     Sets ClassPrepare event request for given class name pattern.
Parameters:
  classRegexp - Required class pattern.
public  ReplyPacketsetClassPrepared(long referenceTypeID)
     Set ClassPrepare event request for given class ID.
public  ReplyPacketsetClassUnload(String classRegexp)
     Sets ClassUnload event request for given class name pattern.
public  ReplyPacketsetClassUnload(long referenceTypeID)
     Set ClassUnload event request for given class ID.
public  voidsetConnection(TransportWrapper connection)
     Sets established connection channel to be used with this VmMirror and starts reading packets.
public  ReplyPacketsetCountableBreakpoint(byte typeTag, Breakpoint breakpoint, byte suspendPolicy, int count)
    
public  ReplyPacketsetCountableException(String exceptionSignature, boolean caught, boolean uncaught, int count)
     Sets exception event request for given exception class signature.
public  ReplyPacketsetCountableMethodEntry(String classRegexp, int count)
     Sets METHOD_ENTRY event request for specified class name pattern.
public  ReplyPacketsetCountableMethodExit(String classRegexp, int count)
     Sets METHOD_EXIT event request for specified class name pattern.
public  ReplyPacketsetEvent(Event event)
     Set event request for given event.
public  ReplyPacketsetException(String exceptionSignature, boolean caught, boolean uncaught)
     Sets exception event request for given exception class signature.
public  ReplyPacketsetException(long exceptionID, boolean caught, boolean uncaught)
     Sets exception event request for given exception class ID.
public  ReplyPacketsetFieldAccess(String classSignature, byte classTypeTag, String fieldName)
     Sets field access event request for specified class signature and field name.
public  ReplyPacketsetFieldModification(String classSignature, byte classTypeTag, String fieldName)
     Sets field modification event request for specified class signature and field name.
final public  voidsetInstanceFieldsValues(long objectID, long[] fieldIDs, Value[] values)
    
final public  voidsetLocalVars(Frame frame, Variable[] vars, Value[] values)
    
public  ReplyPacketsetMethodEntry(String classRegexp)
     Sets METHOD_ENTRY event request for specified class name pattern.
public  ReplyPacketsetMethodExit(String classRegexp)
     Sets METHOD_EXIT event request for specified class name pattern.
final public  voidsetStaticFieldsValues(long classID, long[] fieldIDs, Value[] values)
    
public  ReplyPacketsetStep(String threadName, int stepSize, int stepDepth)
     Sets step event request for given thread name.
public  ReplyPacketsetStep(String[] classRegexp, long threadID, int stepSize, int stepDepth)
     Sets SINGLE_STEP event request for classes whose name does not match the given restricted regular expression
Parameters:
  classRegexp - Disallowed class patterns.
public  ReplyPacketsetThreadEnd()
     Sets THREAD_END event request.
public  ReplyPacketsetThreadStart()
     Sets THREAD_START event request.
public  ReplyPacketsuspend()
     Suspends debuggee VM.
public  ReplyPacketsuspendThread(long threadID)
     Suspends specified thread in debuggee VM.
public  longwaitForBreakpoint(long requestID)
     Waits for stop on breakpoint and gets id of thread where it stopped.

Field Detail
config
protected TestOptions config(Code)
Test run options.



logWriter
protected LogWriter logWriter(Code)
Log to write messages.



targetVMCapabilities
public Capabilities targetVMCapabilities(Code)
Target VM Capabilities.




Constructor Detail
VmMirror
public VmMirror(TestOptions config, LogWriter logWriter)(Code)
Creates new VmMirror instance for given test run options.
Parameters:
  config - test run options
Parameters:
  logWriter - log writer




Method Detail
ClearAllBreakpoints
public ReplyPacket ClearAllBreakpoints()(Code)
Removes all breakpoints. ReplyPacket for corresponding command



adjustTypeLength
public ReplyPacket adjustTypeLength()(Code)
Adjusts lengths for all VM-specific types. ReplyPacket for corresponding command



capabilities
public ReplyPacket capabilities()(Code)
Requests debuggee VM capabilities. Function parses reply packet of VirtualMachine::CapabilitiesNew command, creates and fills class Capabilities with returned info. ReplyPacket useless, already parsed reply packet.



checkReply
public ReplyPacket checkReply(ReplyPacket reply)(Code)
Checks error code of given reply packet and throws ReplyErrorCodeException if any error detected.
Parameters:
  reply - reply packet to check ReplyPacket unchanged reply packet



clearBreakpoint
public ReplyPacket clearBreakpoint(int requestID)(Code)
Removes breakpoint according to specified requestID.
Parameters:
  requestID - for given breakpoint ReplyPacket for corresponding command



clearEvent
public ReplyPacket clearEvent(byte eventKind, int requestID)(Code)
Clear an event request for specified request ID.
Parameters:
  eventKind - event type to clear
Parameters:
  requestID - request ID to clear ReplyPacket for corresponding command



closeConnection
public void closeConnection() throws IOException(Code)
Closes connection channel used with this VmMirror and stops reading packets.



createString
final public long createString(String value)(Code)
Creates java String in target VM with the given value.
Parameters:
  value - The value of the string. The string id.



dispose
public ReplyPacket dispose()(Code)
Disposes connection to debuggee VM. ReplyPacket for corresponding command



exit
public ReplyPacket exit(int exitCode)(Code)
Exits debuggee VM process. ReplyPacket for corresponding command



getAllFields
final public List getAllFields(long classID)(Code)
Returns information for each field in a reference type including inherited fields
Parameters:
  classID - The reference type ID A list of Field objects representing each field of the class



getAllThreadFrames
final public List getAllThreadFrames(long threadID)(Code)
Returns a list containing all frames of a certain thread
Parameters:
  threadID - ID of the thread A list of frames



getAllThreadID
public ReplyPacket getAllThreadID()(Code)
Returns all running thread IDs. received reply packet



getArrayID
public long getArrayID(String arraySignature)(Code)
Gets ArrayID for specified array signature.
Parameters:
  arraySignature - array signature received ArrayID



getArrayValues
public Value[] getArrayValues(long objectID)(Code)
Returns a range of array components
Parameters:
  objectID - The array object ID. The retrieved values.



getClassBySignature
public ReplyPacket getClassBySignature(String classSignature)(Code)
Gets class reference by signature.
Parameters:
  classSignature - class signature. ReplyPacket for corresponding command



getClassID
public long getClassID(String classSignature)(Code)
Gets ClassID for specified class signature.
Parameters:
  classSignature - class signature received ClassID



getClassObjectId
final public long getClassObjectId(long refType)(Code)
Returns the class object corresponding to this type
Parameters:
  refType - The reference type ID. The class object.



getClassSignature
public String getClassSignature(long classID)(Code)
Gets class signature for specified class ID.
Parameters:
  classID - class ID received class signature



getConnection
public TransportWrapper getConnection()(Code)
Returns JDWP connection channel used by this VmMirror. connection channel



getFieldID
public long getFieldID(long classID, String fieldName)(Code)
Returns FieldID for specified class and field name.
Parameters:
  classID - ClassID to find field
Parameters:
  fieldName - field name received FieldID



getFieldID
public long getFieldID(ReplyPacket request, String field)(Code)
Gets FieldID from ReplyPacket.
Parameters:
  request - ReplyPacket for request
Parameters:
  field - field name to get ID for received FieldID



getFieldsInClass
public ReplyPacket getFieldsInClass(long referenceTypeID)(Code)
Gets class fields by class referenceTypeID.
Parameters:
  referenceTypeID - class referenceTypeID. ReplyPacket for corresponding command



getFrameCount
final public int getFrameCount(long threadID)(Code)
Returns the count of frames on this thread's stack
Parameters:
  threadID - The thread object ID. The count of frames on this thread's stack



getFrameValues
final public Value[] getFrameValues(Frame frame)(Code)
Returns values of local variables in a given frame
Parameters:
  frame - Frame whose variables to get An array of Value objects



getInterfaceID
public long getInterfaceID(String interfaceSignature)(Code)
Gets InterfaceID for specified interface signature.
Parameters:
  interfaceSignature - interface signature received ClassID



getLineCodeIndex
final public long getLineCodeIndex(long classID, long methodID, int lineNumber)(Code)
Returns a line code index according to a corresponding line number in a method's line table.
Parameters:
  classID - The class object ID.
Parameters:
  methodID - The method ID.
Parameters:
  lineNumber - A source line number. An integer representing the line code index.



getLineNumber
final public int getLineNumber(long classID, long methodID, long codeIndex)(Code)
Returns a source line number according to a corresponding line code index in a method's line table.
Parameters:
  classID - The class object ID.
Parameters:
  methodID - The method ID.
Parameters:
  codeIndex - The line code index. An integer line number.



getLineTable
final public ReplyPacket getLineTable(long refType, long methodID)(Code)
Returns line number information for the method, if present.
Parameters:
  refType - The class ID
Parameters:
  methodID - The method ID ReplyPacket for corresponding command.



getLocalVars
final public List getLocalVars(Frame frame)(Code)
Returns all variables which are visible within the given frame.
Parameters:
  frame - The frame whose visible local variables to retrieve. A list of Variable objects representing each visible localvariable within the given frame.



getMethodID
public long getMethodID(long classID, String methodName)(Code)
Gets Method ID for specified class and method name.
Parameters:
  classID - class to find method
Parameters:
  methodName - method name received MethodID



getMethodName
public String getMethodName(long classID, long methodID)(Code)
Returns method name for specified pair of classID and methodID.
Parameters:
  classID -
Parameters:
  methodID - method name



getMethodSignature
final public String getMethodSignature(long classID, long methodID)(Code)
Returns JNI signature of method.
Parameters:
  classID - The reference type ID.
Parameters:
  methodID - The method ID. JNI signature of method.



getMethods
public ReplyPacket getMethods(long classReferenceTypeID)(Code)
Gets method reference by signature.
Parameters:
  classReferenceTypeID - class referenceTypeID. ReplyPacket for corresponding command



getObjectReferenceValues
final public Value[] getObjectReferenceValues(long objectID, long[] fieldIDs)(Code)
Returns the value of one or more instance fields.
Parameters:
  objectID - The object ID
Parameters:
  fieldIDs - IDs of fields to get An array of Value objects representing each field's value



getReferenceType
final public long getReferenceType(long objectID)(Code)
Returns the runtime type of the object
Parameters:
  objectID - The object ID The runtime reference type.



getReferenceTypeSignature
final public String getReferenceTypeSignature(long refTypeID)(Code)
Returns the JNI signature of a reference type. JNI signature formats are described in the Java Native Interface Specification
Parameters:
  refTypeID - The reference type ID. The JNI signature for the reference type.



getReferenceTypeValues
final public Value[] getReferenceTypeValues(long refTypeID, long[] fieldIDs)(Code)
Returns the value of one or more static fields of the reference type
Parameters:
  refTypeID - The reference type ID.
Parameters:
  fieldIDs - IDs of fields to get An array of Value objects representing each field's value



getReflectedType
final public ReplyPacket getReflectedType(long classObjectID)(Code)
Returns the reference type reflected by this class object
Parameters:
  classObjectID - The class object ID. ReplyPacket for corresponding command



getRequestID
public int getRequestID(ReplyPacket request)(Code)
Gets RequestID from specified ReplyPacket.
Parameters:
  request - ReplyPacket with RequestID received RequestID



getStringValue
final public String getStringValue(long objectID)(Code)
Returns the characters contained in the string
Parameters:
  objectID - The String object ID. A string value.



getSuperclassId
final public long getSuperclassId(long classID)(Code)
Returns the immediate superclass of a class
Parameters:
  classID - The class ID whose superclass ID is to get The superclass ID (null if the class ID for java.lang.Object isspecified).



getThisObject
final public long getThisObject(long threadID, long frameID)(Code)
Returns the value of the 'this' reference for this frame
Parameters:
  threadID - The frame's thread ID
Parameters:
  frameID - The frame ID. The 'this' object ID for this frame.



getThreadFrames
final public ReplyPacket getThreadFrames(long threadID, int startIndex, int length)(Code)
Returns a set of frames of a certain suspended thread
Parameters:
  threadID - ID of the thread whose frames to obtain
Parameters:
  startIndex - The index of the first frame to retrieve.
Parameters:
  length - The count of frames to retrieve (-1 means all remaining). ReplyPacket for corresponding command



getThreadGroupID
final public long getThreadGroupID(long threadID)(Code)
Returns the thread group that contains a given thread
Parameters:
  threadID - The thread object ID. The thread group ID of this thread.



getThreadGroupName
public String getThreadGroupName(long groupID)(Code)
Returns name of thread group for specified groupID
Parameters:
  groupID - thread group ID name of thread group



getThreadID
public long getThreadID(String threadName)(Code)
Gets ThreadID for specified thread name.
Parameters:
  threadName - thread name received ThreadID



getThreadName
public String getThreadName(long threadID)(Code)
Returns thread name for specified threadID.
Parameters:
  threadID - thread ID thread name



getThreadStatus
public int getThreadStatus(long threadID)(Code)
Returns thread status for specified threadID.
Parameters:
  threadID - thread ID thread status



getTypeID
public long getTypeID(String typeSignature, byte classTypeTag)(Code)
Gets TypeID for specified type signature and type tag.
Parameters:
  typeSignature - type signature
Parameters:
  classTypeTag - type tag received TypeID



getVariableTable
final public List getVariableTable(long classID, long methodID)(Code)
Returns variable information for the method
Parameters:
  classID - The class ID
Parameters:
  methodID - The method ID A list containing all variables (arguments and locals) declaredwithin the method.



invokeInstanceMethod
final public ReplyPacket invokeInstanceMethod(long objectID, long threadID, String methodName, Value[] args, int options)(Code)
Invokes a member method of the given object.
Parameters:
  objectID - The object ID.
Parameters:
  threadID - The thread ID.
Parameters:
  methodName - The name of method for the invocation.
Parameters:
  args - The arguments for the invocation.
Parameters:
  options - The invocation options. ReplyPacket for corresponding command



invokeStaticMethod
final public ReplyPacket invokeStaticMethod(long classID, long threadID, String methodName, Value[] args, int options)(Code)
Invokes a static method of the given class.
Parameters:
  classID - The class type ID.
Parameters:
  threadID - The thread ID.
Parameters:
  methodName - The name of method for the invocation.
Parameters:
  args - The arguments for the invocation.
Parameters:
  options - The invocation options. ReplyPacket for corresponding command



isThreadSuspended
final public boolean isThreadSuspended(long threadID)(Code)
Checks whether a given thread is suspended or not
Parameters:
  threadID - The thread object ID. True if a given thread is suspended, false otherwise.



performCommand
public ReplyPacket performCommand(CommandPacket command) throws TestErrorException(Code)
Sends CommandPacket to debuggee VM and waits for ReplyPacket using default timeout. All thrown exceptions are wrapped into TestErrorException. Consider using checkReply() for checking error code in reply packet.
Parameters:
  command - Command packet to be sent received ReplyPacket



performCommand
public ReplyPacket performCommand(CommandPacket command, long timeout) throws IOException, InterruptedException, TimeoutException(Code)
Sends CommandPacket to debuggee VM and waits for ReplyPacket using specified timeout.
Parameters:
  command - Command packet to be sent
Parameters:
  timeout - Timeout in milliseconds for waiting reply packet received ReplyPacket
throws:
  InterruptedException -
throws:
  IOException -
throws:
  TimeoutException -



popFrame
final public void popFrame(Frame frame)(Code)
Processes JDWP PopFrames command from StackFrame command set.
Parameters:
  frame - The instance of Frame.



receiveCertainEvent
public EventPacket receiveCertainEvent(byte eventKind) throws TestErrorException(Code)
Waits for expected event kind using default timeout. Throws TestErrorException if received event is not of expected kind or not a single event in the received event set.
Parameters:
  eventKind - Type of expected event -
See Also:   JDWPConstants.EventKind received EventPacket



receiveEvent
public EventPacket receiveEvent() throws TestErrorException(Code)
Waits for EventPacket using default timeout. All thrown exceptions are wrapped into TestErrorException. received EventPacket



receiveEvent
public EventPacket receiveEvent(long timeout) throws IOException, InterruptedException, TimeoutException(Code)
Waits for EventPacket using specified timeout.
Parameters:
  timeout - Timeout in milliseconds to wait for event received EventPacket
throws:
  IOException -
throws:
  InterruptedException -
throws:
  TimeoutException -



receiveReply
public ReplyPacket receiveReply(int commandId) throws InterruptedException, IOException, TimeoutException(Code)
Waits for reply for command which was sent before by 'sendCommand()' method. Default timeout is used as time limit for waiting. This method (jointly with 'sendCommand()') is intended for special cases when there is need to divide command's performing into two actions: command's sending and receiving reply (e.g. for asynchronous JDWP commands' testing). It is NOT recommended to use 'sendCommand()- receiveReply()' pair for usual cases - 'performCommand()' method must be used.
Parameters:
  commandId - Command ID of sent before command, reply from which isexpected to be received received ReplyPacket
throws:
  IOException - if any connection error occurred
throws:
  InterruptedException - if reply packet's waiting was interrupted
throws:
  TimeoutException - if timeout exceeded



receiveReply
public ReplyPacket receiveReply(int commandId, long timeout) throws InterruptedException, IOException, TimeoutException(Code)
Waits for reply for command which was sent before by 'sendCommand()' method. Specified timeout is used as time limit for waiting. This method (jointly with 'sendCommand()') is intended for special cases when there is need to divide command's performing into two actions: command's sending and receiving reply (e.g. for asynchronous JDWP commands' testing). It is NOT recommended to use 'sendCommand()- receiveReply()' pair for usual cases - 'performCommand()' method must be used.
Parameters:
  commandId - Command ID of sent before command, reply from which isexpected to be received
Parameters:
  timeout - Specified timeout in milliseconds to wait for reply received ReplyPacket
throws:
  IOException - if any connection error occurred
throws:
  InterruptedException - if reply packet's waiting was interrupted
throws:
  TimeoutException - if timeout exceeded



resume
public ReplyPacket resume()(Code)
Resumes debuggee VM. ReplyPacket for corresponding command



resumeThread
public ReplyPacket resumeThread(long threadID)(Code)
Resumes specified thread on target Virtual Machine ReplyPacket for corresponding command



sendCommand
public int sendCommand(CommandPacket command) throws IOException(Code)
Sends CommandPacket to debuggee VM without waiting for the reply. This method is intended for special cases when there is need to divide command's performing into two actions: command's sending and receiving reply (e.g. for asynchronous JDWP commands' testing). After this method the 'receiveReply()' method must be used latter for receiving reply for sent command. It is NOT recommended to use this method for usual cases - 'performCommand()' method must be used.
Parameters:
  command - Command packet to be sent command ID of sent command
throws:
  IOException - if any connection error occurred



setArrayValues
final public void setArrayValues(long arrayID, int firstIndex, Value[] values)(Code)
Sets a range of array components. The specified range must be within the bounds of the array.
Parameters:
  arrayID - The array object ID.
Parameters:
  firstIndex - The first index to set.
Parameters:
  values - An array of Value objects representing each value to set.



setBreakpoint
public ReplyPacket setBreakpoint(byte typeTag, Breakpoint breakpoint)(Code)
Sets breakpoint to given location.
Parameters:
  typeTag -
Parameters:
  breakpoint - ReplyPacket for corresponding command



setBreakpoint
public ReplyPacket setBreakpoint(byte typeTag, Breakpoint breakpoint, byte suspendPolicy)(Code)
Sets breakpoint to given location.
Parameters:
  typeTag -
Parameters:
  breakpoint -
Parameters:
  suspendPolicy - Suspend policy for a breakpoint being created ReplyPacket for corresponding command



setBreakpoint
public ReplyPacket setBreakpoint(Location location)(Code)
Sets breakpoint to given location.
Parameters:
  location - Location of breakpoint ReplyPacket for corresponding command



setBreakpoint
public ReplyPacket setBreakpoint(Location location, byte suspendPolicy)(Code)
Sets breakpoint to given location
Parameters:
  location - Location of breakpoint
Parameters:
  suspendPolicy - Suspend policy for a breakpoint being created ReplyPacket for corresponding command



setBreakpointAtMethodBegin
public long setBreakpointAtMethodBegin(long classID, String methodName)(Code)
Sets breakpoint at the beginning of method with name methodName.
Parameters:
  classID - id of class with required method
Parameters:
  methodName - name of required method requestID id of request



setClassLoad
public ReplyPacket setClassLoad(String classSignature)(Code)
Sets ClassLoad event request for given class signature.
Parameters:
  classSignature - class signature ReplyPacket for setting request



setClassLoad
public ReplyPacket setClassLoad(long referenceTypeID)(Code)
Set ClassLoad event request for given class ID.
Parameters:
  referenceTypeID - class referenceTypeID ReplyPacket for setting request



setClassPrepared
public ReplyPacket setClassPrepared(String classRegexp)(Code)
Sets ClassPrepare event request for given class name pattern.
Parameters:
  classRegexp - Required class pattern. Matches are limited to exact matchesof the given class pattern and matches of patterns that beginor end with '*'; for example, "*.Foo" or "java.*". ReplyPacket for setting request.



setClassPrepared
public ReplyPacket setClassPrepared(long referenceTypeID)(Code)
Set ClassPrepare event request for given class ID.
Parameters:
  referenceTypeID - class referenceTypeID ReplyPacket for setting request



setClassUnload
public ReplyPacket setClassUnload(String classRegexp)(Code)
Sets ClassUnload event request for given class name pattern.
Parameters:
  classSignature - class signature ReplyPacket for setting request



setClassUnload
public ReplyPacket setClassUnload(long referenceTypeID)(Code)
Set ClassUnload event request for given class ID.
Parameters:
  referenceTypeID - class referenceTypeID ReplyPacket for setting request



setConnection
public void setConnection(TransportWrapper connection)(Code)
Sets established connection channel to be used with this VmMirror and starts reading packets.
Parameters:
  connection - connection channel to be set



setCountableBreakpoint
public ReplyPacket setCountableBreakpoint(byte typeTag, Breakpoint breakpoint, byte suspendPolicy, int count)(Code)
Sets breakpoint that triggers only on a certain occurrence to a given location
Parameters:
  typeTag -
Parameters:
  breakpoint -
Parameters:
  suspendPolicy - Suspend policy for a breakpoint being created
Parameters:
  count - Limit the requested event to be reported at most once after agiven number of occurrences ReplyPacket for corresponding command



setCountableException
public ReplyPacket setCountableException(String exceptionSignature, boolean caught, boolean uncaught, int count)(Code)
Sets exception event request for given exception class signature.
Parameters:
  exceptionSignature - exception signature.
Parameters:
  caught - is exception caught
Parameters:
  uncaught - is exception uncaught
Parameters:
  count - Limit the requested event to be reported at most once after agiven number of occurrences ReplyPacket for corresponding command



setCountableMethodEntry
public ReplyPacket setCountableMethodEntry(String classRegexp, int count)(Code)
Sets METHOD_ENTRY event request for specified class name pattern.
Parameters:
  classRegexp - class name pattern or null for no pattern
Parameters:
  count - Limit the requested event to be reported at most once after agiven number of occurrences ReplyPacket for corresponding command



setCountableMethodExit
public ReplyPacket setCountableMethodExit(String classRegexp, int count)(Code)
Sets METHOD_EXIT event request for specified class name pattern.
Parameters:
  classRegexp - classRegexp class name pattern or null for no pattern
Parameters:
  count - Limit the requested event to be reported at most once after agiven number of occurrences ReplyPacket for corresponding command



setEvent
public ReplyPacket setEvent(Event event)(Code)
Set event request for given event.
Parameters:
  event - event to set request for ReplyPacket for setting request



setException
public ReplyPacket setException(String exceptionSignature, boolean caught, boolean uncaught)(Code)
Sets exception event request for given exception class signature.
Parameters:
  exceptionSignature - exception signature.
Parameters:
  caught - is exception caught
Parameters:
  uncaught - is exception uncaught ReplyPacket for corresponding command



setException
public ReplyPacket setException(long exceptionID, boolean caught, boolean uncaught)(Code)
Sets exception event request for given exception class ID.
Parameters:
  exceptionID - exception referenceTypeID.
Parameters:
  caught - is exception caught
Parameters:
  uncaught - is exception uncaught ReplyPacket for corresponding command



setFieldAccess
public ReplyPacket setFieldAccess(String classSignature, byte classTypeTag, String fieldName) throws ReplyErrorCodeException(Code)
Sets field access event request for specified class signature and field name.
Parameters:
  classTypeTag - class Type Tag (class/interface/array)
Parameters:
  classSignature - class signature
Parameters:
  fieldName - field name ReplyPacket if breakpoint is set
throws:
  ReplyErrorCodeException -



setFieldModification
public ReplyPacket setFieldModification(String classSignature, byte classTypeTag, String fieldName) throws ReplyErrorCodeException(Code)
Sets field modification event request for specified class signature and field name.
Parameters:
  classTypeTag - class Type Tag (class/interface/array)
Parameters:
  classSignature - class signature
Parameters:
  fieldName - field name ReplyPacket for corresponding command
throws:
  ReplyErrorCodeException -



setInstanceFieldsValues
final public void setInstanceFieldsValues(long objectID, long[] fieldIDs, Value[] values)(Code)
Sets the value of one or more instance fields
Parameters:
  objectID - The object ID.
Parameters:
  fieldIDs - An array of fields IDs
Parameters:
  values - An array of Value objects representing each value to set



setLocalVars
final public void setLocalVars(Frame frame, Variable[] vars, Value[] values)(Code)
Sets the value of one or more local variables
Parameters:
  frame - The frame ID.
Parameters:
  vars - An array of Variable objects whose values to set
Parameters:
  values - An array of Value objects to set



setMethodEntry
public ReplyPacket setMethodEntry(String classRegexp)(Code)
Sets METHOD_ENTRY event request for specified class name pattern.
Parameters:
  classRegexp - class name pattern or null for no pattern ReplyPacket for corresponding command



setMethodExit
public ReplyPacket setMethodExit(String classRegexp)(Code)
Sets METHOD_EXIT event request for specified class name pattern.
Parameters:
  classRegexp - class name pattern or null for no pattern ReplyPacket for corresponding command



setStaticFieldsValues
final public void setStaticFieldsValues(long classID, long[] fieldIDs, Value[] values)(Code)
Sets the value of one or more static fields
Parameters:
  classID - The class type ID.
Parameters:
  fieldIDs - An array of fields IDs
Parameters:
  values - An array of Value objects representing each value to set



setStep
public ReplyPacket setStep(String threadName, int stepSize, int stepDepth)(Code)
Sets step event request for given thread name.
Parameters:
  threadName - thread name
Parameters:
  stepSize -
Parameters:
  stepDepth - ReplyPacket for corresponding command



setStep
public ReplyPacket setStep(String[] classRegexp, long threadID, int stepSize, int stepDepth)(Code)
Sets SINGLE_STEP event request for classes whose name does not match the given restricted regular expression
Parameters:
  classRegexp - Disallowed class patterns. Matches are limited to exactmatches of the given class pattern and matches of patternsthat begin or end with '*'; for example, "*.Foo" or "java.*".
Parameters:
  stepSize -
Parameters:
  stepDepth - ReplyPacket for setting request.



setThreadEnd
public ReplyPacket setThreadEnd()(Code)
Sets THREAD_END event request. ReplyPacket for corresponding command



setThreadStart
public ReplyPacket setThreadStart()(Code)
Sets THREAD_START event request. ReplyPacket for corresponding command



suspend
public ReplyPacket suspend()(Code)
Suspends debuggee VM. ReplyPacket for corresponding command



suspendThread
public ReplyPacket suspendThread(long threadID)(Code)
Suspends specified thread in debuggee VM. ReplyPacket for corresponding command



waitForBreakpoint
public long waitForBreakpoint(long requestID)(Code)
Waits for stop on breakpoint and gets id of thread where it stopped.
Parameters:
  requestID - id of request for breakpoint threadID id of thread, where we stop on breakpoint



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

ww___w___.j__av_a___2_s.com_ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.