|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.peace_tools.generic.GenericWizardPage
org.peace_tools.core.job.SubmitJobWizardPage
public class SubmitJobWizardPage
This class serves as the final page in a JobWizard. This page provides the user with feedback as the job is submitted to be run on the server. The job submission process consists of the following steps:
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
javax.swing.JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
java.awt.Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
---|---|
private static java.lang.String |
FILE_MISMATCH
A generic informational message that is displayed to the user when EST file mismatch is detected |
private static java.lang.String |
INFO_MSG
A generic informational message that is displayed at the top of this wizard page to provide some contextual information to the user. |
private static java.lang.String |
JOB_SUBMIT_ERROR
A generic informational message that is displayed to the user when any error occurs during the job submission process. |
private javax.swing.JTextArea |
log
Field to read and edit a brief description about the job. |
private static long |
serialVersionUID
A serialization UID to keep the compiler happy. |
private ServerSession |
server
The session to the server on which the job is to be submitted. |
private javax.swing.JLabel[] |
stepInfo
The step information labels to display information about the steps to be done and those that have been completed. |
private static java.lang.String |
SUCCESS_MESSAGE
A generic informational message that is displayed to the user after a job has successfully started up. |
private JobWizard |
wizard
A reference to the wizard dialog that logically owns this page. |
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
SubmitJobWizardPage(JobWizard wizard)
The constructor. |
Method Summary | |
---|---|
private void |
copyESTFile()
Helper method to copy EST data file to shared space if needed. |
private void |
createEntries()
Helper method to create entries in the work space. |
private void |
createJobDirectory()
This is a helper method that is used to create a valid directory where this job's files will be copied. |
protected void |
createJobUpdateThread()
Helper method to create a thread to periodically poll a job. |
private void |
deployRunnerScript()
This is a helper method that is used to deploy the job runner script to the server. |
private java.lang.String |
getServerESTFile()
Helper method to compute the full path to the EST data file on the server. |
void |
pageChanged(WizardDialog dialog,
int currPage,
int prevPage)
This method is called just before this page is to be displayed. |
void |
run()
Method to perform various tasks involved in successfully creating and submitting a job on a remote server. |
private void |
setStepStatus(int stepIndex,
boolean performing)
Helper method to update the status of a step. |
private void |
startSession()
This is a helper method that is used to establish a valid session with the remote server on which the job is to be submitted. |
private void |
submitJob()
Helper method to run the job runner on the server. |
Methods inherited from class org.peace_tools.generic.GenericWizardPage |
---|
getPage, getSubTitle, getTitle, pageChanging, setTitle |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private final JobWizard wizard
private javax.swing.JTextArea log
private javax.swing.JLabel[] stepInfo
private static final java.lang.String INFO_MSG
private static final java.lang.String JOB_SUBMIT_ERROR
private static final java.lang.String FILE_MISMATCH
private static final java.lang.String SUCCESS_MESSAGE
private ServerSession server
private static final long serialVersionUID
Constructor Detail |
---|
public SubmitJobWizardPage(JobWizard wizard)
wizard
- The wizard that logically owns this page.Method Detail |
---|
public void pageChanged(WizardDialog dialog, int currPage, int prevPage)
pageChanged
in interface WizardPage
pageChanged
in class GenericWizardPage
dialog
- The wizard dialog that owns this wizard page.currPage
- The current page to be displayed.prevPage
- The previous page that was displayed.private void setStepStatus(int stepIndex, boolean performing)
stepIndex
- The index of the step whose status is to be
updated.performing
- If this flag is true, then this step is
underway. If it is false, it is assumed that the step has
been completed.public void run()
run
in interface java.lang.Runnable
protected void createJobUpdateThread()
private void submitJob() throws java.lang.Exception
java.lang.Exception
private void deployRunnerScript() throws java.lang.Exception
java.lang.Exception
- This method throws exceptions on errors.private void copyESTFile() throws java.io.IOException
java.io.IOException
private java.lang.String getServerESTFile()
private void createEntries()
private void startSession() throws java.io.IOException
java.io.IOException
private void createJobDirectory() throws java.lang.Exception
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |