You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by ve...@apache.org on 2009/01/03 12:26:59 UTC
svn commit: r730974 - in
/webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon:
Listener.java eclipse/ui/Listener.java
Author: veithen
Date: Sat Jan 3 03:26:59 2009
New Revision: 730974
URL: http://svn.apache.org/viewvc?rev=730974&view=rev
Log:
Removed unused attributes and reduced the visibility of the others.
Modified:
webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/Listener.java
webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/eclipse/ui/Listener.java
Modified: webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/Listener.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/Listener.java?rev=730974&r1=730973&r2=730974&view=diff
==============================================================================
--- webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/Listener.java (original)
+++ webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/Listener.java Sat Jan 3 03:26:59 2009
@@ -49,8 +49,6 @@
import java.io.File;
import java.io.FileOutputStream;
import java.io.InputStream;
-import java.net.ServerSocket;
-import java.net.Socket;
import java.util.Iterator;
import java.util.Vector;
@@ -58,41 +56,30 @@
* this is one of the tabbed panels that acts as the actual proxy
*/
class Listener extends JPanel {
-
- /**
- * Field inputSocket
- */
- public Socket inputSocket = null;
-
- /**
- * Field outputSocket
- */
- public Socket outputSocket = null;
-
/**
* Field portField
*/
- public JTextField portField = null;
+ private JTextField portField = null;
/**
* Field hostField
*/
- public JTextField hostField = null;
+ private JTextField hostField = null;
/**
* Field tPortField
*/
- public JTextField tPortField = null;
+ private JTextField tPortField = null;
/**
* Field isProxyBox
*/
- public JCheckBox isProxyBox = null;
+ private JCheckBox isProxyBox = null;
/**
* Field stopButton
*/
- public JButton stopButton = null;
+ private JButton stopButton = null;
/**
* Field removeButton
@@ -107,7 +94,7 @@
/**
* Field xmlFormatBox
*/
- public JCheckBox xmlFormatBox = null;
+ private JCheckBox xmlFormatBox = null;
/**
* Field saveButton
@@ -120,16 +107,6 @@
public JButton resendButton = null;
/**
- * Field switchButton
- */
- public JButton switchButton = null;
-
- /**
- * Field closeButton
- */
- public JButton closeButton = null;
-
- /**
* Field connectionTable
*/
public JTable connectionTable = null;
@@ -145,29 +122,24 @@
public JSplitPane outPane = null;
/**
- * Field sSocket
- */
- public ServerSocket sSocket = null;
-
- /**
* Field sw
*/
- public SocketWaiter sw = null;
+ private SocketWaiter sw = null;
/**
* Field leftPanel
*/
- public JPanel leftPanel = null;
+ private JPanel leftPanel = null;
/**
* Field rightPanel
*/
- public JPanel rightPanel = null;
+ private JPanel rightPanel = null;
/**
* Field notebook
*/
- public JTabbedPane notebook = null;
+ private JTabbedPane notebook = null;
/**
* Field HTTPProxyHost
@@ -180,16 +152,6 @@
public int HTTPProxyPort = 80;
/**
- * Field delayBytes
- */
- public int delayBytes = 0;
-
- /**
- * Field delayTime
- */
- public int delayTime = 0;
-
- /**
* Field slowLink
*/
public SlowLinkSimulator slowLink;
@@ -428,10 +390,12 @@
bottomButtons.add(resendButton = new JButton(resend));
bottomButtons.add(Box.createRigidArea(new Dimension(5, 0)));
final String switchStr = TCPMonBundle.getMessage("switch00", "Switch Layout");
- bottomButtons.add(switchButton = new JButton(switchStr));
+ JButton switchButton = new JButton(switchStr);
+ bottomButtons.add(switchButton);
bottomButtons.add(Box.createHorizontalGlue());
final String close = TCPMonBundle.getMessage("close00", "Close");
- bottomButtons.add(closeButton = new JButton(close));
+ JButton closeButton = new JButton(close);
+ bottomButtons.add(closeButton);
pane2.add(bottomButtons, BorderLayout.SOUTH);
saveButton.setEnabled(false);
saveButton.addActionListener(new ActionListener() {
Modified: webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/eclipse/ui/Listener.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/eclipse/ui/Listener.java?rev=730974&r1=730973&r2=730974&view=diff
==============================================================================
--- webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/eclipse/ui/Listener.java (original)
+++ webservices/commons/trunk/modules/tcpmon/src/org/apache/ws/commons/tcpmon/eclipse/ui/Listener.java Sat Jan 3 03:26:59 2009
@@ -28,8 +28,6 @@
import java.io.File;
import java.io.FileOutputStream;
import java.io.InputStream;
-import java.net.ServerSocket;
-import java.net.Socket;
import java.util.Iterator;
import java.util.Vector;
@@ -38,40 +36,32 @@
*
*/
class Listener {
- public Socket inputSocket = null;
- public Socket outputSocket = null;
- public ServerSocket sSocket = null;
-
- public Composite leftPanel = null;
- public Composite rightPanel = null;
- public Composite textComposite = null;
- public Text portField = null;
- public Text hostField = null;
- public Text tPortField = null;
- public Button isProxyBox = null;
- public Button stopButton = null;
+ private Composite leftPanel = null;
+ private Composite rightPanel = null;
+ private Composite textComposite = null;
+ private Text portField = null;
+ private Text hostField = null;
+ private Text tPortField = null;
+ private Button isProxyBox = null;
+ private Button stopButton = null;
public Button removeButton = null;
public Button removeAllButton = null;
- public Button xmlFormatBox = null;
+ private Button xmlFormatBox = null;
public Button saveButton = null;
public Button resendButton = null;
- public Button switchButton = null;
- public Button closeButton = null;
public Table connectionTable = null;
public TableEnhancer tableEnhancer = null;
private TabFolder tabFolder;
private TabItem portTabItem;
- public SocketWaiter sw = null;
- public SlowLinkSimulator slowLink;
+ private SocketWaiter sw = null;
+ private SlowLinkSimulator slowLink;
public final Vector connections = new Vector();
public String HTTPProxyHost = null;
public int HTTPProxyPort = 80;
- public int delayBytes = 0;
- public int delayTime = 0;
public Listener(TabFolder tabFolder, String name, int listenPort,
String host, int targetPort, boolean isProxy,
@@ -295,7 +285,7 @@
}
});
- switchButton = new Button(buttonComposite2, SWT.NONE);
+ Button switchButton = new Button(buttonComposite2, SWT.NONE);
rd = new RowData();
rd.width = 100;
switchButton.setLayoutData(rd);
@@ -324,7 +314,7 @@
gd.widthHint = 27;
buttonComposite3.setLayoutData(gd);
- closeButton = new Button(buttonComposite3, SWT.None);
+ Button closeButton = new Button(buttonComposite3, SWT.None);
rd = new RowData();
rd.width = 60;
closeButton.setLayoutData(rd);