org.paulneve.wlab.webui
Class CreateNewBaseVmServlet

java.lang.Object
  extended by org.paulneve.wlab.webui.CreateNewBaseVmServlet
All Implemented Interfaces:
org.springframework.web.HttpRequestHandler

public class CreateNewBaseVmServlet
extends java.lang.Object
implements org.springframework.web.HttpRequestHandler

When a tutor selects the Clone VM option to create a new Base VM for stage from an existing VM, this servlet handles the cloning process and then sees the new VM through the appropriate number of reboot cycles in order to “make it safe” (see the Documentation for Tutors and Documentation for System Administrators). The new VM is created and started, then a new thread monitors the VM until it shuts down. When the thread detects a shutdown, it stops. Meanwhile, a redirect is sent to editbasevmview.jsp/EditVmConsoleController.java. The controller checks for the existence of this monitoring thread to determine whether or not the new VM is ready for actual editing to take place, and if so, establishes a VNC connection.

This servlet is also used when editing an existing Base VM for stage which has previously been made safe – meaning that it will also need to go through the reboot cycles before it can be edited. In this instance, the process is identical, except that no new VM is actually created at the start of the process.

Author:
Paul Neve

Constructor Summary
CreateNewBaseVmServlet()
           
 
Method Summary
 void handleRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 void setDataAccess(DataAccess da)
          Sets the DataAccess object.
 void setStrings(Strings s)
          Sets the Strings object.
 void setVirtualisationAccess(VirtualisationAccess virtualisationAccess)
          Sets the VirtualisationAccess object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CreateNewBaseVmServlet

public CreateNewBaseVmServlet()
Method Detail

handleRequest

public void handleRequest(javax.servlet.http.HttpServletRequest request,
                          javax.servlet.http.HttpServletResponse response)
                   throws javax.servlet.ServletException,
                          java.io.IOException
Specified by:
handleRequest in interface org.springframework.web.HttpRequestHandler
Throws:
javax.servlet.ServletException
java.io.IOException

setVirtualisationAccess

public void setVirtualisationAccess(VirtualisationAccess virtualisationAccess)
Sets the VirtualisationAccess object. Injected via Spring so should never be used in code as such.


setDataAccess

public void setDataAccess(DataAccess da)
Sets the DataAccess object. Injected via Spring so should never be used in code as such.


setStrings

public void setStrings(Strings s)
Sets the Strings object. Injected via Spring so should never be used in code as such.