[Cherbot-commit] SF.net SVN: cherbot:[138] trunk/src/prj/net/sf/cherbot/connection/ ConsoleConnecti
Status: Alpha
Brought to you by:
christianhujer
|
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.
|