Class SmtpPanel
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.apache.jmeter.protocol.smtp.sampler.gui.SmtpPanel
- All Implemented Interfaces:
- ImageObserver,- MenuContainer,- Serializable,- Accessible
Class to build gui-components for SMTP-sampler. Getter-methods serve the
 input-data to the sampler-object, which provides them to the
 SendMailCommand-object.
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from class javax.swing.JPanelJPanel.AccessibleJPanelNested classes/interfaces inherited from class javax.swing.JComponentJComponent.AccessibleJComponentNested classes/interfaces inherited from class java.awt.ContainerContainer.AccessibleAWTContainerNested classes/interfaces inherited from class java.awt.ComponentComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
- 
Field SummaryFields inherited from class javax.swing.JComponentlistenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWFields inherited from class java.awt.ComponentaccessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserverABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidclear()Reset all the Gui fields.Returns path of file(s) to be attached in e-mail from textfieldgetBody()Returns message body, i.e.Returns connection timeout for SMTP connection from textfieldReturns path to eml message to be sentReturns sender-address for e-mail from textfieldgetPort()Returns port of mail-server (standard 25 for SMTP/SMTP with StartTLS, 465 for SSL) from textfieldReturns receiver in field "bcc" from textfieldReturns receiver in field "cc" from textfieldReturns receiver in field "to" from textfieldReturns mail-server to be used to send message (from textfield)Returns subject of the e-mail from textfieldReturns timeout for SMTP connection from textfieldbooleanbooleanReturns if current timestamp is included in the subject (checkbox)booleanReturns if message size statistics are processed.booleanReturns true if message body should be plain (i.e.booleanReturns true if subject header should be suppressedbooleanReturns if mail-server needs authentication (checkbox)booleanReturns if an .eml-message is sent instead of the content of message-text areavoidsetAttachments(String attachments) Sets path of file to be attached in e-mail in textfieldvoidSets message body, i.e.voidsetConnectionTimeout(String connectionTimeout) Sets connection timeout (ms) for SMTP connectionvoidsetEmlMessage(String emlMessage) Set path to eml message to be sentvoidsetEnableDebug(boolean selected) voidsetHeaderFields(CollectionProperty fields) voidsetIncludeTimestamp(boolean includeTimestamp) Set timestamp to be included in the message-subject (checkbox)voidsetMailFrom(String mailFrom) Sets sender-address of e-mail in textfieldvoidsetMailReplyTo(String replyTo) voidsetMessageSizeStatistic(boolean val) Set message size to be calculated and included in sample result (checkbox)voidsetPassword(String authPassword) voidsetPlainBody(boolean plainBody) Sets the property that defines if the body should be plain (i.e.voidSets port of mail-servervoidsetReceiverBCC(String mailToBCC) Sets receiver in textfield "bcc"voidsetReceiverCC(String mailToCC) Sets receiver in textfield "cc"voidsetReceiverTo(String mailTo) Sets receiver in textfield "to"voidsetSecuritySettingsPanel(SecuritySettingsPanel securitySettingsPanel) voidSets mail-server to be used to send message in textfieldvoidsetSubject(String subject) Sets subject of the e-mail in textfieldvoidsetSuppressSubject(boolean emptySubject) Sets the property that defines if the subject header should be suppressedvoidsetTimeout(String timeout) Sets timeout (ms) for SMTP connectionvoidsetUseAuth(boolean selected) Set whether mail server needs auth.voidsetUseEmlMessage(boolean useEmlMessage) Set the use of an .eml-message instead of the content of message-text areavoidsetUsername(String username) Methods inherited from class javax.swing.JPanelgetAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIMethods inherited from class javax.swing.JComponentaddAncestorListener, 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, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, 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, updateMethods inherited from class java.awt.Containeradd, 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, validateTreeMethods inherited from class java.awt.Componentaction, 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, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, 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, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
- 
Constructor Details- 
SmtpPanelpublic SmtpPanel()Creates new form SmtpPanel, standard constructor. Calls initComponents();.
 
- 
- 
Method Details- 
getMailFromReturns sender-address for e-mail from textfield- Returns:
- Sender
 
- 
getReceiverToReturns receiver in field "to" from textfield- Returns:
- Receiver "to"
 
- 
getReceiverCCReturns receiver in field "cc" from textfield- Returns:
- Receiver "cc"
 
- 
getReceiverBCCReturns receiver in field "bcc" from textfield- Returns:
- Receiver "bcc"
 
- 
getBodyReturns message body, i.e. main-mime-part of message (from textfield)- Returns:
- Message body
 
- 
setBodySets message body, i.e. main-mime-part of message in textfield- Parameters:
- messageBodyText- Message body
 
- 
setMailFromSets sender-address of e-mail in textfield- Parameters:
- mailFrom- Sender
 
- 
setReceiverToSets receiver in textfield "to"- Parameters:
- mailTo- Receiver "to"
 
- 
setReceiverCCSets receiver in textfield "cc"- Parameters:
- mailToCC- Receiver "cc"
 
- 
setReceiverBCCSets receiver in textfield "bcc"- Parameters:
- mailToBCC- Receiver "bcc"
 
- 
getAttachmentsReturns path of file(s) to be attached in e-mail from textfield- Returns:
- File to attach
 
- 
setAttachmentsSets path of file to be attached in e-mail in textfield- Parameters:
- attachments- File to attach
 
- 
getPortReturns port of mail-server (standard 25 for SMTP/SMTP with StartTLS, 465 for SSL) from textfield- Returns:
- Mail-server port
 
- 
setPortSets port of mail-server- Parameters:
- port- Mail-server port
 
- 
getServerReturns mail-server to be used to send message (from textfield)- Returns:
- FQDN or IP of mail-server
 
- 
setServerSets mail-server to be used to send message in textfield- Parameters:
- server- FQDN or IP of mail-server
 
- 
getTimeoutReturns timeout for SMTP connection from textfield- Returns:
- Smtp timeout
 
- 
setTimeoutSets timeout (ms) for SMTP connection- Parameters:
- timeout- SMTP Timeout (ms)
 
- 
getConnectionTimeoutReturns connection timeout for SMTP connection from textfield- Returns:
- SMTP connection timeout
 
- 
setConnectionTimeoutSets connection timeout (ms) for SMTP connection- Parameters:
- connectionTimeout- SMTP Connection Timeout (ms)
 
- 
getSubjectReturns subject of the e-mail from textfield- Returns:
- Subject of e-mail
 
- 
setSubjectSets subject of the e-mail in textfield- Parameters:
- subject- Subject of e-mail
 
- 
isSuppressSubjectpublic boolean isSuppressSubject()Returns true if subject header should be suppressed- Returns:
- true if subject header should be suppressed
 
- 
setSuppressSubjectpublic void setSuppressSubject(boolean emptySubject) Sets the property that defines if the subject header should be suppressed- Parameters:
- emptySubject- flag whether subject header should be suppressed
 
- 
isPlainBodypublic boolean isPlainBody()Returns true if message body should be plain (i.e. not multipart/mixed)- Returns:
- true if using plain message body (i.e. not multipart/mixed)
 
- 
setPlainBodypublic void setPlainBody(boolean plainBody) Sets the property that defines if the body should be plain (i.e. not multipart/mixed)- Parameters:
- plainBody- whether to use a plain body (i.e. not multipart/mixed)
 
- 
isUseAuthpublic boolean isUseAuth()Returns if mail-server needs authentication (checkbox)- Returns:
- true if authentication is used
 
- 
setUseAuthpublic void setUseAuth(boolean selected) Set whether mail server needs auth.- Parameters:
- selected- flag whether mail server needs auth
 
- 
isEnableDebugpublic boolean isEnableDebug()
- 
setEnableDebugpublic void setEnableDebug(boolean selected) 
- 
isUseEmlMessagepublic boolean isUseEmlMessage()Returns if an .eml-message is sent instead of the content of message-text area- Returns:
- true if .eml is sent, false if text area content is sent in e-mail
 
- 
setUseEmlMessagepublic void setUseEmlMessage(boolean useEmlMessage) Set the use of an .eml-message instead of the content of message-text area- Parameters:
- useEmlMessage- Use eml message
 
- 
getEmlMessageReturns path to eml message to be sent- Returns:
- path to eml message to be sent
 
- 
setEmlMessageSet path to eml message to be sent- Parameters:
- emlMessage- path to eml message to be sent
 
- 
isIncludeTimestamppublic boolean isIncludeTimestamp()Returns if current timestamp is included in the subject (checkbox)- Returns:
- true if current timestamp is included in subject
 
- 
setIncludeTimestamppublic void setIncludeTimestamp(boolean includeTimestamp) Set timestamp to be included in the message-subject (checkbox)- Parameters:
- includeTimestamp- Should timestamp be included in subject?
 
- 
isMessageSizeStatisticspublic boolean isMessageSizeStatistics()Returns if message size statistics are processed. Output of processing will be included in sample result. (checkbox)- Returns:
- True if message size will be calculated
 
- 
setMessageSizeStatisticpublic void setMessageSizeStatistic(boolean val) Set message size to be calculated and included in sample result (checkbox)- Parameters:
- val- Should message size be calculated?
 
- 
getPassword
- 
setPassword
- 
getUsername
- 
setUsername
- 
getHeaderFields
- 
setHeaderFields
- 
getMailReplyTo
- 
setMailReplyTo
- 
clearpublic void clear()Reset all the Gui fields.
- 
getSecuritySettingsPanel
- 
setSecuritySettingsPanel
 
-