From: <wu...@us...> - 2008-03-19 17:42:53
|
Revision: 92 http://davinspector.svn.sourceforge.net/davinspector/?rev=92&view=rev Author: wuest Date: 2008-03-19 10:42:10 -0700 (Wed, 19 Mar 2008) Log Message: ----------- Updated i18n support (moved from Util to Internationalization). Added and reformated documentation and comments. Moved state variables of the toggle buttons from MainView into the corresponding actions. Modified Paths: -------------- trunk/DAVInspector/src/de/dlr/davinspector/DAVInspector.java trunk/DAVInspector/src/de/dlr/davinspector/common/Constant.java trunk/DAVInspector/src/de/dlr/davinspector/common/Util.java trunk/DAVInspector/src/de/dlr/davinspector/configuration/Configuration.java trunk/DAVInspector/src/de/dlr/davinspector/configuration/PluginConfiguration.java trunk/DAVInspector/src/de/dlr/davinspector/history/AMessage.java trunk/DAVInspector/src/de/dlr/davinspector/history/AMessageParser.java trunk/DAVInspector/src/de/dlr/davinspector/history/HistoryTableCellRenderer.java trunk/DAVInspector/src/de/dlr/davinspector/history/HistoryTableModel.java trunk/DAVInspector/src/de/dlr/davinspector/history/MessageEvent.java trunk/DAVInspector/src/de/dlr/davinspector/history/MessageHistory.java trunk/DAVInspector/src/de/dlr/davinspector/http/HTTPMessageParser.java trunk/DAVInspector/src/de/dlr/davinspector/http/HTTPMethod.java trunk/DAVInspector/src/de/dlr/davinspector/http/HTTPStatusCode.java trunk/DAVInspector/src/de/dlr/davinspector/plugin/IEditPlugin.java trunk/DAVInspector/src/de/dlr/davinspector/plugin/IPlugin.java trunk/DAVInspector/src/de/dlr/davinspector/plugin/IViewPlugin.java trunk/DAVInspector/src/de/dlr/davinspector/plugin/JarFilenameFilter.java trunk/DAVInspector/src/de/dlr/davinspector/plugin/PluginManager.java trunk/DAVInspector/src/de/dlr/davinspector/plugins/headerplugin/HeaderPlugin.java trunk/DAVInspector/src/de/dlr/davinspector/plugins/recordingplugin/RecordingConfigurationPanel.java trunk/DAVInspector/src/de/dlr/davinspector/plugins/recordingplugin/RecordingPlugin.java trunk/DAVInspector/src/de/dlr/davinspector/plugins/xmlplugin/JTextPaneContentHandler.java trunk/DAVInspector/src/de/dlr/davinspector/plugins/xmlplugin/XMLPlugin.java trunk/DAVInspector/src/de/dlr/davinspector/plugins/xmlplugin/XMLTextPane.java trunk/DAVInspector/src/de/dlr/davinspector/plugins/xmltreeplugin/JTreeContentHandler.java trunk/DAVInspector/src/de/dlr/davinspector/plugins/xmltreeplugin/XMLTreePlugin.java trunk/DAVInspector/src/de/dlr/davinspector/plugins/xmltreeplugin/XMLTreeView.java trunk/DAVInspector/src/de/dlr/davinspector/relay/ChannelThread.java trunk/DAVInspector/src/de/dlr/davinspector/relay/DataEvent.java trunk/DAVInspector/src/de/dlr/davinspector/relay/IRelayModel.java trunk/DAVInspector/src/de/dlr/davinspector/relay/RelayModel.java trunk/DAVInspector/src/de/dlr/davinspector/relay/package.html trunk/DAVInspector/src/de/dlr/davinspector/ui/AboutDialog.java trunk/DAVInspector/src/de/dlr/davinspector/ui/ConfigurationDialog.java trunk/DAVInspector/src/de/dlr/davinspector/ui/IMainController.java trunk/DAVInspector/src/de/dlr/davinspector/ui/MainController.java trunk/DAVInspector/src/de/dlr/davinspector/ui/MainView.java trunk/DAVInspector/src/de/dlr/davinspector/ui/PluginConfigurationDialog.java trunk/DAVInspector/src/de/dlr/davinspector/ui/PluginConfigurationTableCellRenderer.java trunk/DAVInspector/src/de/dlr/davinspector/ui/PluginConfigurationTableModel.java trunk/DAVInspector/src/de/dlr/davinspector/ui/UIResource.java trunk/DAVInspector/test/de/dlr/davinspector/http/HTTPTest.java Added Paths: ----------- trunk/DAVInspector/src/de/dlr/davinspector/common/Internationalization.java Modified: trunk/DAVInspector/src/de/dlr/davinspector/DAVInspector.java =================================================================== --- trunk/DAVInspector/src/de/dlr/davinspector/DAVInspector.java 2008-03-19 13:05:53 UTC (rev 91) +++ trunk/DAVInspector/src/de/dlr/davinspector/DAVInspector.java 2008-03-19 17:42:10 UTC (rev 92) @@ -27,7 +27,6 @@ import java.util.Locale; -import de.dlr.davinspector.common.Util; import de.dlr.davinspector.relay.IRelayModel; import de.dlr.davinspector.relay.RelayModel; import de.dlr.davinspector.ui.MainController; @@ -53,8 +52,8 @@ */ public static void main(String[] args) { // for testing i18n support -// Locale.setDefault(new Locale("EN")); -// Locale.setDefault(new Locale("DE")); + Locale.setDefault(new Locale("en")); +// Locale.setDefault(new Locale("de")); IRelayModel model = new RelayModel(); new MainController(model); Modified: trunk/DAVInspector/src/de/dlr/davinspector/common/Constant.java =================================================================== --- trunk/DAVInspector/src/de/dlr/davinspector/common/Constant.java 2008-03-19 13:05:53 UTC (rev 91) +++ trunk/DAVInspector/src/de/dlr/davinspector/common/Constant.java 2008-03-19 17:42:10 UTC (rev 92) @@ -36,176 +36,107 @@ */ public final class Constant { - /** - * Basis of the hexadecimal number system. - */ + /** Basis of the hexadecimal number system. */ public static final int HEX_RADIX = 16; - - /** - * Main window width. - */ + + /** Main window width. */ public static final int UI_MAIN_WINDOW_WIDTH = 800; - - /** - * Main window height. - */ + + /** Main window height. */ public static final int UI_MAIN_WINDOW_HEIGHT = 600; - - /** - * Configuration dialog width. - */ + + /** Configuration dialog width. */ public static final int UI_CONFIG_DIALOG_WIDTH = 300; - - /** - * Configuration dialog height. - */ + + /** Configuration dialog height. */ public static final int UI_CONFIG_DIALOG_HEIGHT = 200; - - /** - * Plugin configuration width. - */ + + /** Plugin configuration width. */ public static final int UI_PLUGIN_CONFIG_DIALOG_WIDTH = 650; - - /** - * Plugin configuration height. - */ + + /** Plugin configuration height. */ public static final int UI_PLUGIN_CONFIG_DIALOG_HEIGTH = 250; - - /** - * About dialog width. - */ + + /** About dialog width. */ public static final int UI_ABOUT_DIALOG_WIDTH = 250; - - /** - * About dialog height. - */ + + /** About dialog height. */ public static final int UI_ABOUT_DIALOG_HEIGTH = 275; - - /** - * Backgroundcolor of replies. - */ - public static final Color UI_REPLY_COLOR = new Color(255, 204, 102); - - /** - * Backgroundcolor of requests. - */ - public static final Color UI_REQUEST_COLOR = new Color(170, 240, 240); - - /** - * Line Feed + Carriage Return. - */ + + /** Backgroundcolor of replies. */ + public static final Color UI_REPLY_COLOR = new Color(255, 232, 140); + + /** Backgroundcolor of requests. */ + public static final Color UI_REQUEST_COLOR = new Color(210, 255, 210); + + /** Line Feed + Carriage Return. */ public static final String LFCR = "\r\n"; - - /** - * Line Feed. - */ + + /** Line Feed. */ public static final String LF = "\r"; - - /** - * Carriage Return. - */ + + /** Carriage Return. */ public static final String CR = "\n"; - - /** - * End Of File. - */ + + /** End Of File. */ public static final int EOF = -1; - - /** - * Application Title. - */ + + /** Application Title. */ public static final String APP_TITLE = "DAVInspector"; - - /** - * Version of the application. - */ + + /** Version of the application. */ public static final String APP_VERSION = "0.1"; - - /** - * Filename of the configuration file. - */ + + /** Filename of the configuration file. */ public static final String APP_CONFIGURATION_FILENAME = "config.properties"; - - /** - * Filename of the plugin configuration file. - */ + + /** Filename of the plugin configuration file. */ public static final String APP_PLUGIN_CONFIGURATION_FILENAME = "plugin-config.properties"; - - /** - * Timeout waiting for a ChannelThread to finish in ms. - */ + + /** Timeout waiting for a ChannelThread to finish in ms. */ public static final int RELAY_THREADTIMEOUT = 100; - - /** - * Linger time in seconds for socket. - */ + + /** Linger time in seconds for socket. */ public static final int RELAY_LINGERTIME = 100; - - /** - * Size of the receive buffer. - */ + + /** Size of the receive buffer. */ public static final int RELAY_RECVBUFFERSIZE = 2048; - /** - * Backlog parameter used when creating the ServerSocket. - */ + /** Backlog parameter used when creating the ServerSocket. */ public static final int RELAY_BACKLOG = 1; - - /** - * Address of the Server. IP address or domain name. - */ - public static final String RELAY_SERVERADDRESS = "localhost"; //"bsasdf01.as.bs.dlr.de"; - - /** - * Server port. - */ + + /** Address of the Server. IP address or domain name. */ + public static final String RELAY_SERVERADDRESS = "localhost"; + + /** Server port. */ public static final int RELAY_SERVERPORT = 8080; - - /** - * Address of the Client. Normally this is empty and - * the address of the client is of no importance. - */ + + /** Address of the Client. Normally this is empty and the address of the client is of no importance. */ public static final String RELAY_CLIENTADDRESS = ""; - - /** - * Client port. - */ + + /** Client port. */ public static final int RELAY_CLIENTPORT = 8888; - /** - * Classpath to the plugins. - */ + /** Classpath to the plugins. */ public static final String PLUGIN_CLASSPATH = "de.dlr.davinspector.plugins."; - /** - * Path to the resources, e.g. graphics and icons. - */ - public static final String RESOURCE_PATH = "/de/dlr/davinspector/resource/"; + /** Path to the resources, e.g. graphics, icons and language files. */ + public static final String RESOURCE_PATH = "de/dlr/davinspector/resource/"; - /** - * Column index of the enable/disable plugin for the client column in the plugin configuration dialog. - */ + /** Column index of the enable/disable plugin for the client column in the plugin configuration dialog. */ public static final int PLUGIN_CONFIG_CLIENT_COL = 0; - /** - * Column index of the enable/disable plugin for the server column in the plugin configuration dialog. - */ + /** Column index of the enable/disable plugin for the server column in the plugin configuration dialog. */ public static final int PLUGIN_CONFIG_SERVER_COL = 1; - /** - * Column index of the plugin name column in the plugin configuration dialog. - */ + /** Column index of the plugin name column in the plugin configuration dialog. */ public static final int PLUGIN_CONFIG_NAME_COL = 2; - /** - * System logger configuration file (log4j). - */ + /** System logger configuration file (log4j). */ public static final String SYSTEM_LOGGER_CONFIGURATION = "logging.properties"; - /** - * Empty Constructor. + /** + * Hide class constructor. */ - private Constant() { - - } + private Constant() { } } Added: trunk/DAVInspector/src/de/dlr/davinspector/common/Internationalization.java =================================================================== --- trunk/DAVInspector/src/de/dlr/davinspector/common/Internationalization.java (rev 0) +++ trunk/DAVInspector/src/de/dlr/davinspector/common/Internationalization.java 2008-03-19 17:42:10 UTC (rev 92) @@ -0,0 +1,59 @@ +/* + * Internationalization.java + * + * This class provides all methods needed for internationalization. + * + * Created: 19.03.2008 Jochen Wuest <joc...@dl...> + * Changed: + * + * $Id$ + * + * Copyright 2007 Deutsches Zentrum fuer Luft- und Raumfahrt e.V. (DLR) + * + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package de.dlr.davinspector.common; + +import java.util.Locale; +import java.util.ResourceBundle; + + +/** + * This class provides all methods needed for internationalization. + * + * @version $LastChangedRevision$ + * @author Jochen Wuest + */ +public final class Internationalization { + + /** The resource bundle. */ + static final ResourceBundle RESOURCE_BUNDLE = + ResourceBundle.getBundle(Constant.RESOURCE_PATH + "TextBundle", Locale.getDefault()); + + /** + * Hide class constructor. + */ + private Internationalization() { } + + /** + * This method returns the translation for the given key. + * The information is extracted from the proper language file. + * + * @param key String + * @return String + */ + public static String getTranslation(String key) { + return Internationalization.RESOURCE_BUNDLE.getString(key); + } +} Modified: trunk/DAVInspector/src/de/dlr/davinspector/common/Util.java =================================================================== --- trunk/DAVInspector/src/de/dlr/davinspector/common/Util.java 2008-03-19 13:05:53 UTC (rev 91) +++ trunk/DAVInspector/src/de/dlr/davinspector/common/Util.java 2008-03-19 17:42:10 UTC (rev 92) @@ -28,8 +28,6 @@ import java.awt.Dimension; import java.awt.Toolkit; import java.awt.Window; -import java.util.Locale; -import java.util.ResourceBundle; import javax.swing.UIManager; import javax.swing.UnsupportedLookAndFeelException; @@ -43,30 +41,12 @@ */ public final class Util { - /** - * + /** + * Hide class constructor. */ - private static final ResourceBundle RESOURCE_BUNDLE = - ResourceBundle.getBundle("de/dlr/davinspector/resource/TextBundle", Locale.getDefault()); - - /** - * Empty Contructor for utility class. - */ - private Util() { - - } + private Util() { } /** - * TODO: wues_ha: Enter comment! - * - * @param key String - * @return String - */ - public static String getTranslation(String key) { - return RESOURCE_BUNDLE.getString(key); - } - - /** * This method tries to set the look & feel of the current OS. */ public static void setUIDesign() { Modified: trunk/DAVInspector/src/de/dlr/davinspector/configuration/Configuration.java =================================================================== --- trunk/DAVInspector/src/de/dlr/davinspector/configuration/Configuration.java 2008-03-19 13:05:53 UTC (rev 91) +++ trunk/DAVInspector/src/de/dlr/davinspector/configuration/Configuration.java 2008-03-19 17:42:10 UTC (rev 92) @@ -41,31 +41,21 @@ */ public class Configuration { - /** - * - */ + /** The properties object. */ private Properties myProperties; - /** - * Port number of the server connection. - */ + /** Port number of the server connection. */ private int myServerPort; - /** - * Port number of the client connection. - */ + /** Port number of the client connection. */ private int myClientPort; - /** - * Address of the server. - */ + /** Address of the server.*/ private String myServerAddress; - /** - * Address of the client. - */ + /** Address of the client. */ private String myClientAddress; - + /** * Constructor, loads the configuration from the configuration file. */ Modified: trunk/DAVInspector/src/de/dlr/davinspector/configuration/PluginConfiguration.java =================================================================== --- trunk/DAVInspector/src/de/dlr/davinspector/configuration/PluginConfiguration.java 2008-03-19 13:05:53 UTC (rev 91) +++ trunk/DAVInspector/src/de/dlr/davinspector/configuration/PluginConfiguration.java 2008-03-19 17:42:10 UTC (rev 92) @@ -43,24 +43,16 @@ */ public class PluginConfiguration { - /** - * Symbol used for separating the plugin names. - */ + /** Symbol used for separating the plugin names. */ private static final String DELIMITER = ","; - /** - * - */ + /** The properties object. */ private Properties myProperties; - - /** - * This list contains the names of all plugins to view messages to the server. - */ + + /** This list contains the names of all plugins to view messages to the server. */ private List<String> myActivePluginsServer; - /** - * This list contains the names of all plugins to view messages to the client. - */ + /** This list contains the names of all plugins to view messages to the client. */ private List<String> myActivePluginsClient; /** Modified: trunk/DAVInspector/src/de/dlr/davinspector/history/AMessage.java =================================================================== --- trunk/DAVInspector/src/de/dlr/davinspector/history/AMessage.java 2008-03-19 13:05:53 UTC (rev 91) +++ trunk/DAVInspector/src/de/dlr/davinspector/history/AMessage.java 2008-03-19 17:42:10 UTC (rev 92) @@ -1,9 +1,9 @@ /* * AMessage.java * - * TODO: wues_ha Enter comment! + * The abstract class for messages. * - * Created: 29.02.2008 wues_ha <email> + * Created: 29.02.2008 Jochen Wuest <joc...@dl...> * Changed: * * $Id$ @@ -29,16 +29,14 @@ /** - * TODO: wues_ha: Enter comment! + * The abstract class for messages. * * @version $LastChangedRevision$ * @author Jochen Wuest */ public abstract class AMessage { - /** - * - */ + /** The counter for unique numbering. */ protected static int idCounter; /** @@ -52,69 +50,42 @@ * @author Jochen Wuest */ public enum MessageDirection { - /** - * - */ + /** Data from client to server. */ Request, - /** - * - */ + /** Data from server to client. */ Response } - /** - * Parsing state of the message. - */ + /** Parsing state of the message. */ protected Boolean myParsingState; - /** - * Unique ID of a message. - */ + /** Unique ID of a message. */ protected int myID; - - /** - * Timestamp of the current message. - */ + + /** Timestamp of the current message. */ protected Date myTimestamp; - /** - * myDirection indicates the direction of the message. - * @see MessageDirection - */ + /** myDirection indicates the direction of the message. @see MessageDirection */ protected MessageDirection myDirection; - /** - * This string contains the raw data of the message. - */ + /** This string contains the raw data of the message. */ protected String myRawData; - /** - * - */ + /** This string contains the unprocessed header of the message. */ protected String myRawHeader; - /** - * - */ + /** This string contains the unprocessed body of the message. */ protected String myRawBody; - - /** - * - */ + + /** This string contains the processed header of the message. */ protected String myParsedHeader; - /** - * - */ + /** This string contains the processed body of the message. */ protected String myParsedBody; - - /** - * The size in bytes of the current message. - */ + + /** The size in bytes of the current message. */ protected int mySize; - - /** * This method returns the ID of the message. * @@ -186,7 +157,9 @@ } /** - * TODO: wues_ha: Enter comment! + * This method parses the current raw data. + * If the buffer contains more than only the data for the current message, the rest is returned. + * * @return String */ public String parseMessage() { @@ -194,7 +167,8 @@ } /** - * TODO: wues_ha: Enter comment! + * This method returns <code>true</code> if the message processing is done + * and a valid message has been recognized. * * @return Boolean */ Modified: trunk/DAVInspector/src/de/dlr/davinspector/history/AMessageParser.java =================================================================== --- trunk/DAVInspector/src/de/dlr/davinspector/history/AMessageParser.java 2008-03-19 13:05:53 UTC (rev 91) +++ trunk/DAVInspector/src/de/dlr/davinspector/history/AMessageParser.java 2008-03-19 17:42:10 UTC (rev 92) @@ -1,9 +1,9 @@ /* * AMessageParser.java * - * TODO: wues_ha Enter comment! + * The abstract class for message parsers. * - * Created: 29.02.2008 wues_ha <email> + * Created: 29.02.2008 Jochen Wuest <joc...@dl...> * Changed: * * $Id$ @@ -27,20 +27,18 @@ /** - * TODO: wues_ha: Enter comment! + * The abstract class for message parsers. * * @version $LastChangedRevision$ * @author Jochen Wuest */ public abstract class AMessageParser extends AMessage { - /** - * - */ + /** The Message. */ protected AMessage myMessage; /** - * TODO: wues_ha: enter comment! + * Constructor of the abstract MessageParser class. * * @param aMessage AMessage */ Modified: trunk/DAVInspector/src/de/dlr/davinspector/history/HistoryTableCellRenderer.java =================================================================== --- trunk/DAVInspector/src/de/dlr/davinspector/history/HistoryTableCellRenderer.java 2008-03-19 13:05:53 UTC (rev 91) +++ trunk/DAVInspector/src/de/dlr/davinspector/history/HistoryTableCellRenderer.java 2008-03-19 17:42:10 UTC (rev 92) @@ -43,14 +43,10 @@ */ public class HistoryTableCellRenderer extends DefaultTableCellRenderer implements TableCellRenderer { - /** - * - */ + /** Serial Version UID, not valid. */ private static final long serialVersionUID = 1L; - /** - * Used to save the direction of a message to color a complete row. - */ + /** Used to save the direction of a message to color a complete row. */ private Boolean isRequest; /** @@ -87,7 +83,7 @@ setBackground(Constant.UI_REPLY_COLOR); } } - + return this; } } Modified: trunk/DAVInspector/src/de/dlr/davinspector/history/HistoryTableModel.java =================================================================== --- trunk/DAVInspector/src/de/dlr/davinspector/history/HistoryTableModel.java 2008-03-19 13:05:53 UTC (rev 91) +++ trunk/DAVInspector/src/de/dlr/davinspector/history/HistoryTableModel.java 2008-03-19 17:42:10 UTC (rev 92) @@ -27,7 +27,7 @@ import javax.swing.table.DefaultTableModel; -import de.dlr.davinspector.common.Util; +import de.dlr.davinspector.common.Internationalization; /** * Data model for the history table. @@ -37,19 +37,15 @@ */ public class HistoryTableModel extends DefaultTableModel implements INewMessageListener { - /** - * - */ + /** Serial Version UID, not valid. */ private static final long serialVersionUID = 0L; - /** - * Column Definition for history table. - */ + /** Column Definition for history table. */ private String[] columnNames = { - Util.getTranslation("column_name_type"), - Util.getTranslation("column_name_id"), - Util.getTranslation("column_name_timestamp"), - Util.getTranslation("column_name_size") + Internationalization.getTranslation("column_name_type"), + Internationalization.getTranslation("column_name_id"), + Internationalization.getTranslation("column_name_timestamp"), + Internationalization.getTranslation("column_name_size") }; /** Modified: trunk/DAVInspector/src/de/dlr/davinspector/history/MessageEvent.java =================================================================== --- trunk/DAVInspector/src/de/dlr/davinspector/history/MessageEvent.java 2008-03-19 13:05:53 UTC (rev 91) +++ trunk/DAVInspector/src/de/dlr/davinspector/history/MessageEvent.java 2008-03-19 17:42:10 UTC (rev 92) @@ -36,14 +36,10 @@ */ public class MessageEvent extends EventObject { - /** - * - */ + /** Serial Version UID, not valid. */ private static final long serialVersionUID = 1L; - /** - * The message. - */ + /** The message. */ private AMessage myMessage; /** Modified: trunk/DAVInspector/src/de/dlr/davinspector/history/MessageHistory.java =================================================================== --- trunk/DAVInspector/src/de/dlr/davinspector/history/MessageHistory.java 2008-03-19 13:05:53 UTC (rev 91) +++ trunk/DAVInspector/src/de/dlr/davinspector/history/MessageHistory.java 2008-03-19 17:42:10 UTC (rev 92) @@ -40,43 +40,29 @@ /** - * This class saves and provides access - * to the processed messages. + * This class saves and provides access to the processed messages. * * @version $LastChangedRevision$ * @author Jochen Wuest */ public class MessageHistory implements IServerListener, IClientListener { - - /** - * List of listeners for new messages. - */ + /** List of listeners for new messages. */ private EventListenerList myListenersNewMessage = new EventListenerList(); - /** - * List of listeners for refresh. - */ + /** List of listeners for refresh. */ private EventListenerList myListenersRefreshMessage = new EventListenerList(); - - /** - * This string buffers the client side raw data. - */ + + /** This string buffers the client side raw data. */ private String myClientsideBuffer; - /** - * This string buffers the server side raw data. - */ + /** This string buffers the server side raw data. */ private String myServersideBuffer; - - /** - * This vector stores the messages. - */ + + /** This vector stores the messages. */ private List<AMessage> myMessages = null; - /** - * Reference to the relay model. - */ + /** Reference to the relay model. */ private IRelayModel myRelay = null; /** @@ -107,7 +93,7 @@ public void storeMessage(String data, Boolean toClient, Date timestamp) { //TODO: add decorator dependent on protocol (switch http, ...). - //INFO: idCounter != number of messages + // Notice: idCounter != number of messages HTTPMessageParser message = new HTTPMessageParser(new Message()); message.setMessageDirection(toClient); @@ -140,7 +126,6 @@ /** * Deletes all stored messages. - * */ public void deleteAllMessages() { myMessages.clear(); Modified: trunk/DAVInspector/src/de/dlr/davinspector/http/HTTPMessageParser.java =================================================================== --- trunk/DAVInspector/src/de/dlr/davinspector/http/HTTPMessageParser.java 2008-03-19 13:05:53 UTC (rev 91) +++ trunk/DAVInspector/src/de/dlr/davinspector/http/HTTPMessageParser.java 2008-03-19 17:42:10 UTC (rev 92) @@ -85,42 +85,30 @@ * INFO: Currently no chunk extensions are handled. */ private static final String REGEX_CHUNK_SIZE = "\r\n([0-9a-fA-F]+)\r\n"; - + /** * This expression matches the transfer encoding of a message. * Transfer-Encoding: SPACE* chunked CRLF * INFO: Currently no transfer extensions are handled. */ private static final String REGEX_IS_CHUNKED = "Transfer-Encoding:[ ]*chunked\r\n"; - - /** - * Logger, Apache log4j. - */ + + /** Logger, Apache log4j. */ private static Logger myLogger = Logger.getLogger(HTTPMessageParser.class); - /** - * The http request method. - */ + /** The http request method. */ private String myMethod; - /** - * The http response status code. - */ + /** The http response status code. */ private int myStatusCode = 0; - /** - * Version of the http protocol uesed by the message. - */ + /** Version of the http protocol uesed by the message. */ private String myProtocolVersion = ""; - /** - * <code>True</code> if the message uses chunked encoding. - */ + /** <code>True</code> if the message uses chunked encoding. */ private Boolean isChunked = false; - /** - * Length of the message body in bytes. - */ + /** Length of the message body in bytes. */ private int myContentLength = 0; /** @@ -136,8 +124,9 @@ } /** - * TODO: wues_ha: Enter comment! - * + * This method extracts the header and body from the raw data of the message. + * The data from the start to the first empty line presents the <code>myRawHeader</code>, + * the data from the first empty line until the end of the raw data presents the <code>myRawBody</code>. */ private void extractHeaderBody() { String[] s = myRawData.split(REGEX_EMPTY_LINE); @@ -168,7 +157,7 @@ Matcher matcher = pattern.matcher(myRawData); if (matcher.find()) { myLogger.debug("found status line"); - myMethod = ""; // TODO: set last method + myMethod = ""; // INFO: set last method myStatusCode = Integer.parseInt(matcher.group(2)); myProtocolVersion = matcher.group(1); isChunked = isChunked(); @@ -294,7 +283,9 @@ } /** - * TODO: wues_ha: Enter comment! + * The method <code>decodeChunkedEncoding</code> tries to read all chunks of the message. + * If the all chunks have been recognized the content of all chunks is returned and the + * <code>myParsingState</code> is set to <code>true</code>. * * @see RFC 2616: 3.6.1 Chunked Transfer Coding * Chunked-Body = *chunk @@ -337,7 +328,7 @@ int start = matcher.end(); int stopp = matcher.end() + chunksize; - // TODO: ung\xFCltige l\xE4ngen abfangen! + // check if lengths are valid if (stopp > myRawData.length()) { myLogger.debug("chunk decoding: invalid right boundary " + stopp); stopp = myRawData.length(); Modified: trunk/DAVInspector/src/de/dlr/davinspector/http/HTTPMethod.java =================================================================== --- trunk/DAVInspector/src/de/dlr/davinspector/http/HTTPMethod.java 2008-03-19 13:05:53 UTC (rev 91) +++ trunk/DAVInspector/src/de/dlr/davinspector/http/HTTPMethod.java 2008-03-19 17:42:10 UTC (rev 92) @@ -1,7 +1,7 @@ /* * HTTPMethod.java * - * TODO: wues_ha Enter comment! + * HTTP methodes according to RFC2616 (HTTP1.1) and RFC 4918 (WebDAV). * * Created: 23.01.2008 Jochen Wuest <joc...@dl...> * Changed: @@ -27,29 +27,58 @@ /** - * HTTP methodes according to - * RFC2616 (HTTP1.1) and RFC 4918 (WebDAV). + * HTTP methodes according to RFC2616 (HTTP1.1) and RFC 4918 (WebDAV). * * @version $LastChangedRevision$ * @author Jochen Wuest */ public class HTTPMethod { - // CHECKSTYLE:OFF + + /** */ public static final String HTTP_METHOD_UNKNOWN = "UNKOWN"; + + /** */ public static final String HTTP_METHOD_HEAD = "HEAD"; + + /** */ public static final String HTTP_METHOD_GET = "GET"; + + /** */ public static final String HTTP_METHOD_POST = "POST"; + + /** */ public static final String HTTP_METHOD_PUT = "PUT"; + + /** */ public static final String HTTP_METHOD_DELETE = "DELETE"; + + /** */ public static final String HTTP_METHOD_OPTIONS = "OPTIONS"; + + /** */ public static final String HTTP_METHOD_TRACE = "TRACE"; + + /** */ public static final String HTTP_METHOD_CONNECT = "CONNECT"; + + /** */ public static final String HTTP_METHOD_PROPFIND = "PROPFIND"; + + /** */ public static final String HTTP_METHOD_PROPPATCH = "PROPPATCH"; + + /** */ public static final String HTTP_METHOD_MKCOL = "MKCOL"; + + /** */ public static final String HTTP_METHOD_COPY = "COPY"; + + /** */ public static final String HTTP_METHOD_MOVE = "MOVE"; + + /** */ public static final String HTTP_METHOD_LOCK = "LOCK"; + + /** */ public static final String HTTP_METHOD_UNLOCK = "UNLOCK"; -// CHECKSTYLE:ON } Modified: trunk/DAVInspector/src/de/dlr/davinspector/http/HTTPStatusCode.java =================================================================== --- trunk/DAVInspector/src/de/dlr/davinspector/http/HTTPStatusCode.java 2008-03-19 13:05:53 UTC (rev 91) +++ trunk/DAVInspector/src/de/dlr/davinspector/http/HTTPStatusCode.java 2008-03-19 17:42:10 UTC (rev 92) @@ -1,7 +1,7 @@ /* * HTTPStatusCode.java * - * TODO: wues_ha Enter comment! + * HTTP status codes according to RFC2616 (HTTP1.1) and RFC 4918 (WebDAV). * * Created: 23.01.2008 Jochen Wuest <joc...@dl...> * Changed: @@ -26,13 +26,13 @@ package de.dlr.davinspector.http; /** - * HTTP status codes according to - * RFC2616 (HTTP1.1) and RFC 4918 (WebDAV). + * HTTP status codes according to RFC2616 (HTTP1.1) and RFC 4918 (WebDAV). * * @version $LastChangedRevision$ * @author Jochen Wuest */ public final class HTTPStatusCode { + // CHECKSTYLE:OFF /* * 1xx: Informational - Request received, continuing process @@ -101,10 +101,7 @@ // CHECKSTYLE:ON /** - * TODO: HJW: enter comment! - * + * Hide class constructor. */ - private HTTPStatusCode() { - - } + private HTTPStatusCode() { } } Modified: trunk/DAVInspector/src/de/dlr/davinspector/plugin/IEditPlugin.java =================================================================== --- trunk/DAVInspector/src/de/dlr/davinspector/plugin/IEditPlugin.java 2008-03-19 13:05:53 UTC (rev 91) +++ trunk/DAVInspector/src/de/dlr/davinspector/plugin/IEditPlugin.java 2008-03-19 17:42:10 UTC (rev 92) @@ -38,6 +38,7 @@ * @author Jochen Wuest */ public interface IEditPlugin extends IPlugin { + /** * Returns the processed {@link AMessage} of the plugin. * Modified: trunk/DAVInspector/src/de/dlr/davinspector/plugin/IPlugin.java =================================================================== --- trunk/DAVInspector/src/de/dlr/davinspector/plugin/IPlugin.java 2008-03-19 13:05:53 UTC (rev 91) +++ trunk/DAVInspector/src/de/dlr/davinspector/plugin/IPlugin.java 2008-03-19 17:42:10 UTC (rev 92) @@ -113,29 +113,17 @@ * Indentifier for plugin-type. */ public enum PlugInType { - /** - * Plugin has GUI, client and server. - */ + /** Plugin has GUI, client and server. */ VIEW_GENERAL, - /** - * Plugin allows editing of the content, client and server. - */ + /** Plugin allows editing of the content, client and server. */ EDIT_GENERAL, - /** - * Plugin has GUI, only client. - */ + /** Plugin has GUI, only client. */ VIEW_CLIENT, - /** - * Plugin has GUI, only server. - */ + /** Plugin has GUI, only server. */ VIEW_SERVER, - /** - * Plugin allows editing of the content, only client. - */ + /** Plugin allows editing of the content, only client. */ EDIT_CLIENT, - /** - * Plugin allows editing of the content, only server. - */ + /** Plugin allows editing of the content, only server. */ EDIT_SERVER } @@ -148,13 +136,9 @@ * @author Jochen Wuest */ public enum Direction { - /** - * - */ + /** Plugin on the client side. */ CLIENT, - /** - * - */ + /** Plugin on the server side. */ SERVER } } Modified: trunk/DAVInspector/src/de/dlr/davinspector/plugin/IViewPlugin.java =================================================================== --- trunk/DAVInspector/src/de/dlr/davinspector/plugin/IViewPlugin.java 2008-03-19 13:05:53 UTC (rev 91) +++ trunk/DAVInspector/src/de/dlr/davinspector/plugin/IViewPlugin.java 2008-03-19 17:42:10 UTC (rev 92) @@ -36,6 +36,7 @@ * @author Jochen Wuest */ public interface IViewPlugin extends IPlugin { + /** * Returns the JComponent of the plugin. * Modified: trunk/DAVInspector/src/de/dlr/davinspector/plugin/JarFilenameFilter.java =================================================================== --- trunk/DAVInspector/src/de/dlr/davinspector/plugin/JarFilenameFilter.java 2008-03-19 13:05:53 UTC (rev 91) +++ trunk/DAVInspector/src/de/dlr/davinspector/plugin/JarFilenameFilter.java 2008-03-19 17:42:10 UTC (rev 92) @@ -45,5 +45,4 @@ public boolean accept(File directory, String filename) { return filename.toLowerCase().endsWith(".jar"); } - } Modified: trunk/DAVInspector/src/de/dlr/davinspector/plugin/PluginManager.java =================================================================== --- trunk/DAVInspector/src/de/dlr/davinspector/plugin/PluginManager.java 2008-03-19 13:05:53 UTC (rev 91) +++ trunk/DAVInspector/src/de/dlr/davinspector/plugin/PluginManager.java 2008-03-19 17:42:10 UTC (rev 92) @@ -38,7 +38,6 @@ import de.dlr.davinspector.common.Constant; import de.dlr.davinspector.history.AMessage; -import de.dlr.davinspector.history.Message; /** * This class loads all available plugins and manages the activated plugins @@ -51,29 +50,19 @@ */ public final class PluginManager { - /** - * - */ + /** The plugin manager. */ private static PluginManager instance = new PluginManager(); - - /** - * Logger, Apache log4j. - */ + + /** Logger, Apache log4j. */ private static Logger myLogger = Logger.getLogger(PluginManager.class); - - /** - * Vector containing all loaded plugins. - */ + + /** Vector containing all loaded plugins. */ private List<IPlugin> myPluginVector = new Vector<IPlugin>(); - - /** - * This list contains all plugins to view/edit messages to the server. - */ + + /** This list contains all plugins to view/edit messages to the server. */ private List<IPlugin> myActivePluginsServer = new Vector<IPlugin>(); - /** - * This list contains all plugins to view/edit messages to the client. - */ + /** This list contains all plugins to view/edit messages to the client. */ private List<IPlugin> myActivePluginsClient = new Vector<IPlugin>(); /** @@ -132,7 +121,7 @@ if (plugin != null) { myPluginVector.add(plugin); - // TODO: only add plugin if specified for client/server side + // INFO: only add plugin if specified for client/server side // INFO: alternative Direction could be specified here by PluginType!? plugin = (IPlugin) c.newInstance(); plugin.init(IPlugin.Direction.CLIENT); @@ -205,6 +194,11 @@ } } + /** + * TODO: wues_ha: Enter comment! + * + * @return AMessage + */ public AMessage getEditedMessageClient() { AMessage buffer = null; for (Iterator<IPlugin> iterator = myActivePluginsClient.iterator(); iterator.hasNext();) { Modified: trunk/DAVInspector/src/de/dlr/davinspector/plugins/headerplugin/HeaderPlugin.java =================================================================== --- trunk/DAVInspector/src/de/dlr/davinspector/plugins/headerplugin/HeaderPlugin.java 2008-03-19 13:05:53 UTC (rev 91) +++ trunk/DAVInspector/src/de/dlr/davinspector/plugins/headerplugin/HeaderPlugin.java 2008-03-19 17:42:10 UTC (rev 92) @@ -42,14 +42,10 @@ */ public class HeaderPlugin implements IEditPlugin { - /** - * State of the plugin. - */ + /** State of the plugin. */ private Boolean isActive = true; - /** - * The text pane. - */ + /** The text pane. */ private JTextPane myJTextPane = null; /** Modified: trunk/DAVInspector/src/de/dlr/davinspector/plugins/recordingplugin/RecordingConfigurationPanel.java =================================================================== --- trunk/DAVInspector/src/de/dlr/davinspector/plugins/recordingplugin/RecordingConfigurationPanel.java 2008-03-19 13:05:53 UTC (rev 91) +++ trunk/DAVInspector/src/de/dlr/davinspector/plugins/recordingplugin/RecordingConfigurationPanel.java 2008-03-19 17:42:10 UTC (rev 92) @@ -42,45 +42,32 @@ /** * This class is the UI for the RecordingPlugin. - * TODO: constant def, complete comments. * * @version $LastChangedRevision$ * @author Jochen Wuest */ public class RecordingConfigurationPanel extends JPanel { - /** - * - */ + /** Serial Version UID, not valid. */ private static final long serialVersionUID = 1L; - /** - * - */ + /** This button opens the file chooser dialog. */ private JButton jButtonOpenFileChooser; - /** - * - */ + /** The label for the file name field. */ private JLabel jLabelFilename; - /** - * - */ + /** The file name field. */ private JTextField jTextFieldFilename; - /** - * The filename. - */ + /** The filename. */ private String myFilename = ""; - /** - * The RecordingPlugin. - */ + /** The RecordingPlugin. */ private RecordingPlugin myParent; - /** - * Constructor. + /** + * Constructor of RecordingConfigurationPanel. * * @param plugin Reference to the plugin object. */ @@ -98,7 +85,7 @@ * @return String */ public String getFilename() { - if (myFilename.equals("")) { + if (myFilename.isEmpty()) { return getDefaultFileName(); } else { return myFilename; @@ -106,21 +93,22 @@ } /** - * TODO: HJW: Enter comment! + * This method opens a file chooser dialog and evaluates the result. + * If a valid file is chosen, the local variable <code>myFilename</code> is updated and + * the method <code>setRecordingFile()</code> of the RecordingPlugin is called. * - * @param evt - * Event + * @param event Event */ - private void jButtonOpenFileChooserActionPerformed(java.awt.event.ActionEvent evt) { + private void jButtonOpenFileChooserActionPerformed(java.awt.event.ActionEvent event) { JFileChooser fileChooser = new JFileChooser(); fileChooser.setDialogType(JFileChooser.SAVE_DIALOG); fileChooser.setDialogTitle("Select recording file"); fileChooser.setSelectedFile(new File(myFilename)); fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY); - int returnVal = fileChooser.showOpenDialog(null); + int returnValue = fileChooser.showOpenDialog(null); - if (returnVal == JFileChooser.APPROVE_OPTION) { + if (returnValue == JFileChooser.APPROVE_OPTION) { File file = fileChooser.getSelectedFile(); myFilename = file.getAbsolutePath(); myParent.setRecordingFile(file); @@ -146,8 +134,7 @@ } /** - * TODO: HJW: Enter comment! - * + * This method initializes the graphical elements of the plugin. */ private void initComponents() { jTextFieldFilename = new JTextField(); Modified: trunk/DAVInspector/src/de/dlr/davinspector/plugins/recordingplugin/RecordingPlugin.java =================================================================== --- trunk/DAVInspector/src/de/dlr/davinspector/plugins/recordingplugin/RecordingPlugin.java 2008-03-19 13:05:53 UTC (rev 91) +++ trunk/DAVInspector/src/de/dlr/davinspector/plugins/recordingplugin/RecordingPlugin.java 2008-03-19 17:42:10 UTC (rev 92) @@ -46,29 +46,19 @@ */ public class RecordingPlugin implements IViewPlugin { - /** - * State of the plugin. - */ + /** State of the plugin. */ private Boolean isActive = true; - /** - * The UI of the RecordingPlugin. - */ + /** The UI of the RecordingPlugin. */ private RecordingConfigurationPanel myPanel = null; - /** - * The filename of the file to which the data is written. - */ + /** The filename of the file to which the data is written. */ private String myFilename; - /** - * The BufferedWriter for writing the data to the file. - */ + /** The BufferedWriter for writing the data to the file. */ private BufferedWriter myBufferedWriter = null; - /** - * This saves the side assigned to the current plugin object. - */ + /** This saves the side assigned to the current plugin object. */ private Direction myDirection; /** @@ -203,7 +193,6 @@ /** * This method opens the file <code>myFilename</code> and * initializes the <code>BufferedWriter</code>. - * */ private void openBufferedWriter() { if (myBufferedWriter == null) { Modified: trunk/DAVInspector/src/de/dlr/davinspector/plugins/xmlplugin/JTextPaneContentHandler.java =================================================================== --- trunk/DAVInspector/src/de/dlr/davinspector/plugins/xmlplugin/JTextPaneContentHandler.java 2008-03-19 13:05:53 UTC (rev 91) +++ trunk/DAVInspector/src/de/dlr/davinspector/plugins/xmlplugin/JTextPaneContentHandler.java 2008-03-19 17:42:10 UTC (rev 92) @@ -52,69 +52,43 @@ */ public class JTextPaneContentHandler implements ContentHandler { - /** - * Character/s for newline. - */ + /** Character/s for newline. */ private static final String NEWLINE = "\r\n"; - /** - * Character/s for indent. - */ + /** Character/s for indent. */ private static final String INDENT = " "; - /** - * - */ + /** Foreground color definition for XML tags. */ private static final Color STYLE_XML_TAG = Color.BLUE; - /** - * - */ + /** Foreground color definition for content between XML tags. */ private static final Color STYLE_XML_CONTENT = Color.BLACK; - /** - * - */ + /** Foreground color definition for XML definition. */ private static final Color STYLE_XML_DEF = Color.LIGHT_GRAY; - /** - * Store URI to prefix mappings. - */ + /** Store URI to prefix mappings. */ private Map<String, String> namespaceMappings; - /** - * The document. - */ + /** The document. */ private StyledDocument myStyledDocument; - /** - * The attributes of the document. - */ + /** The attributes of the document. */ private AttributeSet myAttributeSet; - /** - * This stores the current nesting level. - */ + /** This stores the current nesting level. */ private int myLevel; - /** - * String buffer for the character data. - */ + /** String buffer for the character data. */ private String myBufferCharacterData; - /** - * String buffer for the end tag. - */ + /** String buffer for the end tag. */ private String myBufferEndTag; - /** - * String buffer for the start tag. - */ + /** String buffer for the start tag. */ private String myBufferStartTag; - /** - * This text area displays errors. - */ + /** This text area displays errors. */ private JTextArea myJTextAreaError; /** Modified: trunk/DAVInspector/src/de/dlr/davinspector/plugins/xmlplugin/XMLPlugin.java =================================================================== --- trunk/DAVInspector/src/de/dlr/davinspector/plugins/xmlplugin/XMLPlugin.java 2008-03-19 13:05:53 UTC (rev 91) +++ trunk/DAVInspector/src/de/dlr/davinspector/plugins/xmlplugin/XMLPlugin.java 2008-03-19 17:42:10 UTC (rev 92) @@ -47,29 +47,19 @@ */ public class XMLPlugin implements IViewPlugin { - /** - * - */ + /** */ private static final double SPLITTER_POSITION = 0.8; - /** - * State of the plugin. - */ + /** State of the plugin. */ private Boolean isActive = true; - /** - * The GUI object. - */ + /** The GUI object. */ private JSplitPane jSplitPane; - /** - * This text pane displays the formated XML. - */ + /** This text pane displays the formated XML. */ private XMLTextPane myXMLTextPane; - /** - * This text area displays XML errors. - */ + /** This text area displays XML errors. */ private JTextArea jTextArea; /** Modified: trunk/DAVInspector/src/de/dlr/davinspector/plugins/xmlplugin/XMLTextPane.java =================================================================== --- trunk/DAVInspector/src/de/dlr/davinspector/plugins/xmlplugin/XMLTextPane.java 2008-03-19 13:05:53 UTC (rev 91) +++ trunk/DAVInspector/src/de/dlr/davinspector/plugins/xmlplugin/XMLTextPane.java 2008-03-19 17:42:10 UTC (rev 92) @@ -48,23 +48,17 @@ */ public class XMLTextPane extends JTextPane { - /** - * - */ - static final long serialVersionUID = 0; + /** Serial Version UID, not valid. */ + static final long serialVersionUID = 0L; - /** - * The document. - */ + /** The document. */ private StyledDocument myDocument; /** * Constructor, empty. */ - public XMLTextPane() { + public XMLTextPane() { } - } - /** * To achieve no word wrap. * {@inheritDoc} Modified: trunk/DAVInspector/src/de/dlr/davinspector/plugins/xmltreeplugin/JTreeContentHandler.java =================================================================== --- trunk/DAVInspector/src/de/dlr/davinspector/plugins/xmltreeplugin/JTreeContentHandler.java 2008-03-19 13:05:53 UTC (rev 91) +++ trunk/DAVInspector/src/de/dlr/davinspector/plugins/xmltreeplugin/JTreeContentHandler.java 2008-03-19 17:42:10 UTC (rev 92) @@ -47,19 +47,13 @@ */ class JTreeContentHandler implements ContentHandler { - /** - * - */ + /** */ private static final String APOSTROPHE = "'"; - /** - * Store URI to prefix mappings. - */ + /** Store URI to prefix mappings. */ private Map<String, String> namespaceMappings; - /** - * Current node to add sub-nodes to. - */ + /** Current node to add sub-nodes to. */ private DefaultMutableTreeNode current; /** Modified: trunk/DAVInspector/src/de/dlr/davinspector/plugins/xmltreeplugin/XMLTreePlugin.java =================================================================== --- trunk/DAVInspector/src/de/dlr/davinspector/plugins/xmltreeplugin/XMLTreePlugin.java 2008-03-19 13:05:53 UTC (rev 91) +++ trunk/DAVInspector/src/de/dlr/davinspector/plugins/xmltreeplugin/XMLTreePlugin.java 2008-03-19 17:42:10 UTC (rev 92) @@ -47,29 +47,19 @@ */ public class XMLTreePlugin implements IViewPlugin { - /** - * - */ + /** */ private static final double SPLITTER_POSITION = 0.8; - /** - * State of the plugin. - */ + /** State of the plugin. */ private Boolean isActive = true; - /** - * The GUI object. - */ + /** The GUI object. */ private JSplitPane jSplitPane; - /** - * This text area displays XML errors. - */ + /** This text area displays XML errors. */ private JTextArea jTextArea; - /** - * The XMLTree component. - */ + /** The XMLTree component. */ private XMLTreeView myXMLTreeView; /** Modified: trunk/DAVInspector/src/de/dlr/davinspector/plugins/xmltreeplugin/XMLTreeView.java =================================================================== --- trunk/DAVInspector/src/de/dlr/davinspector/plugins/xmltreeplugin/XMLTreeView.java 2008-03-19 13:05:53 UTC (rev 91) +++ trunk/DAVInspector/src/de/dlr/davinspector/plugins/xmltreeplugin/XMLTreeView.java 2008-03-19 17:42:10 UTC (rev 92) @@ -47,23 +47,17 @@ */ public class XMLTreeView extends JTree { - /** - * - */ - static final long serialVersionUID = 0; + /** Serial Version UID, not valid. */ + static final long serialVersionUID = 0L; - /** - * Data model for the tree. - */ + /** Data model for the tree. */ private DefaultTreeModel myDefaultTreeModel; /** * Constructor, empty. */ - public XMLTreeView() { + public XMLTreeView() { } - } - /** * This method initializes the tree and the tree data model. * Afterwards <code>buildTree</code> is called. Modified: trunk/DAVInspector/src/de/dlr/davinspector/relay/ChannelThread.java =================================================================== --- trunk/DAVInspector/src/de/dlr/davinspector/relay/ChannelThread.java 2008-03-19 13:05:53 UTC (rev 91) +++ trunk/DAVInspector/src/de/dlr/davinspector/relay/ChannelThread.java 2008-03-19 17:42:10 UTC (rev 92) @@ -44,58 +44,38 @@ */ public class ChannelThread extends Thread { - /** - * - */ + /** */ public static final String COLON = ": "; - /** - * - */ + /** */ private Socket myInputSocket; - /** - * - */ + /** */ private Socket myOutputSocket; - /** - * - */ + /** */ private boolean myDone = false; - /** - * - */ + /** */ private ChannelThread myPeer; - /** - * - */ + /** */ private boolean myDirection; - /** - * The logger. - */ + /** The logger. */ private Logger myLogger; - /** - * - */ + /** */ private String myThreadName = ""; - /** - * - */ + /** */ private IRelayModel myRelay = null; - /** - * - */ + /** */ private List<ChannelThread> myConnections; /** - * Constructor. + * Constructor of a ChannelThread. * * @param inputSocket Socket input socket * @param outputSocket Socket output socket Modified: trunk/DAVInspector/src/de/dlr/davinspector/relay/DataEvent.java =================================================================== --- trunk/DAVInspector/src/de/dlr/davinspector/relay/DataEvent.java 2008-03-19 13:05:53 UTC (rev 91) +++ trunk/DAVInspector/src/de/dlr/davinspector/relay/DataEvent.java 2008-03-19 17:42:10 UTC (rev 92) @@ -36,14 +36,10 @@ */ public class DataEvent extends EventObject { - /** - * - */ + /** Serial Version UID, not valid. */ private static final long serialVersionUID = 1L; - /** - * The data. - */ + /** The data. */ private String myData; /** @@ -65,5 +61,4 @@ public String getData() { return myData; } - } Modified: trunk/DAVInspector/src/de/dlr/davinspector/relay/IRelayModel.java =================================================================== --- trunk/DAVInspector/src/de/dlr/davinspector/relay/IRelayModel.java 2008-03-19 13:05:53 UTC (rev 91) +++ trunk/DAVInspector/src/de/dlr/davinspector/relay/IRelayModel.java 2008-03-19 17:42:10 UTC (rev 92) @@ -39,6 +39,7 @@ * @author Jochen Wuest */ public interface IRelayModel { + /** * This method starts the relay with the given configuration. * Modified: trunk/DAVInspector/src/de/dlr/davinspector/relay/RelayModel.java =================================================================== --- trunk/DAVInspector/src/de/dlr/davinspector/relay/RelayModel.java 2008-03-19 13:05:53 UTC (rev 91) +++ trunk/DAVInspector/src/de/dlr/davinspector/relay/RelayModel.java 2008-03-19 17:42:10 UTC (rev 92) @@ -50,69 +50,48 @@ * Implementation of the relay interface. Provides the server socket * and manages the channel threads. * FIXME: stopping of the relay and freeing of the server socket. + * TODO:No appenders could be found for logger (de.dlr.davinspector.relay.RelayModel). * * @version $LastChangedRevision$ * @author Jochen Wuest */ public class RelayModel extends Thread implements IRelayModel { - /** - * Logger, Apache log4j. - */ + /** Logger, Apache log4j. */ private static Logger myLogger = Logger.getLogger(RelayModel.class); - /** - * List of listeners for new client data. - */ + /** List of listeners for new client data. */ private EventListenerList myClientListeners = new EventListenerList(); - /** - * List of listeners for server data. - */ + /** List of listeners for server data. */ private EventListenerList myServerListeners = new EventListenerList(); - /** - * Address to forward connections to. - */ + /** Address to forward connections to. */ private InetAddress myDestinationAddress; - /** - * Port to forward connections to. - */ + /** Port to forward connections to. */ private int myDestinationPort; - /** - * This proxy's server socket. - */ + /** This proxy's server socket. */ private ServerSocket serverSocket; - /** - * Plugin manager. - */ + /** The plugin manager. */ private PluginManager myPluginManager = null; - /** - * The lock object is used for synchronizing the ChannelThreads. - */ + /** The lock object is used for synchronizing the ChannelThreads. */ private Object lock = new Object(); - /** - * Contains all current connections (ChannelThreads). - */ + /** Contains all current connections (ChannelThreads). */ private List<ChannelThread> connections = new Vector<ChannelThread>(); - /** - * The message history object. - */ + /** The message history object. */ private MessageHistory myMessageHistory = null; - /** - * State of the automode. - */ + /** State of the automode. */ private Boolean myStateAutomode = false; /** - * Constructor of RelayModel. + * Constructor of a RelayModel. * The constructor creates a new {@link MessageHistory} object. */ public RelayModel() { Modified: trunk/DAVInspector/src/de/dlr/davinspector/relay/package.html =================================================================== --- trunk/DAVInspector/src/de/dlr/davinspector/relay/package.html 2008-03-19 13:05:53 UTC (rev 91) +++ trunk/DAVInspector/src/de/dlr/davinspector/relay/package.html 2008-03-19 17:42:10 UTC (rev 92) @@ -1,12 +1,6 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> -<html><head><title>BLUB B</title></head><body> - -BLUB B - -<h2>Package Specification</h2> - -BLUB B - +<html><head><title>Relay package</title></head><body> +This package contains all classes to handle the network traffic. </body></html> \ No newline at end of file Modified: trunk/DAVInspector/src/de/dlr/davinspector/ui/AboutDialog.java =================================================================== --- trunk/DAVInspector/src/de/dlr/davinspector/ui/AboutDialog.java 2008-03-19 13:05:53 UTC (rev 91) +++ trunk/DAVInspector/src/de/dlr/davinspector/ui/AboutDialog.java 2008-03-19 17:42:10 UTC (rev 92) @@ -39,6 +39,7 @@ import javax.swing.JTextPane; import de.dlr.davinspector.common.Constant; +import de.dlr.davinspector.common.Internationalization; import de.dlr.davinspector.common.Util; /** @@ -49,47 +50,33 @@ */ public class AboutDialog extends JDialog { - /** - * - */ + /** Serial Version UID, not valid. */ private static final long serialVersionUID = 1L; - /** - * - */ + /** */ private static final int FONT_SIZE_... [truncated message content] |