edu.rice.cs.util.newjvm

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 » IDE » DrJava » edu.rice.cs.util.newjvm 
edu.rice.cs.util.newjvm

This package is a system to allow the invocation and control of a new Java virtual machine. The two JVMs can communicate by using RMI.

To simply invoke a new JVM with no communications links, use the class {@link edu.rice.cs.util.newjvm.ExecJVM}. The rest of this page explains how to use this framework to create a new JVM and set up bidirectional communications using RMI. This system runs a second JVM using the same classpath as the current JVM (by invoking {@link edu.rice.cs.util.newjvm.ExecJVM#runJVMPropagateClassPath}).

  1. Create a remote interface that the master JVM will support, extending {@link edu.rice.cs.util.newjvm.MasterRemote}. This interface must specify of the methods that the slave JVM can call on the master JVM. All methods in this interface must be declared to throw {@link java.rmi.RemoteException.}
  2. Create a remote interface that the slave JVM will support, extending {@link edu.rice.cs.util.newjvm.SlaveRemote}. This interface must specify of the methods that the master JVM can call on the slave JVM. All methods in this interface must be declared to throw {@link java.rmi.RemoteException.}
  3. Create the master JVM implementation, which must extend {@link edu.rice.cs.util.newjvm.AbstractMasterJVM} and implement YourMasterInterface. Note that the super() call must pass to AbstractMasterJVM the fully-qualified class name of the slave JVM implementation.
  4. Create the slave JVM implementation, which must implement YourSlaveInterface. Don't forget to implement {@link edu.rice.cs.util.newjvm.SlaveRemote#quit()}, which is called when the main JVM requests the slave to quit, and {@link edu.rice.cs.util.newjvm.SlaveRemote#start(edu.rice.cs.util.newjvm.MasterRemote)}, which is called when the slave JVM is started.

Now you can create an instance of your master JVM class and use its {@link edu.rice.cs.util.newjvm.AbstractMasterJVM#invokeSlave()} method to start the slave JVM.

Java Source File NameTypeComment
AbstractMasterJVM.javaClass An abstract class implementing the logic to invoke and control, via RMI, a second Java virtual machine.
AbstractSlaveJVM.javaClass A partial implementation of a SlaveRemote that provides the quit functionality and that also periodically checks if the master is still alive and automatically quits if not.
ExecJVM.javaClass A utility class to allow executing another JVM.
ExecJVMTest.javaClass Test cases for ExecJVM .
IntegratedMasterSlaveTest.javaClass Test cases for the master/slave jvm control framework.
MasterRemote.javaInterface The remote interface for a master JVM.
SlaveJVMRunner.javaClass This class is the root class for the Slave JVM.
SlaveRemote.javaInterface The remote interface for a slave JVM.
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.