summaryrefslogtreecommitdiff
path: root/src/Client
diff options
context:
space:
mode:
Diffstat (limited to 'src/Client')
-rw-r--r--src/Client/ChatClient.java7
-rw-r--r--src/Client/ChatClientReader.java7
-rw-r--r--src/Client/ChatClientWriter.java10
-rw-r--r--src/Client/ParsedLine.java6
-rw-r--r--src/Client/UserInterface.java6
5 files changed, 20 insertions, 16 deletions
diff --git a/src/Client/ChatClient.java b/src/Client/ChatClient.java
index 283e983..7872c94 100644
--- a/src/Client/ChatClient.java
+++ b/src/Client/ChatClient.java
@@ -67,7 +67,7 @@ public class ChatClient
}
/** if the line is special command privmsg will handle it, else it will send the line as a privmsg.
- * @param the line.*/
+ * @param line the line.*/
public void PRIVMSG (String line)
{
String[] words = line.split("[ \t]", 2);
@@ -123,9 +123,8 @@ public class ChatClient
}
/** opening new connection
- * @param
- * host name.
- * port name. */
+ * @param host name.
+ * @param port name. */
public boolean connect (String host, int port)
{
try
diff --git a/src/Client/ChatClientReader.java b/src/Client/ChatClientReader.java
index c5a279a..bc0645c 100644
--- a/src/Client/ChatClientReader.java
+++ b/src/Client/ChatClientReader.java
@@ -8,8 +8,11 @@ public class ChatClientReader extends Thread
private Socket soc;
private UserInterface ui;
- /** constructor
- * @param the socket */
+ /** constructor
+ * @param client the chat client instance
+ * @param soc the socket
+ * @param ui the user interface
+ */
public ChatClientReader (ChatClient client, Socket soc, UserInterface ui)
{
this.client = client;
diff --git a/src/Client/ChatClientWriter.java b/src/Client/ChatClientWriter.java
index 9d89cea..91a1d99 100644
--- a/src/Client/ChatClientWriter.java
+++ b/src/Client/ChatClientWriter.java
@@ -14,16 +14,18 @@ public class ChatClientWriter extends Thread
public static Scanner reader = new Scanner(System.in);
/** constructor
- * @param the socket and the client info */
+ * @param soc - the socket
+ * @param client - the CLient info */
+
public ChatClientWriter(Socket soc ,ChatClient client)
{
this.soc = soc;
this.client = client;
this.queue = new LinkedBlockingQueue<String>();
}
-
+
/** add message to queue.
- * @param message */
+ * @param line which is the message */
public void sendLine (String line)
{
try
@@ -37,7 +39,7 @@ public class ChatClientWriter extends Thread
}
/** writing the line and making sure the package will be pushed on the stream
- * @param the line and the client info */
+ * @param line and the client info */
public void println(String line)
{
try
diff --git a/src/Client/ParsedLine.java b/src/Client/ParsedLine.java
index ebc45b1..972a9b2 100644
--- a/src/Client/ParsedLine.java
+++ b/src/Client/ParsedLine.java
@@ -8,13 +8,13 @@ public class ParsedLine
private Hashtable <String, String> dict;
/** constructor, returning dictionary.
- * @param text line
+ * @param line which is the text
* for example input: ":sweetmorn.cohens.org.il 352 tzafrir #chat-dor ~tzafrir localhost"
* output: a dictionary with the following entries:
* - server: sweetmorn.cohens.org.il
* - command: 352
* - nick: tzafrir
- * - message: #chat-dor ~tzafrir localhost
+ * - message: "#chat-dor ~tzafrir localhost"
*/
public ParsedLine(String line)
{
@@ -79,7 +79,7 @@ public class ParsedLine
}
/** getting the results from the dictionary
- @param property */
+ @param property the key to look for in the parsed request */
public String get(String property)
{
return dict.get(property);
diff --git a/src/Client/UserInterface.java b/src/Client/UserInterface.java
index df56ec3..984ecb6 100644
--- a/src/Client/UserInterface.java
+++ b/src/Client/UserInterface.java
@@ -138,7 +138,7 @@ public class UserInterface extends JFrame implements ActionListener, KeyListener
int counterClick = 0;
/** Syncing the the action that the button send to the perform
- * @param name of the action */
+ * @param e -name of the action */
public void actionPerformed(ActionEvent e)
{
String command = e.getActionCommand();
@@ -164,7 +164,7 @@ public class UserInterface extends JFrame implements ActionListener, KeyListener
}
/** Syncing the the action that the event caused to the perform
- * @param event key press */
+ * @param e - event key press */
@Override
public void keyPressed(KeyEvent e)
{
@@ -190,7 +190,7 @@ public class UserInterface extends JFrame implements ActionListener, KeyListener
}
/** Syncing the the action closing window to the shutdown
- * @param event window closing */
+ * @param e - event window closing */
public void windowClosing(WindowEvent e)
{
client.shutdown();