Java Doc for BackEndTest.java in  » 6.0-JDK-Modules » j2me » com » sun » cldchi » tools » memoryprofiler » 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 » 6.0 JDK Modules » j2me » com.sun.cldchi.tools.memoryprofiler.jdwp 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sun.cldchi.tools.memoryprofiler.jdwp.jdwp
      com.sun.cldchi.tools.memoryprofiler.jdwp.BackEndTest

BackEndTest
class BackEndTest extends jdwp implements VMConnection(Code)
The BackEndTest class implemtens common debugger features such as:
  • Connects to DebugAgent (either KdpProxy or Java), sends Handshake command and waits for VM_INIT event.
  • Contains a number of helper functions to work with JDWP
This class encapsulates a huge amount of direct work with JDWP.

It's a good idea to place all common JDWP operations here. Notice that all BackEndTest methods are declared as static so you must never create instances of this class
See Also:   jdwp.jdwp
See Also:   jdwp.Reply
See Also:   jdwp.Tools
See Also:   jdwp.Packet
See Also:   jdwp.Command
See Also:   jdwp.Transport
See Also:   jdwp.ByteBuffer
See Also:   jdwp.BoundException
See Also:   jdwp.BreakpointInfo
See Also:   jdwp.SocketTransport
See Also:   jdwp.MethodDescriptor



Field Summary
public  SocketTransportdebug
     This object executes all low-level work with JDWP (connection establishing/terminating, data exchange etc).
public  booleanis_connected
    
public static  booleanverbose
     Debug time variable.


Method Summary
public  ReplycheckReply(Command c)
     Sends JDWP command and waits for reply.
public  ReplycheckReply(Command c, int ErrorCode, String Description)
     Sends JDWP command and waits for reply.
public  voidcloseConnections()
     Closes connection.
public  voidconnect(String hostName, int port)
    
public  voidgetIDSizes()
     Determines the sizes (in bytes ) of field IDs, method IDs, object reference IDs and reference type IDs. These values are VM specific and are obtained via VirtualMachine/IDSizes JDWP command.
public  booleanisConnected()
    
public static  voidprint(String s)
     Debug time method.
public static  voidprint(Vector v)
     Debug time method.
public static  voidprint(Packet p, String how)
     Debug time method.
public  voidprintReplies()
     Prints all JDWP replies that were not demanded yet.
public  CommandsendCommand(Command c)
     This method sends JDWP command and does not wait for answer.
public  voidsendCommand(int command)
    
public  VMReplysendReplyCommand(int command, int[] params)
    
public  VMReplysendReplyCommand(int command)
    

Field Detail
debug
public SocketTransport debug(Code)
This object executes all low-level work with JDWP (connection establishing/terminating, data exchange etc).



is_connected
public boolean is_connected(Code)



verbose
public static boolean verbose(Code)
Debug time variable. To see a bit more verbose output turn it to true. In non-debug mode must be false otherwise identity of J2SE and KVM outputs is not guarantered.





Method Detail
checkReply
public Reply checkReply(Command c) throws IOException, DebugeeException(Code)
Sends JDWP command and waits for reply. If reply is not received in 100 seconds DebugeeException is raised. So large timeout is choosen because of possibility of using extremely slow or busy systems where VM being debugged is run. This method is used internally by other BackEndTest methods. Also it's a good idea to explicity invoke this method when non-zero error code in considered as correct or allowable answer.
Parameters:
  c - JDWP command to be sent received reply packet
throws:
  DebugeeException - the command can't be sent or reply packet isnot received in 100 seconds
throws:
  IOException - a generic I/O error occured



checkReply
public Reply checkReply(Command c, int ErrorCode, String Description) throws IOException, DebugeeException(Code)
Sends JDWP command and waits for reply. The method expects that JDWP reply packet will contain expected error code otherwise DebugeeException is raised. Currently this method is used internally by othe methods of BackEndTest.
Parameters:
  c - JDWP command to be sent
Parameters:
  ErrorCode - expected error code in reply packet
Parameters:
  Description - if unexpected error code (in particular,NONE)is received this string will be included inthe error message received reply packet
See Also:   BackEndTest.checkReplyF(Command,int,String)



closeConnections
public void closeConnections()(Code)
Closes connection. This function is executed prior to KJDB finishing.



connect
public void connect(String hostName, int port) throws ConnectException(Code)



getIDSizes
public void getIDSizes() throws DebugeeException(Code)
Determines the sizes (in bytes ) of field IDs, method IDs, object reference IDs and reference type IDs. These values are VM specific and are obtained via VirtualMachine/IDSizes JDWP command. This method is invoked by openConnections(String, int) method immediately after establishing JDWP connection.
See Also:   BackEndTest.openConnections(String,int)



isConnected
public boolean isConnected()(Code)



print
public static void print(String s)(Code)
Debug time method. Rewrite it if you'd like to see debug output not in the standard output
Parameters:
  s - String to be printed



print
public static void print(Vector v) throws Exception(Code)
Debug time method. Prints the content of the vector to standard output.
Parameters:
  v - java.util.Vector object to be printed



print
public static void print(Packet p, String how) throws Exception(Code)
Debug time method. Prints the content of JDWP package in specified manner.
Parameters:
  p - JDWP package to be printed
Parameters:
  how - mask for proper representing of package content. For example,the mask i(o) will protected parsed as follows: firstis int that determines the number of object references followed. All the follwed elements are objectreferences



printReplies
public void printReplies() throws IOException(Code)
Prints all JDWP replies that were not demanded yet. This method is invoked when no expected reply is received that is considered as fatal error.



sendCommand
public Command sendCommand(Command c) throws DebugeeException(Code)
This method sends JDWP command and does not wait for answer. It's used internally by other BackEndTest methods. Also it's a good idea to use this method in some cases when answer is not guaranteered (for example, if you send VirtualMachine/Resume JDWP command you may receive no answer because of debugging session finishing).
Parameters:
  c - command to be sent command with ID field filled



sendCommand
public void sendCommand(int command) throws DebugeeException(Code)



sendReplyCommand
public VMReply sendReplyCommand(int command, int[] params) throws DebugeeException(Code)



sendReplyCommand
public VMReply sendReplyCommand(int command) throws DebugeeException(Code)



Fields inherited from com.sun.cldchi.tools.memoryprofiler.jdwp.jdwp
final public static int evBREAKPOINT(Code)(Java Doc)
final public static int evCLASS_PREPARE(Code)(Java Doc)
final public static int evEXCEPTION(Code)(Java Doc)
final public static int evSINGLE_STEP(Code)(Java Doc)
final public static int evVM_DEATH(Code)(Java Doc)
final public static int evVM_INIT(Code)(Java Doc)
final public static int evVM_METHOD_ENTRY(Code)(Java Doc)
public static int fieldIDSize(Code)(Java Doc)
public static int frameIDSize(Code)(Java Doc)
public static int methodIDSize(Code)(Java Doc)
public static int objectIDSize(Code)(Java Doc)
public static int referenceTypeIDSize(Code)(Java Doc)
final public static int tagARRAY(Code)(Java Doc)
final public static int tagBOOLEAN(Code)(Java Doc)
final public static int tagBYTE(Code)(Java Doc)
final public static int tagCHAR(Code)(Java Doc)
final public static int tagINT(Code)(Java Doc)
final public static int tagLONG(Code)(Java Doc)
final public static int tagOBJECT(Code)(Java Doc)
final public static int tagSHORT(Code)(Java Doc)
final public static int tagSTRING(Code)(Java Doc)
final public static int tagVOID(Code)(Java Doc)
final public static int ttARRAY(Code)(Java Doc)
final public static int ttCLASS(Code)(Java Doc)
final public static int ttINTERFACE(Code)(Java Doc)


Methods inherited from java.lang.Object
public boolean equals(Object obj)(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)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.