[Cherbot-commit] SF.net SVN: cherbot: [111] trunk/src/net/sf/cherbot
Status: Alpha
Brought to you by:
christianhujer
|
From: <chr...@us...> - 2007-06-30 20:13:00
|
Revision: 111
http://svn.sourceforge.net/cherbot/?rev=111&view=rev
Author: christianhujer
Date: 2007-06-30 13:12:40 -0700 (Sat, 30 Jun 2007)
Log Message:
-----------
Encapsulated fields.
Modified Paths:
--------------
trunk/src/net/sf/cherbot/AbstractCFConnection.java
trunk/src/net/sf/cherbot/CrossfireConnection.java
trunk/src/net/sf/cherbot/DaimoninConnection.java
Modified: trunk/src/net/sf/cherbot/AbstractCFConnection.java
===================================================================
--- trunk/src/net/sf/cherbot/AbstractCFConnection.java 2007-06-30 19:48:13 UTC (rev 110)
+++ trunk/src/net/sf/cherbot/AbstractCFConnection.java 2007-06-30 20:12:40 UTC (rev 111)
@@ -24,16 +24,16 @@
public abstract class AbstractCFConnection extends AbstractConnection {
/** The username to authenticate with. */
- @NotNull protected String username;
+ @NotNull private String username;
/** The password to authenticate with. */
- @NotNull protected String password;
+ @NotNull private String password;
/** The PrintStream to write to. */
- @Nullable protected OutputStream out;
+ @Nullable private OutputStream out;
/** The BufferedReader to read from. */
- @Nullable protected InputStream in;
+ @Nullable private InputStream in;
/** Creates an AbstractCFConnection. */
protected AbstractCFConnection() {
@@ -123,4 +123,19 @@
super.setHost(host);
}
+ @NotNull public String getUsername() {
+ return username;
+ }
+
+ @NotNull public String getPassword() {
+ return password;
+ }
+
+ @Nullable protected OutputStream getOut() {
+ return out;
+ }
+
+ @Nullable protected InputStream getIn() {
+ return in;
+ }
} // class AbstractCFConnection
Modified: trunk/src/net/sf/cherbot/CrossfireConnection.java
===================================================================
--- trunk/src/net/sf/cherbot/CrossfireConnection.java 2007-06-30 19:48:13 UTC (rev 110)
+++ trunk/src/net/sf/cherbot/CrossfireConnection.java 2007-06-30 20:12:40 UTC (rev 111)
@@ -47,9 +47,9 @@
readToNull();
textMsg("addme");
readToNull();
- textMsg("reply " + username);
+ textMsg("reply " + getUsername());
readToNull();
- textMsg("reply " + password);
+ textMsg("reply " + getPassword());
return socket;
}
Modified: trunk/src/net/sf/cherbot/DaimoninConnection.java
===================================================================
--- trunk/src/net/sf/cherbot/DaimoninConnection.java 2007-06-30 19:48:13 UTC (rev 110)
+++ trunk/src/net/sf/cherbot/DaimoninConnection.java 2007-06-30 20:12:40 UTC (rev 111)
@@ -47,9 +47,9 @@
textMsg("addme");
readToNull(); // 0x00 0x06 0x18 "4 QNO"
readToNull(); // 0x00 0x01 0x15
- textMsg("reply L" + username);
+ textMsg("reply L" + getUsername());
readToNull(); // 0x00 0x06 0x18 "4 QP0"
- textMsg("reply " + password);
+ textMsg("reply " + getPassword());
return socket;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|