[Cherbot-commit] SF.net SVN: cherbot: [87] trunk/src/net/sf/cherbot/AbstractConnection.java
Status: Alpha
Brought to you by:
christianhujer
|
From: <chr...@us...> - 2007-06-20 20:28:05
|
Revision: 87
http://svn.sourceforge.net/cherbot/?rev=87&view=rev
Author: christianhujer
Date: 2007-06-20 13:28:03 -0700 (Wed, 20 Jun 2007)
Log Message:
-----------
Allow setSocket() to throw IOException in case an overriding method wants to use the socket when it's being set.
Modified Paths:
--------------
trunk/src/net/sf/cherbot/AbstractConnection.java
Modified: trunk/src/net/sf/cherbot/AbstractConnection.java
===================================================================
--- trunk/src/net/sf/cherbot/AbstractConnection.java 2007-06-20 20:14:55 UTC (rev 86)
+++ trunk/src/net/sf/cherbot/AbstractConnection.java 2007-06-20 20:28:03 UTC (rev 87)
@@ -6,15 +6,15 @@
package net.sf.cherbot;
+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;
-import java.net.Socket;
-import java.io.IOException;
-import java.io.Closeable;
-import java.io.Serializable;
/** An AbstractConnection represents the connection to a server and has one or more channels.
* Connections are implemented as command bean.
@@ -109,8 +109,9 @@
/** 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) {
+ public void setSocket(@NotNull final Socket socket) throws IOException {
this.socket = socket;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|