summaryrefslogtreecommitdiffstats
path: root/libjava/gnu/java/net
diff options
context:
space:
mode:
authormembar <membar@138bc75d-0d04-0410-961f-82ee72b054a4>2004-01-30 13:43:21 +0000
committermembar <membar@138bc75d-0d04-0410-961f-82ee72b054a4>2004-01-30 13:43:21 +0000
commitc84ee5906d9eec1122bcd768f6256744d351f322 (patch)
tree49b741adeec23a17d6a07df2869147de34f24174 /libjava/gnu/java/net
parent18f7351bba9d8e3cb2749017514a6cf277dbe6c1 (diff)
downloadppe42-gcc-c84ee5906d9eec1122bcd768f6256744d351f322.tar.gz
ppe42-gcc-c84ee5906d9eec1122bcd768f6256744d351f322.zip
* gnu/java/net/PlainSocketImpl.java
(inChannelOperation): New field. (isInChannelOperation): New accessor. (setInChannelOperation): New modifier. * gnu/java/nio/ServerSocketChannelImpl.java (accept): Set and reset our server socket's PlainSocketImpl's "in channel operation" indicator before and after delegating the accept to our server socket. * gnu/java/nio/SocketChannelImpl.java (connect): Set and reset our socket's PlainSocketImpl's "in channel operation" indicator before and after delegating the operation to our socket. (read): Likewise. (write): Likewise. * java/net/ServerSocket.java (implAccept): Don't throw an IllegalBlockingModeException if we have a non-blocking channel which initiated this accept operation. * java/net/Socket.java (connect): Don't throw an IllegalBlockingModeException if we have a non-blocking channel which initiated this connect operation. * java/nio/channels/spi/AbstractSelectableChannel.java (configureBlocking): Only call implConfigureBlocking() if the desired blocking mode is different from our current one. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@76956 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/gnu/java/net')
-rw-r--r--libjava/gnu/java/net/PlainSocketImpl.java29
1 files changed, 28 insertions, 1 deletions
diff --git a/libjava/gnu/java/net/PlainSocketImpl.java b/libjava/gnu/java/net/PlainSocketImpl.java
index 80139115cfe..5680fb30cbe 100644
--- a/libjava/gnu/java/net/PlainSocketImpl.java
+++ b/libjava/gnu/java/net/PlainSocketImpl.java
@@ -1,5 +1,5 @@
/* PlainSocketImpl.java -- Default socket implementation
- Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003
+ Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -120,6 +120,33 @@ public final class PlainSocketImpl extends SocketImpl
private OutputStream out;
/**
+ * Indicates whether a channel initiated whatever operation
+ * is being invoked on this socket.
+ */
+ private boolean inChannelOperation;
+
+ /**
+ * Indicates whether we should ignore whether any associated
+ * channel is set to non-blocking mode. Certain operations
+ * throw an <code>IllegalBlockingModeException</code> if the
+ * associated channel is in non-blocking mode, <i>except</i>
+ * if the operation is invoked by the channel itself.
+ */
+ public final boolean isInChannelOperation()
+ {
+ return inChannelOperation;
+ }
+
+ /**
+ * Sets our indicator of whether an I/O operation is being
+ * initiated by a channel.
+ */
+ public final void setInChannelOperation(boolean b)
+ {
+ inChannelOperation = b;
+ }
+
+ /**
* Default do nothing constructor
*/
public PlainSocketImpl()
OpenPOWER on IntegriCloud