cherbot-commit Mailing List for CherBot
Status: Alpha
Brought to you by:
christianhujer
You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(39) |
Nov
(1) |
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
|
Feb
(4) |
Mar
|
Apr
|
May
|
Jun
(67) |
Jul
(6) |
Aug
|
Sep
(2) |
Oct
(1) |
Nov
|
Dec
|
| 2008 |
Jan
(3) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(6) |
Dec
(19) |
| 2009 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <chr...@us...> - 2009-02-17 20:18:26
|
Revision: 149
http://cherbot.svn.sourceforge.net/cherbot/?rev=149&view=rev
Author: christianhujer
Date: 2009-02-17 20:18:19 +0000 (Tue, 17 Feb 2009)
Log Message:
-----------
Improved documentation, implemented KICK and NOTICE irc commands.
Modified Paths:
--------------
trunk/src/prj/net/sf/cherbot/connection/IRCConnection.java
Added Paths:
-----------
trunk/src/prj/net/sf/cherbot/CommandDispatcher.java
trunk/src/prj/net/sf/cherbot/ui/
trunk/src/prj/net/sf/cherbot/ui/package-info.java
Added: trunk/src/prj/net/sf/cherbot/CommandDispatcher.java
===================================================================
--- trunk/src/prj/net/sf/cherbot/CommandDispatcher.java (rev 0)
+++ trunk/src/prj/net/sf/cherbot/CommandDispatcher.java 2009-02-17 20:18:19 UTC (rev 149)
@@ -0,0 +1,16 @@
+package net.sf.cherbot;
+
+import net.sf.cherbot.connection.Channel;
+import org.jetbrains.annotations.NotNull;
+
+/** An implementation of this interface is capable of dispatching commands.
+ * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
+ */
+public interface CommandDispatcher {
+
+ /** Dispatch a command.
+ * @param command Command to dispatch.
+ * @param channel Channel from which this command is received.
+ */
+ void dispatch(@NotNull String command, @NotNull Channel channel);
+}
Property changes on: trunk/src/prj/net/sf/cherbot/CommandDispatcher.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ LF
Modified: trunk/src/prj/net/sf/cherbot/connection/IRCConnection.java
===================================================================
--- trunk/src/prj/net/sf/cherbot/connection/IRCConnection.java 2008-12-15 01:09:25 UTC (rev 148)
+++ trunk/src/prj/net/sf/cherbot/connection/IRCConnection.java 2009-02-17 20:18:19 UTC (rev 149)
@@ -23,8 +23,32 @@
import org.jetbrains.annotations.Nullable;
/** An IRCConnection represents a connection to an IRC server.
+ *
+ * Message BNF:
+ * <pre><![CDATA[
+ * message = [ ":" prefix SPACE ] command [ params ] crlf
+ * prefix = servername / ( nickname [ [ "!" user ] "@" host ] )
+ * command = 1*letter / 3digit
+ * params = *14( SPACE middle ) [ SPACE ":" trailing ]
+ * =/ 14( SPACE middle ) [ SPACE [ ":" ] trailing ]
+ * nospcrlfcl = %x01-09 / %x0B-0C / %x0E-1F / %x21-39 / %x3B-FF
+ * ; any octet except NUL, CR, LF, " " and ":"
+ * middle = nospcrlfcl *( ":" / nospcrlfcl )
+ * trailing = *( ":" / " " / nospcrlfcl )
+ * SPACE = %x20 ; space character
+ * crlf = %x0D %x0A ; "carriage return" "linefeed"
+ * ]]></pre>
+ *
+ * Message regex based on that BNF:
+ * <pre><![CDATA[
+ * message = (:$prefix )?$command$params
+ * prefix = ($servername|$nick((!$user)?(@$host))?)
+ * command = ([A-Za-z]+|\d\d\d)
+ * ]]></pre>
+ *
* @author <a href="mailto:ch...@ri...">Christian Hujer</a>
- * @see <a href="ftp://ftp.rfc-editor.org/in-notes/rfc2812.txt">RFC 2812: Internet Relay Chat: Client Protocol</a>
+ * @see <a href="http://www.ietf.org/rfc/rfc2812.txt">RFC 2812: Internet Relay Chat: Client Protocol</a>
+ * @see <a href="http://www.irchelp.org/irchelp/rfc/ctcpspec.html">The Client-To-Client Protocol (CTCP)</a> (Not yet supported by CherBot)
*/
public class IRCConnection extends AbstractNetworkConnection {
@@ -134,10 +158,11 @@
}
/** Processes an INVITE irc message.
- * @param actor Actor of this JOIN.
+ * @param actor Actor of this INVITE.
* @param actorIdentity Identity of the actor.
* @param target Target of the invitation.
* @param channel Channel to join.
+ * @see <a href="http://www.ietf.org/rfc/rfc2812.txt">RFC 2812: Internet Relay Chat: Client Protocol</a> 3.2.7 Invite message
*/
@Patterns({"^:([^!]+)!([^ ]+) INVITE ([^ ]+) :(.*)$"})
public void processINVITE(@NotNull final String actor, @NotNull final String actorIdentity, @NotNull final String target, @NotNull final String channel) {
@@ -149,6 +174,7 @@
* @param actor Actor of this JOIN.
* @param actorIdentity Identity of the actor.
* @param channel Channel to join.
+ * @see <a href="http://www.ietf.org/rfc/rfc2812.txt">RFC 2812: Internet Relay Chat: Client Protocol</a> 3.2.1 Join message
*/
@Patterns({"^:([^!]+)!([^ ]+) JOIN :(.*)$"})
public void processJOIN(@NotNull final String actor, @NotNull final String actorIdentity, @NotNull final String channel) {
@@ -156,12 +182,27 @@
// Nothing to do for a JOIN.
}
+ /** Process a KICK irc message.
+ * @param actor Actor of this MODE.
+ * @param actorIdentity Identity of the actor.
+ * @param channel Channel of the mode change.
+ * @param change Mode change.
+ * @param target Target of the mode change.
+ * @see <a href="http://www.ietf.org/rfc/rfc2812.txt">RFC 2812: Internet Relay Chat: Client Protocol</a> 3.2.8 Kick command
+ */
+ @Patterns({"^:([^!]+)!([^ ]+) KICK ([^ ]+) ([^ ]+) (.*?) ?$"})
+ public void processKICK(@NotNull final String actor, @NotNull final String actorIdentity, @NotNull final String channel, @NotNull final String change, @NotNull final String target) {
+ System.err.println("Kicked from " + channel + ": " + change + " on " + target + " by " + actor + " (" + actorIdentity + ")");
+ // Nothing to do for a KICK.
+ }
+
/** Process a MODE irc message.
* @param actor Actor of this MODE.
* @param actorIdentity Identity of the actor.
* @param channel Channel of the mode change.
* @param change Mode change.
* @param target Target of the mode change.
+ * @see <a href="http://www.ietf.org/rfc/rfc2812.txt">RFC 2812: Internet Relay Chat: Client Protocol</a> 3.2.3 Channel mode message
*/
@Patterns({"^:([^!]+)!([^ ]+) MODE ([^ ]+) ([^ ]+) (.*?) ?$"})
public void processMODE(@NotNull final String actor, @NotNull final String actorIdentity, @NotNull final String channel, @NotNull final String change, @NotNull final String target) {
@@ -169,6 +210,19 @@
// Nothing to do for a MODE.
}
+ /** Processes a NOTICE irc message.
+ * @param actor Actor of this message.
+ * @param actorIdentity Identity of the actor.
+ * @param channelName Name of the channel.
+ * @param message Message text.
+ * @see <a href="http://www.ietf.org/rfc/rfc2812.txt">RFC 2812: Internet Relay Chat: Client Protocol</a> 3.3.2 Notice
+ */
+ @Patterns({"^:([^!]+)!([^ ]+) NOTICE ([^ ]+) :(.*)$"})
+ public void processNOTICE(@NotNull final String actor, @NotNull final String actorIdentity, @NotNull final String channelName, @NotNull final String message) {
+ final Channel channel = getOrCreateChannel(channelName);
+ // TODO:cher:Process message.
+ }
+
/** Processes a PING irc message.
* @param server Server that requests a PONG.
*/
@@ -186,6 +240,7 @@
* @param actorIdentity Identity of the actor.
* @param channelName Name of the channel.
* @param message Message text.
+ * @see <a href="http://www.ietf.org/rfc/rfc2812.txt">RFC 2812: Internet Relay Chat: Client Protocol</a> 3.3.1 Private messages
*/
@Patterns({"^:([^!]+)!([^ ]+) PRIVMSG ([^ ]+) :(.*)$"})
public void processPRIVMSG(@NotNull final String actor, @NotNull final String actorIdentity, @NotNull final String channelName, @NotNull final String message) {
Added: trunk/src/prj/net/sf/cherbot/ui/package-info.java
===================================================================
--- trunk/src/prj/net/sf/cherbot/ui/package-info.java (rev 0)
+++ trunk/src/prj/net/sf/cherbot/ui/package-info.java 2009-02-17 20:18:19 UTC (rev 149)
@@ -0,0 +1,6 @@
+/** This package contains a graphical user interface for CherBot.
+ * It is useful for debugging.
+ * Of course CherBot also runs without GUI.
+ * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
+ */
+package net.sf.cherbot.ui;
Property changes on: trunk/src/prj/net/sf/cherbot/ui/package-info.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ LF
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2008-12-15 01:09:34
|
Revision: 148
http://cherbot.svn.sourceforge.net/cherbot/?rev=148&view=rev
Author: christianhujer
Date: 2008-12-15 01:09:25 +0000 (Mon, 15 Dec 2008)
Log Message:
-----------
Updated project file to IntelliJ IDEA 8.0.1.
Modified Paths:
--------------
trunk/cherbot.iml
trunk/cherbot.ipr
Modified: trunk/cherbot.iml
===================================================================
--- trunk/cherbot.iml 2008-12-15 01:02:58 UTC (rev 147)
+++ trunk/cherbot.iml 2008-12-15 01:09:25 UTC (rev 148)
@@ -38,7 +38,6 @@
<SOURCES />
</library>
</orderEntry>
- <orderEntryProperties />
</component>
<component name="copyright">
<Base>
Modified: trunk/cherbot.ipr
===================================================================
--- trunk/cherbot.ipr 2008-12-15 01:02:58 UTC (rev 147)
+++ trunk/cherbot.ipr 2008-12-15 01:09:25 UTC (rev 148)
@@ -43,6 +43,33 @@
<option name="METHOD_ANNOTATION_WRAP" value="1" />
<option name="CLASS_ANNOTATION_WRAP" value="1" />
<option name="FIELD_ANNOTATION_WRAP" value="1" />
+ <ADDITIONAL_INDENT_OPTIONS fileType="groovy">
+ <option name="INDENT_SIZE" value="2" />
+ <option name="CONTINUATION_INDENT_SIZE" value="8" />
+ <option name="TAB_SIZE" value="4" />
+ <option name="USE_TAB_CHARACTER" value="false" />
+ <option name="SMART_TABS" value="false" />
+ <option name="LABEL_INDENT_SIZE" value="0" />
+ <option name="LABEL_INDENT_ABSOLUTE" value="false" />
+ </ADDITIONAL_INDENT_OPTIONS>
+ <ADDITIONAL_INDENT_OPTIONS fileType="gsp">
+ <option name="INDENT_SIZE" value="2" />
+ <option name="CONTINUATION_INDENT_SIZE" value="8" />
+ <option name="TAB_SIZE" value="4" />
+ <option name="USE_TAB_CHARACTER" value="false" />
+ <option name="SMART_TABS" value="false" />
+ <option name="LABEL_INDENT_SIZE" value="0" />
+ <option name="LABEL_INDENT_ABSOLUTE" value="false" />
+ </ADDITIONAL_INDENT_OPTIONS>
+ <ADDITIONAL_INDENT_OPTIONS fileType="java">
+ <option name="INDENT_SIZE" value="4" />
+ <option name="CONTINUATION_INDENT_SIZE" value="8" />
+ <option name="TAB_SIZE" value="4" />
+ <option name="USE_TAB_CHARACTER" value="false" />
+ <option name="SMART_TABS" value="false" />
+ <option name="LABEL_INDENT_SIZE" value="0" />
+ <option name="LABEL_INDENT_ABSOLUTE" value="false" />
+ </ADDITIONAL_INDENT_OPTIONS>
<ADDITIONAL_INDENT_OPTIONS fileType="js">
<option name="INDENT_SIZE" value="4" />
<option name="CONTINUATION_INDENT_SIZE" value="8" />
@@ -52,6 +79,24 @@
<option name="LABEL_INDENT_SIZE" value="0" />
<option name="LABEL_INDENT_ABSOLUTE" value="false" />
</ADDITIONAL_INDENT_OPTIONS>
+ <ADDITIONAL_INDENT_OPTIONS fileType="jsp">
+ <option name="INDENT_SIZE" value="4" />
+ <option name="CONTINUATION_INDENT_SIZE" value="8" />
+ <option name="TAB_SIZE" value="4" />
+ <option name="USE_TAB_CHARACTER" value="false" />
+ <option name="SMART_TABS" value="false" />
+ <option name="LABEL_INDENT_SIZE" value="0" />
+ <option name="LABEL_INDENT_ABSOLUTE" value="false" />
+ </ADDITIONAL_INDENT_OPTIONS>
+ <ADDITIONAL_INDENT_OPTIONS fileType="xml">
+ <option name="INDENT_SIZE" value="4" />
+ <option name="CONTINUATION_INDENT_SIZE" value="8" />
+ <option name="TAB_SIZE" value="4" />
+ <option name="USE_TAB_CHARACTER" value="false" />
+ <option name="SMART_TABS" value="false" />
+ <option name="LABEL_INDENT_SIZE" value="0" />
+ <option name="LABEL_INDENT_ABSOLUTE" value="false" />
+ </ADDITIONAL_INDENT_OPTIONS>
</value>
</option>
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
@@ -106,6 +151,7 @@
<option name="ADDITIONAL_OPTIONS_STRING" value="" />
<option name="MAXIMUM_HEAP_SIZE" value="128" />
</component>
+ <component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" defaultCharsetForPropertiesFiles="UTF-8" />
<component name="EntryPointsManager">
<entry_points version="2.0" />
</component>
@@ -515,9 +561,7 @@
<inspection_tool class="EmptyClass" level="WARNING" enabled="true" />
<inspection_tool class="FinalMethodInFinalClass" level="WARNING" enabled="true" />
<inspection_tool class="MissingDeprecatedAnnotation" level="WARNING" enabled="true" />
- <inspection_tool class="MissingOverrideAnnotation" level="WARNING" enabled="true">
- <option name="useJdk6Rules" value="false" />
- </inspection_tool>
+ <inspection_tool class="MissingOverrideAnnotation" level="WARNING" enabled="true" />
<inspection_tool class="MultipleTopLevelClassesInFile" level="WARNING" enabled="true" />
<inspection_tool class="NoopMethodInAbstractClass" level="WARNING" enabled="true" />
<inspection_tool class="ProtectedMemberInFinalClass" level="WARNING" enabled="true" />
@@ -562,7 +606,10 @@
<option name="m_ignoreJavadoc" value="false" />
</inspection_tool>
<inspection_tool class="UnnecessaryInterfaceModifier" level="WARNING" enabled="true" />
- <inspection_tool class="UnnecessaryParentheses" level="WARNING" enabled="true" />
+ <inspection_tool class="UnnecessaryParentheses" level="WARNING" enabled="true">
+ <option name="ignoreClarifyingParentheses" value="false" />
+ <option name="ignoreParenthesesOnConditionals" value="false" />
+ </inspection_tool>
<inspection_tool class="UnnecessaryQualifierForThis" level="WARNING" enabled="true" />
<inspection_tool class="MultipleTypedDeclaration" level="WARNING" enabled="true" />
<inspection_tool class="ConditionalExpressionWithIdenticalBranches" level="WARNING" enabled="true" />
@@ -611,7 +658,9 @@
</inspection_tool>
<inspection_tool class="UnnecessaryDefault" level="WARNING" enabled="true" />
<inspection_tool class="InstanceofCatchParameter" level="WARNING" enabled="true" />
- <inspection_tool class="TooBroadCatch" level="WARNING" enabled="true" />
+ <inspection_tool class="TooBroadCatch" level="WARNING" enabled="true">
+ <option name="onlyWarnOnRootExceptions" value="false" />
+ </inspection_tool>
<inspection_tool class="EqualsAndHashcode" level="WARNING" enabled="true" />
<inspection_tool class="RedundantSuppression" level="WARNING" enabled="true" />
<inspection_tool class="RedundantThrowsDeclaration" level="WARNING" enabled="true" />
@@ -851,17 +900,20 @@
</item>
</group>
</component>
+ <component name="ProjectDetails">
+ <option name="projectName" value="cherbot" />
+ </component>
<component name="ProjectFileVersion" converted="true" />
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/cherbot.iml" filepath="$PROJECT_DIR$/cherbot.iml" />
</modules>
</component>
- <component name="ProjectRootManager" version="2" assert-keyword="true" jdk-15="true" project-jdk-name="latest" project-jdk-type="JavaSDK">
+ <component name="ProjectRootManager" version="2" languageLevel="JDK_1_5" assert-keyword="true" jdk-15="true" project-jdk-name="latest" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/ideaclasses" />
</component>
<component name="ProjectRunConfigurationManager">
- <configuration default="false" name="IRCConnection" type="Application" factoryName="Application" enabled="false" merge="false">
+ <configuration default="false" name="IRCConnection" type="Application" factoryName="Application" enabled="false" merge="false" runner="emma">
<option name="MAIN_CLASS_NAME" value="net.sf.cherbot.connection.IRCConnection" />
<option name="VM_PARAMETERS" value="" />
<option name="PROGRAM_PARAMETERS" value="--host=irc.freenode.org #cherbot" />
@@ -895,7 +947,7 @@
<option name="ADDITIONAL_OPTIONS_STRING" value="" />
</component>
<component name="SvnBranchConfigurationManager">
- <option name="myVersion" value="123" />
+ <option name="myVersion" value="124" />
</component>
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="svn" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2008-12-15 01:03:02
|
Revision: 147
http://cherbot.svn.sourceforge.net/cherbot/?rev=147&view=rev
Author: christianhujer
Date: 2008-12-15 01:02:58 +0000 (Mon, 15 Dec 2008)
Log Message:
-----------
Removed unused local variable.
Modified Paths:
--------------
trunk/src/prj/net/sf/cherbot/connection/IRCConnection.java
Modified: trunk/src/prj/net/sf/cherbot/connection/IRCConnection.java
===================================================================
--- trunk/src/prj/net/sf/cherbot/connection/IRCConnection.java 2008-12-14 22:05:51 UTC (rev 146)
+++ trunk/src/prj/net/sf/cherbot/connection/IRCConnection.java 2008-12-15 01:02:58 UTC (rev 147)
@@ -79,7 +79,6 @@
/** {@inheritDoc} */
@Override public void connect() throws IOException {
super.connect();
- final Socket socket = getSocket();
final PrintWriter out = this.out;
assert this.out != null;
out.println("USER " + username + " 0 * :" + realname);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2008-12-14 23:22:09
|
Revision: 146
http://cherbot.svn.sourceforge.net/cherbot/?rev=146&view=rev
Author: christianhujer
Date: 2008-12-14 22:05:51 +0000 (Sun, 14 Dec 2008)
Log Message:
-----------
Fixed implementation of SPI so it passes JUnit tests in IntelliJ IDEA and Ant.
Modified Paths:
--------------
trunk/build.xml
trunk/cherbot.iml
trunk/cherbot.ipr
trunk/src/prj/net/sf/cherbot/connection/CrossfireConnectionFactory.java
trunk/src/prj/net/sf/cherbot/connection/DaimoninConnectionFactory.java
trunk/src/prj/net/sf/cherbot/connection/IRCConnectionFactory.java
Added Paths:
-----------
trunk/src/prj/META-INF/services/
trunk/src/prj/META-INF/services/net.sf.cherbot.connection.ConnectionFactory
trunk/src/tst/test/net/sf/cherbot/connection/
trunk/src/tst/test/net/sf/cherbot/connection/ConnectionProviderTest.java
Removed Paths:
-------------
trunk/src/prj/META-INF/net.sf.cherbot.connection.ConnectionFactory
Modified: trunk/build.xml
===================================================================
--- trunk/build.xml 2008-12-14 20:16:36 UTC (rev 145)
+++ trunk/build.xml 2008-12-14 22:05:51 UTC (rev 146)
@@ -29,7 +29,7 @@
<javac
source = "1.5"
target = "1.5"
- srcdir = "src"
+ srcdir = "src/prj"
destdir = "classes"
debug = "yes"
encoding = "utf-8"
@@ -44,7 +44,7 @@
<compilerarg line="-Xmaxwarns 4000"/>
</javac>
<copy todir="classes">
- <fileset dir="src">
+ <fileset dir="src/prj">
<include name="**/*.properties"/>
<include name="META-INF/**"/>
</fileset>
@@ -137,22 +137,40 @@
depends = "createJar"
>
<mkdir dir="tests" />
+ <javac
+ source = "1.5"
+ target = "1.5"
+ srcdir = "src/tst"
+ destdir = "classes"
+ debug = "yes"
+ encoding = "utf-8"
+ >
+ <classpath>
+ <pathelement location="lib/annotations.jar" />
+ <pathelement location="lib/junit-4.1.jar" />
+ <pathelement location="lib/japi-lib-argparser-0.1.jar" />
+ </classpath>
+ <compilerarg line="-Xlint:all"/>
+ <compilerarg line="-Xmaxerrs 400"/>
+ <compilerarg line="-Xmaxwarns 4000"/>
+ </javac>
<junit
fork = "no"
printsummary="yes"
haltonfailure="yes"
>
<formatter type="plain" usefile="no"/>
+ <formatter type="xml"/>
<classpath>
<pathelement path="CherBot.jar" />
+ <pathelement path="lib/junit-4.1.jar" />
</classpath>
- <test
- name="net.sf.cherbot.ExampleTester"
- todir="tests"
- >
- <formatter type="plain"/>
- <formatter type="xml"/>
- </test>
+ <batchtest todir="tests">
+ <fileset dir="src/tst">
+ <include name="**/*Test.java" />
+ <exclude name="**/Abstract*Test.java" />
+ </fileset>
+ </batchtest>
</junit>
</target>
Modified: trunk/cherbot.iml
===================================================================
--- trunk/cherbot.iml 2008-12-14 20:16:36 UTC (rev 145)
+++ trunk/cherbot.iml 2008-12-14 22:05:51 UTC (rev 146)
@@ -38,7 +38,6 @@
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="library" name="derby" level="project" />
<orderEntryProperties />
</component>
<component name="copyright">
Modified: trunk/cherbot.ipr
===================================================================
--- trunk/cherbot.ipr 2008-12-14 20:16:36 UTC (rev 145)
+++ trunk/cherbot.ipr 2008-12-14 22:05:51 UTC (rev 146)
@@ -82,6 +82,7 @@
<entry name="?*.png" />
<entry name="?*.jpeg" />
<entry name="?*.jpg" />
+ <entry name="?*Factory" />
</wildcardResourcePatterns>
</component>
<component name="CppTools.Loader" warnedAboutFileOutOfSourceRoot="true" />
@@ -1121,13 +1122,6 @@
<JAVADOC />
<SOURCES />
</library>
- <library name="derby">
- <CLASSES>
- <root url="jar://$PROJECT_DIR$/../../../Documents/Downloads/jdk1.6.0_01/db/lib/derby.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
</component>
</project>
Deleted: trunk/src/prj/META-INF/net.sf.cherbot.connection.ConnectionFactory
===================================================================
--- trunk/src/prj/META-INF/net.sf.cherbot.connection.ConnectionFactory 2008-12-14 20:16:36 UTC (rev 145)
+++ trunk/src/prj/META-INF/net.sf.cherbot.connection.ConnectionFactory 2008-12-14 22:05:51 UTC (rev 146)
@@ -1,4 +0,0 @@
-net.sf.cherbot.ConsoleConncectionFactory
-net.sf.cherbot.CrossfireConncectionFactory
-net.sf.cherbot.DaimoninConncectionFactory
-net.sf.cherbot.IRCConncectionFactory
Copied: trunk/src/prj/META-INF/services/net.sf.cherbot.connection.ConnectionFactory (from rev 142, trunk/src/prj/META-INF/net.sf.cherbot.connection.ConnectionFactory)
===================================================================
--- trunk/src/prj/META-INF/services/net.sf.cherbot.connection.ConnectionFactory (rev 0)
+++ trunk/src/prj/META-INF/services/net.sf.cherbot.connection.ConnectionFactory 2008-12-14 22:05:51 UTC (rev 146)
@@ -0,0 +1,4 @@
+net.sf.cherbot.connection.ConsoleConnectionFactory
+net.sf.cherbot.connection.CrossfireConnectionFactory
+net.sf.cherbot.connection.DaimoninConnectionFactory
+net.sf.cherbot.connection.IRCConnectionFactory
Property changes on: trunk/src/prj/META-INF/services/net.sf.cherbot.connection.ConnectionFactory
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ LF
Modified: trunk/src/prj/net/sf/cherbot/connection/CrossfireConnectionFactory.java
===================================================================
--- trunk/src/prj/net/sf/cherbot/connection/CrossfireConnectionFactory.java 2008-12-14 20:16:36 UTC (rev 145)
+++ trunk/src/prj/net/sf/cherbot/connection/CrossfireConnectionFactory.java 2008-12-14 22:05:51 UTC (rev 146)
@@ -10,7 +10,7 @@
/** Service Constructor.
* @see java.util.ServiceLoader
*/
- protected CrossfireConnectionFactory() {
+ public CrossfireConnectionFactory() {
super("crossfire");
}
Modified: trunk/src/prj/net/sf/cherbot/connection/DaimoninConnectionFactory.java
===================================================================
--- trunk/src/prj/net/sf/cherbot/connection/DaimoninConnectionFactory.java 2008-12-14 20:16:36 UTC (rev 145)
+++ trunk/src/prj/net/sf/cherbot/connection/DaimoninConnectionFactory.java 2008-12-14 22:05:51 UTC (rev 146)
@@ -10,7 +10,7 @@
/** Service Constructor.
* @see java.util.ServiceLoader
*/
- protected DaimoninConnectionFactory() {
+ public DaimoninConnectionFactory() {
super("daimonin");
}
Modified: trunk/src/prj/net/sf/cherbot/connection/IRCConnectionFactory.java
===================================================================
--- trunk/src/prj/net/sf/cherbot/connection/IRCConnectionFactory.java 2008-12-14 20:16:36 UTC (rev 145)
+++ trunk/src/prj/net/sf/cherbot/connection/IRCConnectionFactory.java 2008-12-14 22:05:51 UTC (rev 146)
@@ -10,7 +10,7 @@
/** Service Constructor.
* @see java.util.ServiceLoader
*/
- protected IRCConnectionFactory() {
+ public IRCConnectionFactory() {
super("irc");
}
Added: trunk/src/tst/test/net/sf/cherbot/connection/ConnectionProviderTest.java
===================================================================
--- trunk/src/tst/test/net/sf/cherbot/connection/ConnectionProviderTest.java (rev 0)
+++ trunk/src/tst/test/net/sf/cherbot/connection/ConnectionProviderTest.java 2008-12-14 22:05:51 UTC (rev 146)
@@ -0,0 +1,27 @@
+package test.net.sf.cherbot.connection;
+
+import org.junit.Test;
+import net.sf.cherbot.connection.Connection;
+import net.sf.cherbot.connection.ConnectionProvider;
+import net.sf.cherbot.connection.UnknownConnectionTypeException;
+
+/**
+ * TODO
+ * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
+ */
+public class ConnectionProviderTest {
+
+ @Test public void testFoo() throws UnknownConnectionTypeException {
+ Connection con;
+ con = ConnectionProvider.getConnection("console");
+ con = ConnectionProvider.getConnection("crossfire");
+ con = ConnectionProvider.getConnection("daimonin");
+ con = ConnectionProvider.getConnection("irc");
+ }
+
+ @Test(expected = UnknownConnectionTypeException.class)
+ public void test2() throws UnknownConnectionTypeException {
+ Connection con;
+ con = ConnectionProvider.getConnection("foo");
+ }
+}
Property changes on: trunk/src/tst/test/net/sf/cherbot/connection/ConnectionProviderTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ LF
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2008-12-14 20:16:42
|
Revision: 145
http://cherbot.svn.sourceforge.net/cherbot/?rev=145&view=rev
Author: christianhujer
Date: 2008-12-14 20:16:36 +0000 (Sun, 14 Dec 2008)
Log Message:
-----------
Fixed checkstyle issues.
Modified Paths:
--------------
trunk/src/prj/net/sf/cherbot/connection/ConnectionProvider.java
Modified: trunk/src/prj/net/sf/cherbot/connection/ConnectionProvider.java
===================================================================
--- trunk/src/prj/net/sf/cherbot/connection/ConnectionProvider.java 2008-12-14 20:06:18 UTC (rev 144)
+++ trunk/src/prj/net/sf/cherbot/connection/ConnectionProvider.java 2008-12-14 20:16:36 UTC (rev 145)
@@ -6,12 +6,19 @@
/** Provider for connections.
* @author <a href="mailto:ch...@ri...">Christian Hujer</a>
*/
-public class ConnectionProvider {
+public final class ConnectionProvider {
+ /** The ServiceLoader for getting {@link ConnectionFactory ConnectionFactories}. */
private static final ServiceLoader<ConnectionFactory> connectionFactories = ServiceLoader.load(ConnectionFactory.class);
+ /** Utility class - do not instanciate. */
+ private ConnectionProvider() {
+ }
+
/** Gets a Connection instance for the specified connection type name.
* @param connectionTypeName Name of the connection type for which to get a Connection.
+ * @return Connection for the specified <code>connectionTypeName</code>.
+ * @throws UnknownConnectionTypeException in case <code>connectionTypeName</code> is not supported.
*/
public static Connection getConnection(@NotNull final String connectionTypeName) throws UnknownConnectionTypeException {
for (final ConnectionFactory factory : connectionFactories) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2008-12-14 20:06:21
|
Revision: 144
http://cherbot.svn.sourceforge.net/cherbot/?rev=144&view=rev
Author: christianhujer
Date: 2008-12-14 20:06:18 +0000 (Sun, 14 Dec 2008)
Log Message:
-----------
Added missing serial versions.
Modified Paths:
--------------
trunk/src/prj/net/sf/cherbot/connection/ConsoleConnection.java
trunk/src/prj/net/sf/cherbot/connection/UnknownConnectionTypeException.java
Modified: trunk/src/prj/net/sf/cherbot/connection/ConsoleConnection.java
===================================================================
--- trunk/src/prj/net/sf/cherbot/connection/ConsoleConnection.java 2008-12-14 20:03:59 UTC (rev 143)
+++ trunk/src/prj/net/sf/cherbot/connection/ConsoleConnection.java 2008-12-14 20:06:18 UTC (rev 144)
@@ -11,6 +11,9 @@
*/
public class ConsoleConnection extends AbstractConnection {
+ /** Serial version. */
+ private static final long serialVersionUID = 1L;
+
/** Main program.
* For testing purposes.
* @param args Command line arguments
Modified: trunk/src/prj/net/sf/cherbot/connection/UnknownConnectionTypeException.java
===================================================================
--- trunk/src/prj/net/sf/cherbot/connection/UnknownConnectionTypeException.java 2008-12-14 20:03:59 UTC (rev 143)
+++ trunk/src/prj/net/sf/cherbot/connection/UnknownConnectionTypeException.java 2008-12-14 20:06:18 UTC (rev 144)
@@ -5,6 +5,9 @@
*/
public class UnknownConnectionTypeException extends Throwable {
+ /** Serial version. */
+ private static final long serialVersionUID = 1L;
+
/** Creates an UnknownConnectionTypeException.
* @param connectionTypeName Name of the Connection type that was not known.
*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2008-12-14 20:04:01
|
Revision: 143
http://cherbot.svn.sourceforge.net/cherbot/?rev=143&view=rev
Author: christianhujer
Date: 2008-12-14 20:03:59 +0000 (Sun, 14 Dec 2008)
Log Message:
-----------
Updated build.xml to include META-INF in jar.
Modified Paths:
--------------
trunk/build.xml
Modified: trunk/build.xml
===================================================================
--- trunk/build.xml 2008-12-14 19:22:53 UTC (rev 142)
+++ trunk/build.xml 2008-12-14 20:03:59 UTC (rev 143)
@@ -2,7 +2,7 @@
<!DOCTYPE project [
<!ENTITY catalogForAnt SYSTEM "src/doc/dtd/catalogForAnt.xml">
]>
-<project default="createJar">
+<project default="createJar" name="CherBot">
<description>
CherBot
@@ -46,6 +46,7 @@
<copy todir="classes">
<fileset dir="src">
<include name="**/*.properties"/>
+ <include name="META-INF/**"/>
</fileset>
</copy>
</target>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2008-12-14 19:22:59
|
Revision: 142
http://cherbot.svn.sourceforge.net/cherbot/?rev=142&view=rev
Author: christianhujer
Date: 2008-12-14 19:22:53 +0000 (Sun, 14 Dec 2008)
Log Message:
-----------
Added SPI factory implementations.
Modified Paths:
--------------
trunk/src/prj/net/sf/cherbot/connection/package-info.java
Added Paths:
-----------
trunk/src/prj/META-INF/
trunk/src/prj/META-INF/net.sf.cherbot.connection.ConnectionFactory
trunk/src/prj/net/sf/cherbot/connection/AbstractConnectionFactory.java
trunk/src/prj/net/sf/cherbot/connection/ConsoleConnectionFactory.java
trunk/src/prj/net/sf/cherbot/connection/CrossfireConnectionFactory.java
trunk/src/prj/net/sf/cherbot/connection/DaimoninConnectionFactory.java
trunk/src/prj/net/sf/cherbot/connection/IRCConnectionFactory.java
Added: trunk/src/prj/META-INF/net.sf.cherbot.connection.ConnectionFactory
===================================================================
--- trunk/src/prj/META-INF/net.sf.cherbot.connection.ConnectionFactory (rev 0)
+++ trunk/src/prj/META-INF/net.sf.cherbot.connection.ConnectionFactory 2008-12-14 19:22:53 UTC (rev 142)
@@ -0,0 +1,4 @@
+net.sf.cherbot.ConsoleConncectionFactory
+net.sf.cherbot.CrossfireConncectionFactory
+net.sf.cherbot.DaimoninConncectionFactory
+net.sf.cherbot.IRCConncectionFactory
Property changes on: trunk/src/prj/META-INF/net.sf.cherbot.connection.ConnectionFactory
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ LF
Added: trunk/src/prj/net/sf/cherbot/connection/AbstractConnectionFactory.java
===================================================================
--- trunk/src/prj/net/sf/cherbot/connection/AbstractConnectionFactory.java (rev 0)
+++ trunk/src/prj/net/sf/cherbot/connection/AbstractConnectionFactory.java 2008-12-14 19:22:53 UTC (rev 142)
@@ -0,0 +1,40 @@
+package net.sf.cherbot.connection;
+
+import org.jetbrains.annotations.NotNull;
+
+/** Base class for {@link ConnectionFactory ConnectionFactories} which support just one Connection type that is easy to create.
+ * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
+ */
+public abstract class AbstractConnectionFactory implements ConnectionFactory {
+
+ /** The name of the supported connection type. */
+ private final String supportedConnectionTypeName;
+
+ /** Creates a ConnectionFactory.
+ * @param supportedConnectionTypeName Name of the supported connection type.
+ */
+ protected AbstractConnectionFactory(@NotNull final String supportedConnectionTypeName) {
+ this.supportedConnectionTypeName = supportedConnectionTypeName;
+ }
+
+ /** {@inheritDoc} */
+ public boolean supports(@NotNull final String connectionTypeName) {
+ return supportedConnectionTypeName.equals(connectionTypeName);
+ }
+
+ /** {@inheritDoc} */
+ public Connection createConnection(@NotNull final String connectionTypeName) throws UnknownConnectionTypeException {
+ if (!supports(connectionTypeName)) {
+ throw new UnknownConnectionTypeException(connectionTypeName);
+ }
+ return createConnectionImpl(connectionTypeName);
+ }
+
+ /** Creates a Connection.
+ * Similar to createConnection, but the check with {@link #supports(String)} is already performed.
+ * Most implementations thus will not need the <code>connectionTypeName</code> parameter.
+ * @param connectionTypeName Connection type name.
+ * @return New connection.
+ */
+ protected abstract Connection createConnectionImpl(@NotNull final String connectionTypeName);
+}
Property changes on: trunk/src/prj/net/sf/cherbot/connection/AbstractConnectionFactory.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ LF
Added: trunk/src/prj/net/sf/cherbot/connection/ConsoleConnectionFactory.java
===================================================================
--- trunk/src/prj/net/sf/cherbot/connection/ConsoleConnectionFactory.java (rev 0)
+++ trunk/src/prj/net/sf/cherbot/connection/ConsoleConnectionFactory.java 2008-12-14 19:22:53 UTC (rev 142)
@@ -0,0 +1,21 @@
+package net.sf.cherbot.connection;
+
+import org.jetbrains.annotations.NotNull;
+
+/** ConnectionFactory for {@link ConsoleConnection}.
+ * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
+ */
+public class ConsoleConnectionFactory extends AbstractConnectionFactory {
+
+ /** Service Constructor.
+ * @see java.util.ServiceLoader
+ */
+ public ConsoleConnectionFactory() {
+ super("console");
+ }
+
+ /** {@inheritDoc} */
+ protected Connection createConnectionImpl(@NotNull final String connectionTypeName) {
+ return new ConsoleConnection();
+ }
+}
Property changes on: trunk/src/prj/net/sf/cherbot/connection/ConsoleConnectionFactory.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ LF
Added: trunk/src/prj/net/sf/cherbot/connection/CrossfireConnectionFactory.java
===================================================================
--- trunk/src/prj/net/sf/cherbot/connection/CrossfireConnectionFactory.java (rev 0)
+++ trunk/src/prj/net/sf/cherbot/connection/CrossfireConnectionFactory.java 2008-12-14 19:22:53 UTC (rev 142)
@@ -0,0 +1,21 @@
+package net.sf.cherbot.connection;
+
+import org.jetbrains.annotations.NotNull;
+
+/** ConnectionFactory for {@link CrossfireConnection}.
+ * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
+ */
+public class CrossfireConnectionFactory extends AbstractConnectionFactory {
+
+ /** Service Constructor.
+ * @see java.util.ServiceLoader
+ */
+ protected CrossfireConnectionFactory() {
+ super("crossfire");
+ }
+
+ /** {@inheritDoc} */
+ protected Connection createConnectionImpl(@NotNull final String connectionTypeName) {
+ return new CrossfireConnection();
+ }
+}
Property changes on: trunk/src/prj/net/sf/cherbot/connection/CrossfireConnectionFactory.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ LF
Added: trunk/src/prj/net/sf/cherbot/connection/DaimoninConnectionFactory.java
===================================================================
--- trunk/src/prj/net/sf/cherbot/connection/DaimoninConnectionFactory.java (rev 0)
+++ trunk/src/prj/net/sf/cherbot/connection/DaimoninConnectionFactory.java 2008-12-14 19:22:53 UTC (rev 142)
@@ -0,0 +1,21 @@
+package net.sf.cherbot.connection;
+
+import org.jetbrains.annotations.NotNull;
+
+/** ConnectionFactory for {@link DaimoninConnection}.
+ * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
+ */
+public class DaimoninConnectionFactory extends AbstractConnectionFactory {
+
+ /** Service Constructor.
+ * @see java.util.ServiceLoader
+ */
+ protected DaimoninConnectionFactory() {
+ super("daimonin");
+ }
+
+ /** {@inheritDoc} */
+ protected Connection createConnectionImpl(@NotNull final String connectionTypeName) {
+ return new DaimoninConnection();
+ }
+}
Property changes on: trunk/src/prj/net/sf/cherbot/connection/DaimoninConnectionFactory.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ LF
Added: trunk/src/prj/net/sf/cherbot/connection/IRCConnectionFactory.java
===================================================================
--- trunk/src/prj/net/sf/cherbot/connection/IRCConnectionFactory.java (rev 0)
+++ trunk/src/prj/net/sf/cherbot/connection/IRCConnectionFactory.java 2008-12-14 19:22:53 UTC (rev 142)
@@ -0,0 +1,21 @@
+package net.sf.cherbot.connection;
+
+import org.jetbrains.annotations.NotNull;
+
+/** ConnectionFactory for {@link IRCConnection}.
+ * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
+ */
+public class IRCConnectionFactory extends AbstractConnectionFactory {
+
+ /** Service Constructor.
+ * @see java.util.ServiceLoader
+ */
+ protected IRCConnectionFactory() {
+ super("irc");
+ }
+
+ /** {@inheritDoc} */
+ protected Connection createConnectionImpl(@NotNull final String connectionTypeName) {
+ return new IRCConnection();
+ }
+}
Property changes on: trunk/src/prj/net/sf/cherbot/connection/IRCConnectionFactory.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ LF
Modified: trunk/src/prj/net/sf/cherbot/connection/package-info.java
===================================================================
--- trunk/src/prj/net/sf/cherbot/connection/package-info.java 2008-12-14 18:12:23 UTC (rev 141)
+++ trunk/src/prj/net/sf/cherbot/connection/package-info.java 2008-12-14 19:22:53 UTC (rev 142)
@@ -8,7 +8,10 @@
*
* The purpose of this package is to represent a layer that encapsulates and abstracts server and protocol specific aspects.
* That way CherBot itself does not need to know about IRC, Daimonin etc..
- * @todo provide a factory for creating connections and channels for CherBot.
+ *
+ * Connections are provided as {@link java.util.ServiceLoader service}.
+ * That way it is possible to "teach" CherBot new server types on the classpath without modifying the original code.
+ *
* @author <a href="mailto:ch...@ri...">Christian Hujer</a>
*/
package net.sf.cherbot.connection;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2008-12-14 18:12:26
|
Revision: 141
http://cherbot.svn.sourceforge.net/cherbot/?rev=141&view=rev
Author: christianhujer
Date: 2008-12-14 18:12:23 +0000 (Sun, 14 Dec 2008)
Log Message:
-----------
Started creating an SPI for connections.
Modified Paths:
--------------
trunk/src/prj/net/sf/cherbot/connection/package-info.java
Added Paths:
-----------
trunk/src/prj/net/sf/cherbot/connection/ConnectionFactory.java
trunk/src/prj/net/sf/cherbot/connection/ConnectionProvider.java
trunk/src/prj/net/sf/cherbot/connection/UnknownConnectionTypeException.java
Added: trunk/src/prj/net/sf/cherbot/connection/ConnectionFactory.java
===================================================================
--- trunk/src/prj/net/sf/cherbot/connection/ConnectionFactory.java (rev 0)
+++ trunk/src/prj/net/sf/cherbot/connection/ConnectionFactory.java 2008-12-14 18:12:23 UTC (rev 141)
@@ -0,0 +1,23 @@
+package net.sf.cherbot.connection;
+
+import org.jetbrains.annotations.NotNull;
+
+/** Factory for connections.
+ * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
+ */
+public interface ConnectionFactory {
+
+ /** Returns whether or not this ConnectionFactory supports creating a connection for type <code>connectionTypeName</code>.
+ * @param connectionTypeName Name of the connection type.
+ * @return <code>true</code> if this Factory supports <code>connectionTypeName</code>, otherwise <code>false</code>.
+ */
+ boolean supports(@NotNull final String connectionTypeName);
+
+ /** Creates a connection for the specified connectionTypeName.
+ * @param connectionTypeName Name of the connection type.
+ * @return The connection that was created for <code>connectionTypeName</code>.
+ * @throws UnknownConnectionTypeException if this factory does not support <code>connectionTypeName</code>,
+ * which is exactly the case if {@link #supports(String)} returns false.
+ */
+ Connection createConnection(@NotNull final String connectionTypeName) throws UnknownConnectionTypeException;
+}
Property changes on: trunk/src/prj/net/sf/cherbot/connection/ConnectionFactory.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ LF
Added: trunk/src/prj/net/sf/cherbot/connection/ConnectionProvider.java
===================================================================
--- trunk/src/prj/net/sf/cherbot/connection/ConnectionProvider.java (rev 0)
+++ trunk/src/prj/net/sf/cherbot/connection/ConnectionProvider.java 2008-12-14 18:12:23 UTC (rev 141)
@@ -0,0 +1,24 @@
+package net.sf.cherbot.connection;
+
+import org.jetbrains.annotations.NotNull;
+import java.util.ServiceLoader;
+
+/** Provider for connections.
+ * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
+ */
+public class ConnectionProvider {
+
+ private static final ServiceLoader<ConnectionFactory> connectionFactories = ServiceLoader.load(ConnectionFactory.class);
+
+ /** Gets a Connection instance for the specified connection type name.
+ * @param connectionTypeName Name of the connection type for which to get a Connection.
+ */
+ public static Connection getConnection(@NotNull final String connectionTypeName) throws UnknownConnectionTypeException {
+ for (final ConnectionFactory factory : connectionFactories) {
+ if (factory.supports(connectionTypeName)) {
+ return factory.createConnection(connectionTypeName);
+ }
+ }
+ throw new UnknownConnectionTypeException(connectionTypeName);
+ }
+}
Property changes on: trunk/src/prj/net/sf/cherbot/connection/ConnectionProvider.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ LF
Added: trunk/src/prj/net/sf/cherbot/connection/UnknownConnectionTypeException.java
===================================================================
--- trunk/src/prj/net/sf/cherbot/connection/UnknownConnectionTypeException.java (rev 0)
+++ trunk/src/prj/net/sf/cherbot/connection/UnknownConnectionTypeException.java 2008-12-14 18:12:23 UTC (rev 141)
@@ -0,0 +1,15 @@
+package net.sf.cherbot.connection;
+
+/** Exception that's thrown when a Connection for an unknown connection type was reqeuested.
+ * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
+ */
+public class UnknownConnectionTypeException extends Throwable {
+
+ /** Creates an UnknownConnectionTypeException.
+ * @param connectionTypeName Name of the Connection type that was not known.
+ */
+ public UnknownConnectionTypeException(final String connectionTypeName) {
+ super(connectionTypeName);
+ }
+
+}
Property changes on: trunk/src/prj/net/sf/cherbot/connection/UnknownConnectionTypeException.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ LF
Modified: trunk/src/prj/net/sf/cherbot/connection/package-info.java
===================================================================
--- trunk/src/prj/net/sf/cherbot/connection/package-info.java 2008-12-14 17:04:15 UTC (rev 140)
+++ trunk/src/prj/net/sf/cherbot/connection/package-info.java 2008-12-14 18:12:23 UTC (rev 141)
@@ -8,6 +8,7 @@
*
* The purpose of this package is to represent a layer that encapsulates and abstracts server and protocol specific aspects.
* That way CherBot itself does not need to know about IRC, Daimonin etc..
+ * @todo provide a factory for creating connections and channels for CherBot.
* @author <a href="mailto:ch...@ri...">Christian Hujer</a>
*/
package net.sf.cherbot.connection;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2008-12-14 17:04:19
|
Revision: 140
http://cherbot.svn.sourceforge.net/cherbot/?rev=140&view=rev
Author: christianhujer
Date: 2008-12-14 17:04:15 +0000 (Sun, 14 Dec 2008)
Log Message:
-----------
Extracted interfaces for Connections to allow the creation of an SPI for Connections.
Modified Paths:
--------------
trunk/src/prj/net/sf/cherbot/connection/AbstractConnection.java
trunk/src/prj/net/sf/cherbot/connection/AbstractNetworkConnection.java
Added Paths:
-----------
trunk/src/prj/net/sf/cherbot/connection/Connection.java
trunk/src/prj/net/sf/cherbot/connection/NetworkConnection.java
Modified: trunk/src/prj/net/sf/cherbot/connection/AbstractConnection.java
===================================================================
--- trunk/src/prj/net/sf/cherbot/connection/AbstractConnection.java 2008-12-14 13:20:47 UTC (rev 139)
+++ trunk/src/prj/net/sf/cherbot/connection/AbstractConnection.java 2008-12-14 17:04:15 UTC (rev 140)
@@ -19,18 +19,6 @@
* </ul>
* @author <a href="mailto:ch...@ri...">Christian Hujer</a>
*/
-public abstract class AbstractConnection extends BasicCommand implements Closeable, Serializable {
+public abstract class AbstractConnection extends BasicCommand implements Connection {
- /** Establishes this connection.
- * @throws IOException in case of connection problems.
- */
- public abstract void connect() throws IOException;
-
- /** {@inheritDoc} */
- public abstract void close() throws IOException;
-
- /** Returns whether this connection is established.
- * @return <code>true</code> if this connection is established, otherwise <code>false</code>.
- */
- public abstract boolean isConnected();
}
Modified: trunk/src/prj/net/sf/cherbot/connection/AbstractNetworkConnection.java
===================================================================
--- trunk/src/prj/net/sf/cherbot/connection/AbstractNetworkConnection.java 2008-12-14 13:20:47 UTC (rev 139)
+++ trunk/src/prj/net/sf/cherbot/connection/AbstractNetworkConnection.java 2008-12-14 17:04:15 UTC (rev 140)
@@ -16,7 +16,7 @@
/** An AbstractNetworkConnection represents a Connection to a server and has one or more channels.
* @author <a href="mailto:ch...@ri...">Christian Hujer</a>
*/
-public abstract class AbstractNetworkConnection extends AbstractConnection {
+public abstract class AbstractNetworkConnection extends AbstractConnection implements NetworkConnection {
/** The host to connect to.
* @serial include
@@ -31,32 +31,24 @@
/** The socket for the connection. */
@Nullable private transient Socket socket;
- /** Sets the host of the IRC server to connect to.
- * @param host Host of the IRC server.
- */
+ /** {@inheritDoc} */
@Option(type = OptionType.REQUIRED, value = {"host"})
public void setHost(@NotNull final String host) {
this.host = host;
}
- /** Returns the host to connect to.
- * @return The host to connect to.
- */
+ /** {@inheritDoc} */
@Nullable public String getHost() {
return host;
}
- /** Sets the port of the IRC server to connect to.
- * @param port Port of the IRC server.
- */
+ /** {@inheritDoc} */
@Option({"port"})
public void setPort(@NotNull final Integer port) {
this.port = port;
}
- /** Returns the port to connect to.
- * @return The port to connect to.
- */
+ /** {@inheritDoc} */
public int getPort() {
return port;
}
@@ -90,18 +82,12 @@
return socket != null && socket.isConnected();
}
- /** Sets the socket for the connection.
- * Use this method if you want to create a connection on an existing socket instead of letting this Connection automatically create its own socket.
- * @param socket Socket for the connection.
- * @throws IOException In case of I/O problems when setting the socket. This is useful for overriding methods which may be interested in using the socket when it's being set.
- */
+ /** {@inheritDoc} */
public void setSocket(@NotNull final Socket socket) throws IOException {
this.socket = socket;
}
- /** Returns the socket for the connection.
- * @return The socket for the connection.
- */
+ /** {@inheritDoc} */
@Nullable public Socket getSocket() {
return socket;
}
Added: trunk/src/prj/net/sf/cherbot/connection/Connection.java
===================================================================
--- trunk/src/prj/net/sf/cherbot/connection/Connection.java (rev 0)
+++ trunk/src/prj/net/sf/cherbot/connection/Connection.java 2008-12-14 17:04:15 UTC (rev 140)
@@ -0,0 +1,40 @@
+package net.sf.cherbot.connection;
+
+import java.io.Closeable;
+import java.io.Serializable;
+import java.io.IOException;
+
+/** A Connection represents a connection of CherBot.
+ * A Connection is implemented as bean.
+ * That means:
+ * <ul>
+ * <li>
+ * An object does not reflect an established connection but has a state.
+ * The connection state can be established or not established.
+ * </li>
+ * </ul>
+ * Additionally it is recommended to implement a Connection as command bean.
+ * That means:
+ * <ul>
+ * <li>
+ * For testing, trying or standalone usage it is possible to "run" a connection as a standalone java program from the command line.
+ * (If the Connection is implemented as command bean.)
+ * </li>
+ * </ul>
+ * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
+ */
+public interface Connection extends Closeable, Serializable {
+
+ /** Establishes this connection.
+ * @throws IOException in case of connection problems.
+ */
+ void connect() throws IOException;
+
+ /** {@inheritDoc} */
+ void close() throws IOException;
+
+ /** Returns whether this connection is established.
+ * @return <code>true</code> if this connection is established, otherwise <code>false</code>.
+ */
+ boolean isConnected();
+}
Property changes on: trunk/src/prj/net/sf/cherbot/connection/Connection.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ LF
Added: trunk/src/prj/net/sf/cherbot/connection/NetworkConnection.java
===================================================================
--- trunk/src/prj/net/sf/cherbot/connection/NetworkConnection.java (rev 0)
+++ trunk/src/prj/net/sf/cherbot/connection/NetworkConnection.java 2008-12-14 17:04:15 UTC (rev 140)
@@ -0,0 +1,47 @@
+package net.sf.cherbot.connection;
+
+import net.sf.japi.io.args.Option;
+import net.sf.japi.io.args.OptionType;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+import java.net.Socket;
+import java.io.IOException;
+
+/** A NetworkConnection represents a Connection to a server.
+ * Depending on the server it may have multiple {@link Channel}s.
+ * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
+ */
+public interface NetworkConnection extends Connection {
+
+ /** Sets the host of the IRC server to connect to.
+ * @param host Host of the IRC server.
+ */
+ @Option(type = OptionType.REQUIRED, value = {"host"}) void setHost(@NotNull String host);
+
+ /** Returns the host to connect to.
+ * @return The host to connect to.
+ */
+ @Nullable String getHost();
+
+ /** Sets the port of the IRC server to connect to.
+ * @param port Port of the IRC server.
+ */
+ @Option({"port"}) void setPort(@NotNull Integer port);
+
+ /** Returns the port to connect to.
+ * @return The port to connect to.
+ */
+ int getPort();
+
+ /** Sets the socket for the connection.
+ * Use this method if you want to create a connection on an existing socket instead of letting this Connection automatically create its own socket.
+ * @param socket Socket for the connection.
+ * @throws java.io.IOException In case of I/O problems when setting the socket. This is useful for overriding methods which may be interested in using the socket when it's being set.
+ */
+ void setSocket(@NotNull Socket socket) throws IOException;
+
+ /** Returns the socket for the connection.
+ * @return The socket for the connection.
+ */
+ @Nullable Socket getSocket();
+}
Property changes on: trunk/src/prj/net/sf/cherbot/connection/NetworkConnection.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ LF
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2008-12-14 13:20:51
|
Revision: 139
http://cherbot.svn.sourceforge.net/cherbot/?rev=139&view=rev
Author: christianhujer
Date: 2008-12-14 13:20:47 +0000 (Sun, 14 Dec 2008)
Log Message:
-----------
Updated package description about the purpose of the conection package.
Modified Paths:
--------------
trunk/src/prj/net/sf/cherbot/connection/package-info.java
Modified: trunk/src/prj/net/sf/cherbot/connection/package-info.java
===================================================================
--- trunk/src/prj/net/sf/cherbot/connection/package-info.java 2008-12-14 13:20:06 UTC (rev 138)
+++ trunk/src/prj/net/sf/cherbot/connection/package-info.java 2008-12-14 13:20:47 UTC (rev 139)
@@ -5,6 +5,9 @@
*/
/** Connection and Channel related stuff.
+ *
+ * The purpose of this package is to represent a layer that encapsulates and abstracts server and protocol specific aspects.
+ * That way CherBot itself does not need to know about IRC, Daimonin etc..
* @author <a href="mailto:ch...@ri...">Christian Hujer</a>
*/
package net.sf.cherbot.connection;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2008-12-14 13:20:13
|
Revision: 138
http://cherbot.svn.sourceforge.net/cherbot/?rev=138&view=rev
Author: christianhujer
Date: 2008-12-14 13:20:06 +0000 (Sun, 14 Dec 2008)
Log Message:
-----------
Added ConsoleConnection. (Not implemented yet.)
Added Paths:
-----------
trunk/src/prj/net/sf/cherbot/connection/ConsoleConnection.java
Added: trunk/src/prj/net/sf/cherbot/connection/ConsoleConnection.java
===================================================================
--- trunk/src/prj/net/sf/cherbot/connection/ConsoleConnection.java (rev 0)
+++ trunk/src/prj/net/sf/cherbot/connection/ConsoleConnection.java 2008-12-14 13:20:06 UTC (rev 138)
@@ -0,0 +1,42 @@
+package net.sf.cherbot.connection;
+
+import java.io.IOException;
+import java.util.List;
+import org.jetbrains.annotations.NotNull;
+import net.sf.japi.io.args.ArgParser;
+
+/** ConsoleConnection is a Connection of CherBot to the Console ({@link System#in} / {@link System#out}).
+ * The ConsoleConnection is used to control CherBot from the command line from which it was invoked.
+ * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
+ */
+public class ConsoleConnection extends AbstractConnection {
+
+ /** Main program.
+ * For testing purposes.
+ * @param args Command line arguments
+ * @throws IOException In case of I/O problems.
+ */
+ public static void main(final String... args) throws IOException {
+ ArgParser.simpleParseAndRun(new IRCConnection(), args);
+ }
+
+ /** {@inheritDoc} */
+ public void connect() throws IOException {
+ //Nothing to do for connecting to Console.
+ }
+
+ /** {@inheritDoc} */
+ public void close() throws IOException {
+ //Nothing to do for connecting to Console.
+ }
+
+ public boolean isConnected() {
+ return true;
+ }
+
+ /** {@inheritDoc} */
+ public int run(@NotNull final List<String> strings) throws Exception {
+ // TODO:cher:Processing.
+ return 0;
+ }
+}
Property changes on: trunk/src/prj/net/sf/cherbot/connection/ConsoleConnection.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ LF
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2008-12-14 12:53:54
|
Revision: 137
http://cherbot.svn.sourceforge.net/cherbot/?rev=137&view=rev
Author: christianhujer
Date: 2008-12-14 12:53:44 +0000 (Sun, 14 Dec 2008)
Log Message:
-----------
Extracted AbstractConnection superclass from AbstractNetworkConnection.
Modified Paths:
--------------
trunk/src/prj/net/sf/cherbot/connection/AbstractNetworkConnection.java
trunk/src/prj/net/sf/cherbot/connection/CrossfireConnection.java
trunk/src/prj/net/sf/cherbot/connection/DaimoninConnection.java
trunk/src/prj/net/sf/cherbot/connection/IRCConnection.java
Added Paths:
-----------
trunk/src/prj/net/sf/cherbot/connection/AbstractConnection.java
Added: trunk/src/prj/net/sf/cherbot/connection/AbstractConnection.java
===================================================================
--- trunk/src/prj/net/sf/cherbot/connection/AbstractConnection.java (rev 0)
+++ trunk/src/prj/net/sf/cherbot/connection/AbstractConnection.java 2008-12-14 12:53:44 UTC (rev 137)
@@ -0,0 +1,36 @@
+package net.sf.cherbot.connection;
+
+import net.sf.japi.io.args.BasicCommand;
+import java.io.Closeable;
+import java.io.Serializable;
+import java.io.IOException;
+
+/** An AbstractConnection represents a connection of CherBot.
+ * Connections are implemented as command bean.
+ * That means:
+ * <ul>
+ * <li>
+ * An object does not reflect an established connection but has a state.
+ * The connection state can be established or not established.
+ * </li>
+ * <li>
+ * For testing, trying or standalone usage it is possible to "run" a connection as a standalone java program from the command line.
+ * </li>
+ * </ul>
+ * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
+ */
+public abstract class AbstractConnection extends BasicCommand implements Closeable, Serializable {
+
+ /** Establishes this connection.
+ * @throws IOException in case of connection problems.
+ */
+ public abstract void connect() throws IOException;
+
+ /** {@inheritDoc} */
+ public abstract void close() throws IOException;
+
+ /** Returns whether this connection is established.
+ * @return <code>true</code> if this connection is established, otherwise <code>false</code>.
+ */
+ public abstract boolean isConnected();
+}
Property changes on: trunk/src/prj/net/sf/cherbot/connection/AbstractConnection.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ LF
Modified: trunk/src/prj/net/sf/cherbot/connection/AbstractNetworkConnection.java
===================================================================
--- trunk/src/prj/net/sf/cherbot/connection/AbstractNetworkConnection.java 2008-12-14 12:43:43 UTC (rev 136)
+++ trunk/src/prj/net/sf/cherbot/connection/AbstractNetworkConnection.java 2008-12-14 12:53:44 UTC (rev 137)
@@ -6,32 +6,17 @@
package net.sf.cherbot.connection;
-import java.io.Closeable;
import java.io.IOException;
-import java.io.Serializable;
import java.net.Socket;
-import net.sf.japi.io.args.BasicCommand;
import net.sf.japi.io.args.Option;
import net.sf.japi.io.args.OptionType;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
-/** An AbstractConnection represents the connection to a server and has one or more channels.
- * Connections are implemented as command bean.
- * That means:
- * <ul>
- * <li>
- * An object does not reflect an established connection but has a state.
- * The connection state can be established or not established.
- * </li>
- * <li>
- * For testing, trying or standalone usage it is possible to "run" a connection as a standalone java program from the command line.
- * </li>
- * </ul>
- * To query whether the connection is open, get the Socket of the connection and check the socket.
+/** An AbstractNetworkConnection represents a Connection to a server and has one or more channels.
* @author <a href="mailto:ch...@ri...">Christian Hujer</a>
*/
-public abstract class AbstractNetworkConnection extends BasicCommand implements Closeable, Serializable {
+public abstract class AbstractNetworkConnection extends AbstractConnection {
/** The host to connect to.
* @serial include
@@ -78,13 +63,11 @@
/** Establishes this connection.
* Implementations of this method must invoke {@link #setSocket(Socket)}.
- * @return The socket created for this connection.
* @throws IOException in case of connection problems.
*/
- @NotNull public Socket connect() throws IOException {
+ public void connect() throws IOException {
final Socket socket = new Socket(host, port);
setSocket(socket);
- return socket;
}
/** {@inheritDoc} */
Modified: trunk/src/prj/net/sf/cherbot/connection/CrossfireConnection.java
===================================================================
--- trunk/src/prj/net/sf/cherbot/connection/CrossfireConnection.java 2008-12-14 12:43:43 UTC (rev 136)
+++ trunk/src/prj/net/sf/cherbot/connection/CrossfireConnection.java 2008-12-14 12:53:44 UTC (rev 137)
@@ -41,8 +41,9 @@
}
/** {@inheritDoc} */
- @NotNull @Override public Socket connect() throws IOException {
- final Socket socket = super.connect();
+ @Override public void connect() throws IOException {
+ super.connect();
+ final Socket socket = getSocket();
readToNull();
textMsg("version 1023 1023 CherBot");
textMsg("setup bot 1");
@@ -53,7 +54,6 @@
textMsg("reply " + getUsername());
readToNull();
textMsg("reply " + getPassword());
- return socket;
}
/** {@inheritDoc} */
Modified: trunk/src/prj/net/sf/cherbot/connection/DaimoninConnection.java
===================================================================
--- trunk/src/prj/net/sf/cherbot/connection/DaimoninConnection.java 2008-12-14 12:43:43 UTC (rev 136)
+++ trunk/src/prj/net/sf/cherbot/connection/DaimoninConnection.java 2008-12-14 12:53:44 UTC (rev 137)
@@ -41,8 +41,9 @@
}
/** {@inheritDoc} */
- @NotNull @Override public Socket connect() throws IOException {
- final Socket socket = super.connect();
+ @Override public void connect() throws IOException {
+ super.connect();
+ final Socket socket = getSocket();
readToNull(); // "991023 991023 Daimonin Server"
textMsg("version 991023 991023 Daimonin SDL Client"); // we have to cheat or the server won't let us in.
textMsg("setup bot 1"); // We are a bot
@@ -53,7 +54,6 @@
textMsg("reply L" + getUsername());
readToNull(); // 0x00 0x06 0x18 "4 QP0"
textMsg("reply " + getPassword());
- return socket;
}
/** {@inheritDoc} */
Modified: trunk/src/prj/net/sf/cherbot/connection/IRCConnection.java
===================================================================
--- trunk/src/prj/net/sf/cherbot/connection/IRCConnection.java 2008-12-14 12:43:43 UTC (rev 136)
+++ trunk/src/prj/net/sf/cherbot/connection/IRCConnection.java 2008-12-14 12:53:44 UTC (rev 137)
@@ -77,8 +77,9 @@
}
/** {@inheritDoc} */
- @Override @NotNull public Socket connect() throws IOException {
- final Socket socket = super.connect();
+ @Override public void connect() throws IOException {
+ super.connect();
+ final Socket socket = getSocket();
final PrintWriter out = this.out;
assert this.out != null;
out.println("USER " + username + " 0 * :" + realname);
@@ -87,7 +88,6 @@
out.println("PRIVMSG NICKSERV :IDENTIFY " + nickPassword);
}
out.flush();
- return socket;
}
/** {@inheritDoc} */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2008-12-14 12:43:47
|
Revision: 136
http://cherbot.svn.sourceforge.net/cherbot/?rev=136&view=rev
Author: christianhujer
Date: 2008-12-14 12:43:43 +0000 (Sun, 14 Dec 2008)
Log Message:
-----------
Renamed AbstractConnection to AbstractNetworkConnection for introducing networkless Connection superclass.
Modified Paths:
--------------
trunk/src/prj/net/sf/cherbot/connection/AbstractCFConnection.java
trunk/src/prj/net/sf/cherbot/connection/IRCConnection.java
Added Paths:
-----------
trunk/src/prj/net/sf/cherbot/connection/AbstractNetworkConnection.java
Removed Paths:
-------------
trunk/src/prj/net/sf/cherbot/connection/AbstractConnection.java
Modified: trunk/src/prj/net/sf/cherbot/connection/AbstractCFConnection.java
===================================================================
--- trunk/src/prj/net/sf/cherbot/connection/AbstractCFConnection.java 2008-12-14 12:39:57 UTC (rev 135)
+++ trunk/src/prj/net/sf/cherbot/connection/AbstractCFConnection.java 2008-12-14 12:43:43 UTC (rev 136)
@@ -20,7 +20,7 @@
/** Common base class for Connections that use Crossfire-style protocols such as Angelion or Daimonin and of course Crossfire itself.
* @author <a href="mailto:ch...@ri...">Christian Hujer</a>
*/
-public abstract class AbstractCFConnection extends AbstractConnection {
+public abstract class AbstractCFConnection extends AbstractNetworkConnection {
/** The username to authenticate with. */
@NotNull private String username;
Deleted: trunk/src/prj/net/sf/cherbot/connection/AbstractConnection.java
===================================================================
--- trunk/src/prj/net/sf/cherbot/connection/AbstractConnection.java 2008-12-14 12:39:57 UTC (rev 135)
+++ trunk/src/prj/net/sf/cherbot/connection/AbstractConnection.java 2008-12-14 12:43:43 UTC (rev 136)
@@ -1,126 +0,0 @@
-/*
- * Copyright © 2007, Christian Hujer and the CherBot developers. All Rights Reserved.
- * License: GNU General Public License v2.0 or newer.
- * See file COPYING in the root directory of this project.
- */
-
-package net.sf.cherbot.connection;
-
-import java.io.Closeable;
-import java.io.IOException;
-import java.io.Serializable;
-import java.net.Socket;
-import net.sf.japi.io.args.BasicCommand;
-import net.sf.japi.io.args.Option;
-import net.sf.japi.io.args.OptionType;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
-
-/** An AbstractConnection represents the connection to a server and has one or more channels.
- * Connections are implemented as command bean.
- * That means:
- * <ul>
- * <li>
- * An object does not reflect an established connection but has a state.
- * The connection state can be established or not established.
- * </li>
- * <li>
- * For testing, trying or standalone usage it is possible to "run" a connection as a standalone java program from the command line.
- * </li>
- * </ul>
- * To query whether the connection is open, get the Socket of the connection and check the socket.
- * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
- */
-public abstract class AbstractConnection extends BasicCommand implements Closeable, Serializable {
-
- /** The host to connect to.
- * @serial include
- */
- @Nullable private String host;
-
- /** The port to connect to.
- * @serial include
- */
- private int port;
-
- /** The socket for the connection. */
- @Nullable private transient Socket socket;
-
- /** Sets the host of the IRC server to connect to.
- * @param host Host of the IRC server.
- */
- @Option(type = OptionType.REQUIRED, value = {"host"})
- public void setHost(@NotNull final String host) {
- this.host = host;
- }
-
- /** Returns the host to connect to.
- * @return The host to connect to.
- */
- @Nullable public String getHost() {
- return host;
- }
-
- /** Sets the port of the IRC server to connect to.
- * @param port Port of the IRC server.
- */
- @Option({"port"})
- public void setPort(@NotNull final Integer port) {
- this.port = port;
- }
-
- /** Returns the port to connect to.
- * @return The port to connect to.
- */
- public int getPort() {
- return port;
- }
-
- /** Establishes this connection.
- * Implementations of this method must invoke {@link #setSocket(Socket)}.
- * @return The socket created for this connection.
- * @throws IOException in case of connection problems.
- */
- @NotNull public Socket connect() throws IOException {
- final Socket socket = new Socket(host, port);
- setSocket(socket);
- return socket;
- }
-
- /** {@inheritDoc} */
- public void close() throws IOException {
- try {
- final Socket socket = this.socket;
- if (socket != null) {
- socket.close();
- }
- } finally {
- socket = null;
- }
- }
-
- /** Returns whether this connection is established.
- * @return <code>true</code> if this connection is established, otherwise <code>false</code>.
- * @see Socket#isConnected()
- */
- public boolean isConnected() {
- return socket != null && socket.isConnected();
- }
-
- /** Sets the socket for the connection.
- * Use this method if you want to create a connection on an existing socket instead of letting this Connection automatically create its own socket.
- * @param socket Socket for the connection.
- * @throws IOException In case of I/O problems when setting the socket. This is useful for overriding methods which may be interested in using the socket when it's being set.
- */
- public void setSocket(@NotNull final Socket socket) throws IOException {
- this.socket = socket;
- }
-
- /** Returns the socket for the connection.
- * @return The socket for the connection.
- */
- @Nullable public Socket getSocket() {
- return socket;
- }
-
-} // class AbstractConnection
Copied: trunk/src/prj/net/sf/cherbot/connection/AbstractNetworkConnection.java (from rev 133, trunk/src/prj/net/sf/cherbot/connection/AbstractConnection.java)
===================================================================
--- trunk/src/prj/net/sf/cherbot/connection/AbstractNetworkConnection.java (rev 0)
+++ trunk/src/prj/net/sf/cherbot/connection/AbstractNetworkConnection.java 2008-12-14 12:43:43 UTC (rev 136)
@@ -0,0 +1,126 @@
+/*
+ * Copyright © 2007, Christian Hujer and the CherBot developers. All Rights Reserved.
+ * License: GNU General Public License v2.0 or newer.
+ * See file COPYING in the root directory of this project.
+ */
+
+package net.sf.cherbot.connection;
+
+import java.io.Closeable;
+import java.io.IOException;
+import java.io.Serializable;
+import java.net.Socket;
+import net.sf.japi.io.args.BasicCommand;
+import net.sf.japi.io.args.Option;
+import net.sf.japi.io.args.OptionType;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+
+/** An AbstractConnection represents the connection to a server and has one or more channels.
+ * Connections are implemented as command bean.
+ * That means:
+ * <ul>
+ * <li>
+ * An object does not reflect an established connection but has a state.
+ * The connection state can be established or not established.
+ * </li>
+ * <li>
+ * For testing, trying or standalone usage it is possible to "run" a connection as a standalone java program from the command line.
+ * </li>
+ * </ul>
+ * To query whether the connection is open, get the Socket of the connection and check the socket.
+ * @author <a href="mailto:ch...@ri...">Christian Hujer</a>
+ */
+public abstract class AbstractNetworkConnection extends BasicCommand implements Closeable, Serializable {
+
+ /** The host to connect to.
+ * @serial include
+ */
+ @Nullable private String host;
+
+ /** The port to connect to.
+ * @serial include
+ */
+ private int port;
+
+ /** The socket for the connection. */
+ @Nullable private transient Socket socket;
+
+ /** Sets the host of the IRC server to connect to.
+ * @param host Host of the IRC server.
+ */
+ @Option(type = OptionType.REQUIRED, value = {"host"})
+ public void setHost(@NotNull final String host) {
+ this.host = host;
+ }
+
+ /** Returns the host to connect to.
+ * @return The host to connect to.
+ */
+ @Nullable public String getHost() {
+ return host;
+ }
+
+ /** Sets the port of the IRC server to connect to.
+ * @param port Port of the IRC server.
+ */
+ @Option({"port"})
+ public void setPort(@NotNull final Integer port) {
+ this.port = port;
+ }
+
+ /** Returns the port to connect to.
+ * @return The port to connect to.
+ */
+ public int getPort() {
+ return port;
+ }
+
+ /** Establishes this connection.
+ * Implementations of this method must invoke {@link #setSocket(Socket)}.
+ * @return The socket created for this connection.
+ * @throws IOException in case of connection problems.
+ */
+ @NotNull public Socket connect() throws IOException {
+ final Socket socket = new Socket(host, port);
+ setSocket(socket);
+ return socket;
+ }
+
+ /** {@inheritDoc} */
+ public void close() throws IOException {
+ try {
+ final Socket socket = this.socket;
+ if (socket != null) {
+ socket.close();
+ }
+ } finally {
+ socket = null;
+ }
+ }
+
+ /** Returns whether this connection is established.
+ * @return <code>true</code> if this connection is established, otherwise <code>false</code>.
+ * @see Socket#isConnected()
+ */
+ public boolean isConnected() {
+ return socket != null && socket.isConnected();
+ }
+
+ /** Sets the socket for the connection.
+ * Use this method if you want to create a connection on an existing socket instead of letting this Connection automatically create its own socket.
+ * @param socket Socket for the connection.
+ * @throws IOException In case of I/O problems when setting the socket. This is useful for overriding methods which may be interested in using the socket when it's being set.
+ */
+ public void setSocket(@NotNull final Socket socket) throws IOException {
+ this.socket = socket;
+ }
+
+ /** Returns the socket for the connection.
+ * @return The socket for the connection.
+ */
+ @Nullable public Socket getSocket() {
+ return socket;
+ }
+
+} // class AbstractNetworkConnection
Property changes on: trunk/src/prj/net/sf/cherbot/connection/AbstractNetworkConnection.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:eol-style
+ LF
Modified: trunk/src/prj/net/sf/cherbot/connection/IRCConnection.java
===================================================================
--- trunk/src/prj/net/sf/cherbot/connection/IRCConnection.java 2008-12-14 12:39:57 UTC (rev 135)
+++ trunk/src/prj/net/sf/cherbot/connection/IRCConnection.java 2008-12-14 12:43:43 UTC (rev 136)
@@ -26,7 +26,7 @@
* @author <a href="mailto:ch...@ri...">Christian Hujer</a>
* @see <a href="ftp://ftp.rfc-editor.org/in-notes/rfc2812.txt">RFC 2812: Internet Relay Chat: Client Protocol</a>
*/
-public class IRCConnection extends AbstractConnection {
+public class IRCConnection extends AbstractNetworkConnection {
/** Serial Version. */
private static final long serialVersionUID = 1L;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2008-12-14 12:39:59
|
Revision: 135
http://cherbot.svn.sourceforge.net/cherbot/?rev=135&view=rev
Author: christianhujer
Date: 2008-12-14 12:39:57 +0000 (Sun, 14 Dec 2008)
Log Message:
-----------
Added echo in case a message was unprocessed for better debugging.
Modified Paths:
--------------
trunk/src/prj/net/sf/cherbot/connection/IRCConnection.java
Modified: trunk/src/prj/net/sf/cherbot/connection/IRCConnection.java
===================================================================
--- trunk/src/prj/net/sf/cherbot/connection/IRCConnection.java 2008-12-14 12:39:11 UTC (rev 134)
+++ trunk/src/prj/net/sf/cherbot/connection/IRCConnection.java 2008-12-14 12:39:57 UTC (rev 135)
@@ -123,7 +123,10 @@
for (String line; (line = in.readLine()) != null;) {
System.out.print("> ");
System.out.println(line);
- delegator.process(line);
+ int matchesFound = delegator.process(line);
+ if (matchesFound == 0) {
+ System.err.println("Message unprocessed: " + line);
+ }
}
return 0;
} finally {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2008-12-14 12:39:14
|
Revision: 134
http://cherbot.svn.sourceforge.net/cherbot/?rev=134&view=rev
Author: christianhujer
Date: 2008-12-14 12:39:11 +0000 (Sun, 14 Dec 2008)
Log Message:
-----------
Added shared IRCConnection configuration.
Modified Paths:
--------------
trunk/cherbot.ipr
Modified: trunk/cherbot.ipr
===================================================================
--- trunk/cherbot.ipr 2008-12-13 18:49:29 UTC (rev 133)
+++ trunk/cherbot.ipr 2008-12-14 12:39:11 UTC (rev 134)
@@ -859,6 +859,26 @@
<component name="ProjectRootManager" version="2" assert-keyword="true" jdk-15="true" project-jdk-name="latest" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/ideaclasses" />
</component>
+ <component name="ProjectRunConfigurationManager">
+ <configuration default="false" name="IRCConnection" type="Application" factoryName="Application" enabled="false" merge="false">
+ <option name="MAIN_CLASS_NAME" value="net.sf.cherbot.connection.IRCConnection" />
+ <option name="VM_PARAMETERS" value="" />
+ <option name="PROGRAM_PARAMETERS" value="--host=irc.freenode.org #cherbot" />
+ <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
+ <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+ <option name="ALTERNATIVE_JRE_PATH" value="" />
+ <option name="ENABLE_SWING_INSPECTOR" value="false" />
+ <option name="ENV_VARIABLES" />
+ <option name="PASS_PARENT_ENVS" value="true" />
+ <module name="cherbot" />
+ <envs />
+ <RunnerSettings RunnerId="Run" />
+ <ConfigurationWrapper RunnerId="Run" />
+ <method>
+ <option name="Make" value="true" />
+ </method>
+ </configuration>
+ </component>
<component name="ResourceManagerContainer">
<option name="myResourceBundles">
<value>
@@ -873,6 +893,9 @@
<option name="GENERATE_IIOP_STUBS" value="false" />
<option name="ADDITIONAL_OPTIONS_STRING" value="" />
</component>
+ <component name="SvnBranchConfigurationManager">
+ <option name="myVersion" value="123" />
+ </component>
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="svn" />
</component>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2008-12-13 18:49:34
|
Revision: 133
http://cherbot.svn.sourceforge.net/cherbot/?rev=133&view=rev
Author: christianhujer
Date: 2008-12-13 18:49:29 +0000 (Sat, 13 Dec 2008)
Log Message:
-----------
Fixed bugs: Tables were not created, CREATE TABLE statement was wrong. Also improved error verbosity.
Modified Paths:
--------------
trunk/src/prj/net/sf/cherbot/PlayerModule.java
Modified: trunk/src/prj/net/sf/cherbot/PlayerModule.java
===================================================================
--- trunk/src/prj/net/sf/cherbot/PlayerModule.java 2008-12-12 08:52:10 UTC (rev 132)
+++ trunk/src/prj/net/sf/cherbot/PlayerModule.java 2008-12-13 18:49:29 UTC (rev 133)
@@ -25,6 +25,7 @@
/** {@inheritDoc} */
public void load(@NotNull final Connection con) throws SQLException {
+ createTables(con);
final PreparedStatement stmt = con.prepareStatement("SELECT id, serverId, name FROM Player");
final ResultSet result = stmt.executeQuery();
while (result.next()) {
@@ -67,11 +68,12 @@
*/
private void createTables(@NotNull final Connection con) throws SQLException {
try {
- final PreparedStatement stmt = con.prepareStatement("CREATE TABLE Player (id INT, serverId INT, name VARCHAR(32)");
+ final PreparedStatement stmt = con.prepareStatement("CREATE TABLE Player (id INT, serverId INT, name VARCHAR(32))");
stmt.execute();
stmt.close();
} catch (final SQLException ignore) {
System.err.println(ignore);
+ ignore.printStackTrace(System.err);
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2008-12-12 08:52:21
|
Revision: 132
http://cherbot.svn.sourceforge.net/cherbot/?rev=132&view=rev
Author: christianhujer
Date: 2008-12-12 08:52:10 +0000 (Fri, 12 Dec 2008)
Log Message:
-----------
Updated metaserver connection to work with current daimonin metaserver.
Modified Paths:
--------------
trunk/src/prj/net/sf/cherbot/metaserver/MetaServerEntry.java
trunk/src/prj/net/sf/cherbot/metaserver/MetaServerInfo.java
trunk/src/tst/test/net/sf/cherbot/metaserver/MetaServerEntryTest.java
trunk/src/tst/test/net/sf/cherbot/metaserver/MetaServerInfoTest.java
Modified: trunk/src/prj/net/sf/cherbot/metaserver/MetaServerEntry.java
===================================================================
--- trunk/src/prj/net/sf/cherbot/metaserver/MetaServerEntry.java 2008-12-03 21:21:59 UTC (rev 131)
+++ trunk/src/prj/net/sf/cherbot/metaserver/MetaServerEntry.java 2008-12-12 08:52:10 UTC (rev 132)
@@ -20,56 +20,46 @@
private static final long serialVersionUID = 1L;
/** The pattern for parsing an entryString from the metaserver. */
- @NotNull private static final Pattern ENTRY_PATTERN = Pattern.compile("(.*?)\\|(.*?)\\|(.*?)\\|(.*?)\\|(.*?)\\|(.*?)\\|(.*?)\\|(.*?)\\|(.*?)");
+ @NotNull private static final Pattern ENTRY_PATTERN = Pattern.compile("(.*?)\\|(.*?)\\|(.*?)\\|(.*?)\\|(.*?)\\|(.*?)\\|(.*?)");
- /** The ip address of this entry. */
- @NotNull private final String ipaddress;
+ /** The count of this entry. */
+ private final int count;
- /** Unknown1. */
- @NotNull private final String unknown1;
+ /** The name of this entry. */
+ @NotNull private final String name;
- /** The host name of this entry. */
- @NotNull private final String hostname;
+ /** The address of this entry. */
+ @NotNull private final String address;
- /** The number of currently logged in players. */
- private final int playerCount;
+ /** The port of this entry. */
+ private final int port;
/** The version string of this entry's server. */
@NotNull private final String version;
+ /** The number of currently logged in players. */
+ private final int playerCount;
+
/** The description of this entry. */
@NotNull private final String description;
- /** Unknown2. */
- @NotNull private final String unknown2;
-
- /** Unknown3. */
- @NotNull private final String unknown3;
-
- /** Unknown4. */
- @NotNull private final String unknown4;
-
/** Create a MetaServerEntry.
- * @param ipaddress The ip address of this entry.
- * @param unknown1 Unknown1.
- * @param hostname The host name of this entry.
- * @param playerCount The number of currently logged in players.
+ * @param count Unknown value.
+ * @param name The name of the server.
+ * @param address The address of the server.
+ * @param port The port of the server.
* @param version The version string of this entry's server.
+ * @param playerCount The number of currently logged in players.
* @param description The description of this entry.
- * @param unknown2 Unknown2.
- * @param unknown3 Unknown3.
- * @param unknown4 Unknown4.
*/
- public MetaServerEntry(@NotNull final String ipaddress, @NotNull final String unknown1, @NotNull final String hostname, final int playerCount, @NotNull final String version, @NotNull final String description, @NotNull final String unknown2, @NotNull final String unknown3, @NotNull final String unknown4) {
- this.ipaddress = ipaddress;
- this.unknown1 = unknown1;
- this.hostname = hostname;
+ public MetaServerEntry(final int count, @NotNull final String name, @NotNull final String address, final int port, @NotNull final String version, final int playerCount, @NotNull final String description) {
+ this.count = count;
+ this.name = name.replaceAll("_", " ");
+ this.address = address;
+ this.port = port;
+ this.version = version.replaceAll("_", " ");
this.playerCount = playerCount;
- this.version = version;
- this.description = description;
- this.unknown2 = unknown2;
- this.unknown3 = unknown3;
- this.unknown4 = unknown4;
+ this.description = description.replaceAll("_", " ");
}
/** Creates a MetaServerEntry by parsing a single entry String as returned by the metaserer.
@@ -80,39 +70,37 @@
final Matcher matcher = ENTRY_PATTERN.matcher(entryString);
if (matcher.matches()) {
return new MetaServerEntry(
- matcher.group(1),
+ Integer.parseInt(matcher.group(1)),
matcher.group(2),
matcher.group(3),
Integer.parseInt(matcher.group(4)),
matcher.group(5),
- matcher.group(6),
- matcher.group(7),
- matcher.group(8),
- matcher.group(9)
+ Integer.parseInt(matcher.group(6)),
+ matcher.group(7)
);
}
- throw new IllegalArgumentException("supplied String is not a MetaServer string.");
+ throw new IllegalArgumentException("supplied String is not a MetaServer string:\"" + entryString + "\"");
}
- /** Returns the ip address of this entry.
- * @return The ip address of this entry.
+ /** Returns the name of this entry.
+ * @return The name of this entry.
*/
- @NotNull public String getIpaddress() {
- return ipaddress;
+ @NotNull public String getName() {
+ return name;
}
- /** Returns the Unkown1.
- * @return The Unknown1.
+ /** Returns the host name of this entry.
+ * @return The host name of this entry.
*/
- @NotNull public String getUnknown1() {
- return unknown1;
+ @NotNull public String getAddress() {
+ return address;
}
- /** Returns the host name of this entry.
- * @return The host name of this entry.
+ /** Returns the port of this entry.
+ * @return The port of this entry.
*/
- @NotNull public String getHostname() {
- return hostname;
+ public int getPort() {
+ return port;
}
/** Returns the number of currently logged in players.
@@ -136,30 +124,9 @@
return description;
}
- /** Returns the Unkown2.
- * @return The Unknown2.
- */
- @NotNull public String getUnknown2() {
- return unknown2;
- }
-
- /** Returns the Unkown3.
- * @return The Unknown3.
- */
- @NotNull public String getUnknown3() {
- return unknown3;
- }
-
- /** Returns the Unkown4.
- * @return The Unknown4.
- */
- @NotNull public String getUnknown4() {
- return unknown4;
- }
-
/** {@inheritDoc} */
@NotNull public String toString() {
- return hostname + " (" + version + ") " + playerCount + " players. (" + description + ")";
+ return name + "@" + address + ":" + port + " (" + version + ") " + playerCount + " players. (" + description + ")";
}
} // class MetaServerEntry
Modified: trunk/src/prj/net/sf/cherbot/metaserver/MetaServerInfo.java
===================================================================
--- trunk/src/prj/net/sf/cherbot/metaserver/MetaServerInfo.java 2008-12-03 21:21:59 UTC (rev 131)
+++ trunk/src/prj/net/sf/cherbot/metaserver/MetaServerInfo.java 2008-12-12 08:52:10 UTC (rev 132)
@@ -29,7 +29,7 @@
private static final long serialVersionUID = 1L;
/** The default meta server. */
- @NotNull public static final String DEFAULT_META_SERVER_HOST = "damn.informatik.uni-bremen.de";
+ @NotNull public static final String DEFAULT_META_SERVER_HOST = "www.daimonin.com";
/** The default meta port. */
public static final int DEFAULT_META_SERVER_PORT = 13326;
Modified: trunk/src/tst/test/net/sf/cherbot/metaserver/MetaServerEntryTest.java
===================================================================
--- trunk/src/tst/test/net/sf/cherbot/metaserver/MetaServerEntryTest.java 2008-12-03 21:21:59 UTC (rev 131)
+++ trunk/src/tst/test/net/sf/cherbot/metaserver/MetaServerEntryTest.java 2008-12-12 08:52:10 UTC (rev 132)
@@ -15,46 +15,42 @@
*/
public class MetaServerEntryTest {
- /** Tests the constructor {@link net.sf.cherbot.metaserver.MetaServerEntry#MetaServerEntry(String, String, String, int, String, String, String, String, String)} and all related getters. */
+ /** Tests the constructor {@link net.sf.cherbot.metaserver.MetaServerEntry#MetaServerEntry(int, String, String, int, String, int, String)} and all related getters. */
@Test public void testMetaServerEntry() {
- final MetaServerEntry testling = new MetaServerEntry("192.168.0.1", "177", "localhost", 20, "0.9.7", "My own Daimonin server.", "02", "03", "04");
- Assert.assertEquals("ipaddress must be stored.", "192.168.0.1", testling.getIpaddress());
- Assert.assertEquals("unknown1 must be stored.", "177", testling.getUnknown1());
- Assert.assertEquals("hostname must be stored.", "localhost", testling.getHostname());
- Assert.assertEquals("playercount must be stored.", 20, testling.getPlayerCount());
- Assert.assertEquals("version must be stored.", "0.9.7", testling.getVersion());
+ final MetaServerEntry testling = new MetaServerEntry(273, "Dummy Server", "192.168.0.1", 13327, "0.9.7.1", 2, "My_own_Daimonin_server.");
+ Assert.assertEquals("name must be stored.", "Dummy Server", testling.getName());
+ Assert.assertEquals("hostname must be stored.", "192.168.0.1", testling.getAddress());
+ Assert.assertEquals("port must be stored.", 13327, testling.getPort());
+ Assert.assertEquals("version must be stored.", "0.9.7.1", testling.getVersion());
+ Assert.assertEquals("playercount must be stored.", 2, testling.getPlayerCount());
Assert.assertEquals("description must be stored.", "My own Daimonin server.", testling.getDescription());
- Assert.assertEquals("unknown2 must be stored.", "02", testling.getUnknown2());
- Assert.assertEquals("unknown3 must be stored.", "03", testling.getUnknown3());
- Assert.assertEquals("unknown4 must be stored.", "04", testling.getUnknown4());
}
/** Tests the method {@link MetaServerEntry#parse(String)}. */
@Test public void testParse() {
- final MetaServerEntry testling = MetaServerEntry.parse("192.168.0.1|177|localhost|20|0.9.7|My own Daimonin server.|02|03|04");
- Assert.assertEquals("ipaddress must be stored.", "192.168.0.1", testling.getIpaddress());
- Assert.assertEquals("unknown1 must be stored.", "177", testling.getUnknown1());
- Assert.assertEquals("hostname must be stored.", "localhost", testling.getHostname());
+ final MetaServerEntry testling = MetaServerEntry.parse("273|Test_Server|62.75.168.180|13327|0.9.7.1|20|Foo_bar_server.");
+ Assert.assertEquals("name must be stored.", "Test Server", testling.getName());
+ Assert.assertEquals("hostname must be stored.", "62.75.168.180", testling.getAddress());
+ Assert.assertEquals("port must be stored.", 13327, testling.getPort());
+ Assert.assertEquals("version must be stored.", "0.9.7.1", testling.getVersion());
Assert.assertEquals("playercount must be stored.", 20, testling.getPlayerCount());
- Assert.assertEquals("version must be stored.", "0.9.7", testling.getVersion());
- Assert.assertEquals("description must be stored.", "My own Daimonin server.", testling.getDescription());
- Assert.assertEquals("unknown2 must be stored.", "02", testling.getUnknown2());
- Assert.assertEquals("unknown3 must be stored.", "03", testling.getUnknown3());
- Assert.assertEquals("unknown4 must be stored.", "04", testling.getUnknown4());
+ Assert.assertEquals("description must be stored.", "Foo bar server.", testling.getDescription());
}
/** Tests that {@link MetaServerEntry#parse(String)} throws an exception if the supplied string is not a metaserver entry. */
@Test(expected = IllegalArgumentException.class)
public void testParseException() {
- MetaServerEntry.parse("192.168.0.1_177|localhost|20|0.9.7|My own Daimonin server.|02|03|04");
+ MetaServerEntry.parse("273|Test_Server|62.75.168.180|13327|0.9.7.1|20Foo_bar_server.");
}
/** Tests that {@link MetaServerEntry#toString()} returns reasonable data. */
@Test
public void testToString() {
- final MetaServerEntry testling = MetaServerEntry.parse("192.168.0.1|177|localhost|20|0.9.7|My own Daimonin server.|02|03|04");
+ final MetaServerEntry testling = MetaServerEntry.parse("273|Test_Server|62.75.168.180|13327|0.9.7.1|20|Foo_bar_server.");
final String string = testling.toString();
- Assert.assertTrue(string.contains(testling.getHostname()));
+ Assert.assertTrue(string.contains(testling.getName()));
+ Assert.assertTrue(string.contains(testling.getAddress()));
+ Assert.assertTrue(string.contains(Integer.toString(testling.getPort())));
Assert.assertTrue(string.contains(testling.getVersion()));
Assert.assertTrue(string.contains(Integer.toString(testling.getPlayerCount())));
Assert.assertTrue(string.contains(testling.getDescription()));
Modified: trunk/src/tst/test/net/sf/cherbot/metaserver/MetaServerInfoTest.java
===================================================================
--- trunk/src/tst/test/net/sf/cherbot/metaserver/MetaServerInfoTest.java 2008-12-03 21:21:59 UTC (rev 131)
+++ trunk/src/tst/test/net/sf/cherbot/metaserver/MetaServerInfoTest.java 2008-12-12 08:52:10 UTC (rev 132)
@@ -29,21 +29,19 @@
* @throws IOException in case of I/O problems (unexpected).
*/
@Test public void testParse() throws IOException {
- final String metaServerString = "192.168.0.1|177|riedquat|20|0.9.7|My own Daimonin server.|02|03|04\n"
- + "192.168.0.2|177|lave|20|0.9.7|My other Daimonin server.|02|03|04\n";
+ final String metaServerString = "195|Test_Server|62.75.168.180|13327|0.9.7.1|0|See_and_play_here_the_newest_maps_&_features!\n"
+ + "45|Daimonin|62.75.224.80|13327|0.9.7.1|1|Public_Daimonin_game_server_from_www.daimonin.com\n";
final MetaServerInfo testling = new MetaServerInfo();
testling.parse(new BufferedReader(new StringReader(metaServerString)));
Assert.assertEquals("MetaServerInfo now must contain 2 entries.", 2, testling.size());
- Assert.assertEquals("ip address of first entry must be 192.168.0.1.", "192.168.0.1", testling.get(0).getIpaddress());
- Assert.assertEquals("ip address of second entry must be 192.168.0.2.", "192.168.0.2", testling.get(1).getIpaddress());
}
/** Tests whether parsing from a BufferedReader deletes previous entries.
* @throws IOException in case of I/O problems (unexpected).
*/
@Test public void testParseDeletes() throws IOException {
- final String metaServerString = "192.168.0.1|177|riedquat|20|0.9.7|My own Daimonin server.|02|03|04\n"
- + "192.168.0.2|177|lave|20|0.9.7|My other Daimonin server.|02|03|04\n";
+ final String metaServerString = "195|Test_Server|62.75.168.180|13327|0.9.7.1|0|See_and_play_here_the_newest_maps_&_features!\n"
+ + "45|Daimonin|62.75.224.80|13327|0.9.7.1|1|Public_Daimonin_game_server_from_www.daimonin.com\n";
final MetaServerInfo testling = new MetaServerInfo();
testling.parse(new BufferedReader(new StringReader(metaServerString)));
Assert.assertEquals("MetaServerInfo now must contain 2 entries.", 2, testling.size());
@@ -55,13 +53,11 @@
* @throws IOException in case of I/O problems (unexpected).
*/
@Test public void testUpdate() throws IOException {
- final String metaServerString = "192.168.0.1|177|riedquat|20|0.9.7|My own Daimonin server.|02|03|04\n"
- + "192.168.0.2|177|lave|20|0.9.7|My other Daimonin server.|02|03|04\n";
+ final String metaServerString = "195|Test_Server|62.75.168.180|13327|0.9.7.1|0|See_and_play_here_the_newest_maps_&_features!\n"
+ + "45|Daimonin|62.75.224.80|13327|0.9.7.1|1|Public_Daimonin_game_server_from_www.daimonin.com\n";
final MetaServerInfo testling = new MetaServerInfo("", 0);
testling.parse(new BufferedReader(new StringReader(metaServerString)));
Assert.assertEquals("MetaServerInfo now must contain 2 entries.", 2, testling.size());
- Assert.assertEquals("ip address of first entry must be 192.168.0.1.", "192.168.0.1", testling.get(0).getIpaddress());
- Assert.assertEquals("ip address of second entry must be 192.168.0.2.", "192.168.0.2", testling.get(1).getIpaddress());
try {
testling.update();
Assert.fail("Exception expected but not thrown.");
@@ -70,8 +66,6 @@
}
// Verify that the failed update() didn't destroy information.
Assert.assertEquals("MetaServerInfo now still must contain 2 entries.", 2, testling.size());
- Assert.assertEquals("ip address of first entry still must be 192.168.0.1.", "192.168.0.1", testling.get(0).getIpaddress());
- Assert.assertEquals("ip address of second entry still must be 192.168.0.2.", "192.168.0.2", testling.get(1).getIpaddress());
}
} // class MetaServerInfoTest
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2008-12-03 21:22:01
|
Revision: 131
http://cherbot.svn.sourceforge.net/cherbot/?rev=131&view=rev
Author: christianhujer
Date: 2008-12-03 21:21:59 +0000 (Wed, 03 Dec 2008)
Log Message:
-----------
Minor update to the FAQ.
Modified Paths:
--------------
trunk/FAQ
Modified: trunk/FAQ
===================================================================
--- trunk/FAQ 2008-12-01 01:29:00 UTC (rev 130)
+++ trunk/FAQ 2008-12-03 21:21:59 UTC (rev 131)
@@ -24,6 +24,8 @@
A: Yes and yes.
CherBot is officially developed by Daimonin developers.
Bots are not allowed unless explicitely admitted by the server admin.
+ Usually server admins will NOT allow to anybody to run bots.
+ CherBot obviously was an exception.
Q: Why is CherBot offline?
A: The original CherBot used the B3 server protocol.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2008-12-01 01:29:02
|
Revision: 130
http://cherbot.svn.sourceforge.net/cherbot/?rev=130&view=rev
Author: christianhujer
Date: 2008-12-01 01:29:00 +0000 (Mon, 01 Dec 2008)
Log Message:
-----------
Updated FAQ
Modified Paths:
--------------
trunk/FAQ
Modified: trunk/FAQ
===================================================================
--- trunk/FAQ 2008-11-30 22:43:26 UTC (rev 129)
+++ trunk/FAQ 2008-12-01 01:29:00 UTC (rev 130)
@@ -18,3 +18,45 @@
If that is the case, download and install derby.
On some systems, derby is somewhere else.
If that is the case, modify the path to point to your derby.
+
+Q: Is CherBot official?
+ I thought bots are not allowed in Daimonin!
+A: Yes and yes.
+ CherBot is officially developed by Daimonin developers.
+ Bots are not allowed unless explicitely admitted by the server admin.
+
+Q: Why is CherBot offline?
+A: The original CherBot used the B3 server protocol.
+ That server protocol is obsolete.
+ The original CherBot has never been updated to B4.
+ I've started with a new version of CherBot.
+ The new CherBot is not done yet.
+
+Q: Why did you start with a new version instead of continue the old one?
+A: The original version consumed far too much memory.
+ It made massive use of inner classes.
+ After startup, memory consumption was at 55 MB.
+ That's more than Gridarta!
+ In the beginning I didn't care.
+ But then I started running CherBot on a webserver.
+ And there the memory consumption definitely was too high.
+
+Q: When will the new CherBot be done?
+A: I don't know.
+
+Q: What will the new CherBot support?
+A: Cross-server clans
+ Cross-server messages (instant and mail)
+ IRC, Daimonin and Crossfire protocols
+ Better language recognition
+
+Q: Can I take CherBot and create my own version?
+A: Yes you can.
+ CherBot is open source.
+ But why don't you contribute to CherBot instead of branching?
+
+Q: What was the original purpose of CherBot?
+A: Learn about reflecting Java annotations.
+ Some experiments with language recognition.
+ Quick prototyping of possibly useful server features.
+ Fun.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2008-11-30 22:43:29
|
Revision: 129
http://cherbot.svn.sourceforge.net/cherbot/?rev=129&view=rev
Author: christianhujer
Date: 2008-11-30 22:43:26 +0000 (Sun, 30 Nov 2008)
Log Message:
-----------
Improved documentation: shorter sentences, easier to read and understand.
Modified Paths:
--------------
trunk/CREDITS
trunk/FAQ
trunk/INSTALL
trunk/LICENSE
trunk/README
Modified: trunk/CREDITS
===================================================================
--- trunk/CREDITS 2008-11-30 22:28:50 UTC (rev 128)
+++ trunk/CREDITS 2008-11-30 22:43:26 UTC (rev 129)
@@ -7,3 +7,4 @@
CherBot wouldn't exist without the following projects:
* Daimonin, an MMORPG, that has inspired Cher to create CherBot.
+* Ragnor, who's always been an excellent partner in online discussions.
Modified: trunk/FAQ
===================================================================
--- trunk/FAQ 2008-11-30 22:28:50 UTC (rev 128)
+++ trunk/FAQ 2008-11-30 22:43:26 UTC (rev 129)
@@ -2,12 +2,19 @@
---
Q: How do I run CherBot?
-A: Currently CherBot cannot be really run yet. There are only three test modules that you can run:
-* net.sf.cherbot.CherBot
-* net.sf.cherbot.metaserver.MetaServerInfo
-* net.sf.cherbot.IRCConnection
+A: Currently CherBot cannot be really run yet.
+ There are only three test modules that you can run:
+ * net.sf.cherbot.CherBot
+ * net.sf.cherbot.metaserver.MetaServerInfo
+ * net.sf.cherbot.IRCConnection
-Q: When I try to run CherBot I get java.sql.SQLException: No suitable driver found for jdbc:derby:cherbotdb;create=true
-A: You need to have derby.jar on your class path. Try this:
-java -cp CherBot.jar:$JAVA_HOME/db/lib/derby.jar net.sf.cherbot.CherBot
-You may have to replace the path to derby.jar to something else on your system if Derby has been installed outside of JAVA_HOME.
+Q: When I try to run CherBot I get java.sql.SQLException:
+ No suitable driver found for jdbc:derby:cherbotdb;create=true
+A: You need to have derby.jar on your class path.
+ derby.jar is a database system that's used by CherBot.
+ Try this:
+ java -cp CherBot.jar:$JAVA_HOME/db/lib/derby.jar net.sf.cherbot.CherBot
+ On some systems, derby is not available per default.
+ If that is the case, download and install derby.
+ On some systems, derby is somewhere else.
+ If that is the case, modify the path to point to your derby.
Modified: trunk/INSTALL
===================================================================
--- trunk/INSTALL 2008-11-30 22:28:50 UTC (rev 128)
+++ trunk/INSTALL 2008-11-30 22:43:26 UTC (rev 129)
@@ -5,10 +5,10 @@
To build CherBot, you need Java 5.0 and Ant 1.6.5.
-To build CherBot, just run ant in the project's root directory or specifying the
-build.xml in the project's root directory. To find out, what other options
-you have for building CherBot, try "ant -projecthelp".
+To build CherBot, just run ant in the project's root directory.
+Or specifying the build.xml in the project's root directory.
+The build.xml is documented.
+Try "ant -projecthelp" to get the documentation.
-
-To run CherBot, run the .jar file that was created as a result of the build
-process. Run: java -jar CherBot.jar
+To run CherBot, run the .jar file that's been built.
+java -jar CherBot.jar
Modified: trunk/LICENSE
===================================================================
--- trunk/LICENSE 2008-11-30 22:28:50 UTC (rev 128)
+++ trunk/LICENSE 2008-11-30 22:43:26 UTC (rev 129)
@@ -3,7 +3,6 @@
CherBot is licensed under GPL. See file COPYING.
-CherBot uses some third part libraries, especially for building. These
-libraries are contained in the lib/ directory and have their own licenses. See
-the corresponding LICENSE-*-files in the lib/ directory for the licenses of
-third party libraries.
+CherBot uses some third part libraries, especially for building.
+These libraries are contained in the lib/ directory and have their own licenses.
+See the LICENSE-*-files in the lib/ directory for that.
Modified: trunk/README
===================================================================
--- trunk/README 2008-11-30 22:28:50 UTC (rev 128)
+++ trunk/README 2008-11-30 22:43:26 UTC (rev 129)
@@ -1,8 +1,8 @@
CHERBOT README
--------------
-This file contains some important information about CherBot. You should read it
-first.
+This file contains some important information about CherBot.
+You should read it first.
TABLE OF CONTENTS
@@ -19,14 +19,18 @@
PROJECT DESCRIPTION
-CherBot is an information bot for Daimonin which probably would also work pretty
-well with Angelion and to less extent with Crossfire. CherBot keeps track of
-which players collect which items, who's been online, determines a level
-ranking, provides a mail system for mailing offline players, manages clans and
-more.
+CherBot is an information bot for Daimonin.
+It probably would also work pretty well with Angelion and Crossfire.
+CherBot keeps track of some interesting in-game features:
+- information which players collect which items
+- information who's been online
+- player level ranking
+- a mail system for mailing offline players
+- manages clans
+- and more.
-The network code has been temporarily removed because it awaits approval of the
-daimonin server developers.
+The network code has been temporarily removed.
+It will be re-added if it has been approved by the daimonin server developers.
PROJECT WEBSITE
@@ -38,8 +42,8 @@
SYSTEM REQUIREMENTS
Java 5.0
- Previous versions of Java will not work. CherBot uses Generics, autoboxing,
- static imports, foreach loops, assertions and varargs quite a lot.
+ Previous versions of Java will not work.
+ Java 1.6 is recommended.
Ant 1.6.5
Previous versions of Ant might work but are not tested.
@@ -51,8 +55,8 @@
The build file to build the project with Ant.
COPYING
- CherBot license conditions. Note: applies to CherBot only, not third party
- libraries.
+ CherBot license conditions.
+ Note: applies to CherBot only, not third party libraries.
CREDITS
List of project contributors.
@@ -61,17 +65,17 @@
The directory containing generated files.
developer.proprties
- Optional file for changing default settings of the Ant build. You won't
- need to tweak this file for normal building. But if you want to set or
- override properties for build.xml, this is the place to put them.
+ Optional file for changing default settings of the Ant build.
+ You won't need to tweak this file for normal building.
+ But it allows that you set or override properties.
dist/
Generated directory containing distribution archives.
lib/
- Directory containing third part libraries used to build CherBot. Please note
- that these third party libraries have their own license conditions. The
- licenses of the third party libraries are included in the lib/ directory.
+ Directory containing third part libraries used to build CherBot.
+ Note: that these third party libraries have their own license conditions.
+ The licenses of the third party libraries are found in the lib/ directory.
LICENSE
File with license information.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2008-11-30 22:28:52
|
Revision: 128
http://cherbot.svn.sourceforge.net/cherbot/?rev=128&view=rev
Author: christianhujer
Date: 2008-11-30 22:28:50 +0000 (Sun, 30 Nov 2008)
Log Message:
-----------
Corrected soruce formatting.
Modified Paths:
--------------
trunk/src/prj/net/sf/cherbot/Configurator.java
Modified: trunk/src/prj/net/sf/cherbot/Configurator.java
===================================================================
--- trunk/src/prj/net/sf/cherbot/Configurator.java 2008-11-30 22:28:15 UTC (rev 127)
+++ trunk/src/prj/net/sf/cherbot/Configurator.java 2008-11-30 22:28:50 UTC (rev 128)
@@ -47,17 +47,17 @@
initConnection();
serverModule.load(connection);
switch (commandMode) {
- case LIST:
- for (final Server server : serverModule.getServers()) {
- System.out.println(server);
- }
- break;
- case ADD:
- final Server server = new Server(0, args.get(0), Integer.parseInt(args.get(1)), args.get(2));
- serverModule.add(server);
- serverModule.save(connection);
- System.out.println("Successfully added " + server);
- break;
+ case LIST:
+ for (final Server server : serverModule.getServers()) {
+ System.out.println(server);
+ }
+ break;
+ case ADD:
+ final Server server = new Server(0, args.get(0), Integer.parseInt(args.get(1)), args.get(2));
+ serverModule.add(server);
+ serverModule.save(connection);
+ System.out.println("Successfully added " + server);
+ break;
}
return 0;
}
@@ -104,7 +104,12 @@
* @author <a href="mailto:ch...@ri...">Christian Hujer</a>
*/
private enum CommandMode {
- ADD, LIST
+
+ /** Command Mode: Add a configuration entry. */
+ ADD,
+
+ /** Command Mode: List configuration entries. */
+ LIST
}
} // class Configurator
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2008-11-30 22:28:16
|
Revision: 127
http://cherbot.svn.sourceforge.net/cherbot/?rev=127&view=rev
Author: christianhujer
Date: 2008-11-30 22:28:15 +0000 (Sun, 30 Nov 2008)
Log Message:
-----------
Changed project code style settings to correct do not indent case from switch settings.
Modified Paths:
--------------
trunk/cherbot.ipr
Modified: trunk/cherbot.ipr
===================================================================
--- trunk/cherbot.ipr 2008-11-30 22:14:26 UTC (rev 126)
+++ trunk/cherbot.ipr 2008-11-30 22:28:15 UTC (rev 127)
@@ -14,6 +14,7 @@
<option name="PER_PROJECT_SETTINGS">
<value>
<option name="LINE_SEPARATOR" value=" " />
+ <option name="INDENT_CASE_FROM_SWITCH" value="false" />
<option name="ALIGN_MULTILINE_PARAMETERS" value="false" />
<option name="ALIGN_MULTILINE_FOR" value="false" />
<option name="BLANK_LINES_BEFORE_PACKAGE" value="1" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2008-11-30 22:14:28
|
Revision: 126
http://cherbot.svn.sourceforge.net/cherbot/?rev=126&view=rev
Author: christianhujer
Date: 2008-11-30 22:14:26 +0000 (Sun, 30 Nov 2008)
Log Message:
-----------
Minor improvements, e.g. added missing serial versions.
Modified Paths:
--------------
trunk/src/prj/net/sf/cherbot/Clan.java
trunk/src/prj/net/sf/cherbot/ClanModule.java
trunk/src/prj/net/sf/cherbot/connection/CrossfireConnection.java
trunk/src/prj/net/sf/cherbot/connection/DaimoninConnection.java
trunk/src/prj/net/sf/cherbot/connection/IRCConnection.java
trunk/src/prj/net/sf/cherbot/redel/package-info.java
Modified: trunk/src/prj/net/sf/cherbot/Clan.java
===================================================================
--- trunk/src/prj/net/sf/cherbot/Clan.java 2008-11-30 22:03:31 UTC (rev 125)
+++ trunk/src/prj/net/sf/cherbot/Clan.java 2008-11-30 22:14:26 UTC (rev 126)
@@ -1,5 +1,5 @@
/*
- * Copyright © 2007, Christian Hujer and the CherBot developers. All Rights Reserved.
+ * Copyright © 2007 - 2008, Christian Hujer and the CherBot developers. All Rights Reserved.
* License: GNU General Public License v2.0 or newer.
* See file COPYING in the root directory of this project.
*/
@@ -8,8 +8,9 @@
import org.jetbrains.annotations.NotNull;
-/**
- * Created by IntelliJ IDEA.
+/** A Clan.
+ * Clans in Cherbot are maintained by Cherbot, not by the server.
+ * Because of that, clans are independent of the server and can be spread across multiple servers, even different games.
* @author <a href="mailto:ch...@ri...">Christian Hujer</a>
*/
public class Clan {
Modified: trunk/src/prj/net/sf/cherbot/ClanModule.java
===================================================================
--- trunk/src/prj/net/sf/cherbot/ClanModule.java 2008-11-30 22:03:31 UTC (rev 125)
+++ trunk/src/prj/net/sf/cherbot/ClanModule.java 2008-11-30 22:14:26 UTC (rev 126)
@@ -1,5 +1,5 @@
/*
- * Copyright © 2007, Christian Hujer and the CherBot developers. All Rights Reserved.
+ * Copyright © 2007 - 2008, Christian Hujer and the CherBot developers. All Rights Reserved.
* License: GNU General Public License v2.0 or newer.
* See file COPYING in the root directory of this project.
*/
@@ -12,6 +12,7 @@
/** Module for Clans.
* @author <a href="mailto:ch...@ri...">Christian Hujer</a>
+ * @see Clan
*/
public class ClanModule implements PersistentModule {
Modified: trunk/src/prj/net/sf/cherbot/connection/CrossfireConnection.java
===================================================================
--- trunk/src/prj/net/sf/cherbot/connection/CrossfireConnection.java 2008-11-30 22:03:31 UTC (rev 125)
+++ trunk/src/prj/net/sf/cherbot/connection/CrossfireConnection.java 2008-11-30 22:14:26 UTC (rev 126)
@@ -1,5 +1,5 @@
/*
- * Copyright © 2007, Christian Hujer and the CherBot developers. All Rights Reserved.
+ * Copyright © 2007 - 2008, Christian Hujer and the CherBot developers. All Rights Reserved.
* License: GNU General Public License v2.0 or newer.
* See file COPYING in the root directory of this project.
*/
@@ -17,6 +17,9 @@
*/
public class CrossfireConnection extends AbstractCFConnection {
+ /** Serial Version. */
+ private static final long serialVersionUID = 1L;
+
/** Default server host. */
//@NotNull public static final String DEFAULT_CROSSFIRE_HOST = "crossfire.metalforge.net";
@NotNull public static final String DEFAULT_CROSSFIRE_HOST = "127.0.0.1";
Modified: trunk/src/prj/net/sf/cherbot/connection/DaimoninConnection.java
===================================================================
--- trunk/src/prj/net/sf/cherbot/connection/DaimoninConnection.java 2008-11-30 22:03:31 UTC (rev 125)
+++ trunk/src/prj/net/sf/cherbot/connection/DaimoninConnection.java 2008-11-30 22:14:26 UTC (rev 126)
@@ -1,5 +1,5 @@
/*
- * Copyright © 2007, Christian Hujer and the CherBot developers. All Rights Reserved.
+ * Copyright © 2007 - 2008, Christian Hujer and the CherBot developers. All Rights Reserved.
* License: GNU General Public License v2.0 or newer.
* See file COPYING in the root directory of this project.
*/
@@ -17,6 +17,9 @@
*/
public class DaimoninConnection extends AbstractCFConnection {
+ /** Serial Version. */
+ private static final long serialVersionUID = 1L;
+
/** Default server host. */
//@NotNull public static final String DEFAULT_DAIMONIN_HOST = "daimonin.game-server.cc";
@NotNull public static final String DEFAULT_DAIMONIN_HOST = "127.0.0.1";
Modified: trunk/src/prj/net/sf/cherbot/connection/IRCConnection.java
===================================================================
--- trunk/src/prj/net/sf/cherbot/connection/IRCConnection.java 2008-11-30 22:03:31 UTC (rev 125)
+++ trunk/src/prj/net/sf/cherbot/connection/IRCConnection.java 2008-11-30 22:14:26 UTC (rev 126)
@@ -1,5 +1,5 @@
/*
- * Copyright © 2007, Christian Hujer and the CherBot developers. All Rights Reserved.
+ * Copyright © 2007 - 2008, Christian Hujer and the CherBot developers. All Rights Reserved.
* License: GNU General Public License v2.0 or newer.
* See file COPYING in the root directory of this project.
*/
@@ -28,6 +28,9 @@
*/
public class IRCConnection extends AbstractConnection {
+ /** Serial Version. */
+ private static final long serialVersionUID = 1L;
+
/** The default IRC port. */
public static final int DEFAULT_IRC_PORT = 6667;
Modified: trunk/src/prj/net/sf/cherbot/redel/package-info.java
===================================================================
--- trunk/src/prj/net/sf/cherbot/redel/package-info.java 2008-11-30 22:03:31 UTC (rev 125)
+++ trunk/src/prj/net/sf/cherbot/redel/package-info.java 2008-11-30 22:14:26 UTC (rev 126)
@@ -1,5 +1,5 @@
/*
- * Copyright © 2007, Christian Hujer and the CherBot developers. All Rights Reserved.
+ * Copyright © 2007 - 2008, Christian Hujer and the CherBot developers. All Rights Reserved.
* License: GNU General Public License v2.0 or newer.
* See file COPYING in the root directory of this project.
*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <chr...@us...> - 2008-11-30 22:03:33
|
Revision: 125
http://cherbot.svn.sourceforge.net/cherbot/?rev=125&view=rev
Author: christianhujer
Date: 2008-11-30 22:03:31 +0000 (Sun, 30 Nov 2008)
Log Message:
-----------
Change JDK version to latest.
Modified Paths:
--------------
trunk/cherbot.ipr
Modified: trunk/cherbot.ipr
===================================================================
--- trunk/cherbot.ipr 2008-11-30 19:54:09 UTC (rev 124)
+++ trunk/cherbot.ipr 2008-11-30 22:03:31 UTC (rev 125)
@@ -855,7 +855,7 @@
<module fileurl="file://$PROJECT_DIR$/cherbot.iml" filepath="$PROJECT_DIR$/cherbot.iml" />
</modules>
</component>
- <component name="ProjectRootManager" version="2" assert-keyword="true" jdk-15="true" project-jdk-name="1.6" project-jdk-type="JavaSDK">
+ <component name="ProjectRootManager" version="2" assert-keyword="true" jdk-15="true" project-jdk-name="latest" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/ideaclasses" />
</component>
<component name="ResourceManagerContainer">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|