burp
Interface IMessageEditorTab


public interface IMessageEditorTab

Extensions that register an IMessageEditorTabFactory must return instances of this interface, which Burp will use to create custom tabs within its HTTP message editors.


Method Summary
 byte[] getMessage()
          This method returns the currently displayed message.
 byte[] getSelectedData()
          This method is used to retrieve the data that is currently selected by the user.
 java.lang.String getTabCaption()
          This method returns the caption that should appear on the custom tab when it is displayed.
 java.awt.Component getUiComponent()
          This method returns the component that should be used as the contents of the custom tab when it is displayed.
 boolean isEnabled(byte[] content, boolean isRequest)
          The hosting editor will invoke this method before it displays a new HTTP message, so that the custom tab can indicate whether it should be enabled for that message.
 boolean isModified()
          This method is used to determine whether the currently displayed message has been modified by the user.
 void setMessage(byte[] content, boolean isRequest)
          The hosting editor will invoke this method to display a new message or to clear the existing message.
 

Method Detail

getTabCaption

java.lang.String getTabCaption()
This method returns the caption that should appear on the custom tab when it is displayed. Note: Burp invokes this method once when the tab is first generated, and the same caption will be used every time the tab is displayed.

Returns:
The caption that should appear on the custom tab when it is displayed.

getUiComponent

java.awt.Component getUiComponent()
This method returns the component that should be used as the contents of the custom tab when it is displayed. Note: Burp invokes this method once when the tab is first generated, and the same component will be used every time the tab is displayed.

Returns:
The component that should be used as the contents of the custom tab when it is displayed.

isEnabled

boolean isEnabled(byte[] content,
                  boolean isRequest)
The hosting editor will invoke this method before it displays a new HTTP message, so that the custom tab can indicate whether it should be enabled for that message.

Parameters:
content - The message that is about to be displayed, or a zero-length array if the existing message is to be cleared.
isRequest - Indicates whether the message is a request or a response.
Returns:
The method should return true if the custom tab is able to handle the specified message, and so will be displayed within the editor. Otherwise, the tab will be hidden while this message is displayed.

setMessage

void setMessage(byte[] content,
                boolean isRequest)
The hosting editor will invoke this method to display a new message or to clear the existing message. This method will only be called with a new message if the tab has already returned true to a call to isEnabled() with the same message details.

Parameters:
content - The message that is to be displayed, or null if the tab should clear its contents and disable any editable controls.
isRequest - Indicates whether the message is a request or a response.

getMessage

byte[] getMessage()
This method returns the currently displayed message.

Returns:
The currently displayed message.

isModified

boolean isModified()
This method is used to determine whether the currently displayed message has been modified by the user. The hosting editor will always call getMessage() before calling this method, so any pending edits should be completed within getMessage().

Returns:
The method should return true if the user has modified the current message since it was first displayed.

getSelectedData

byte[] getSelectedData()
This method is used to retrieve the data that is currently selected by the user.

Returns:
The data that is currently selected by the user. This may be null if no selection is currently made.