summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-10-10 03:11:18 (EDT)
committerEike Stepper2007-10-10 03:11:18 (EDT)
commit8150f3813f51d94dcddfb4df901f6116f460308f (patch)
tree57c9d90b74248a24319639fd8c8e38047b79a604
parent31888087817220d210d69f065908747a1099f530 (diff)
downloadcdo-8150f3813f51d94dcddfb4df901f6116f460308f.zip
cdo-8150f3813f51d94dcddfb4df901f6116f460308f.tar.gz
cdo-8150f3813f51d94dcddfb4df901f6116f460308f.tar.bz2
[205877] NoConnectionPendingException in ConnectorTest
https://bugs.eclipse.org/bugs/show_bug.cgi?id=205877
-rw-r--r--plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPAcceptor.java2
-rw-r--r--plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPConnector.java10
-rw-r--r--plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPSelector.java10
3 files changed, 11 insertions, 11 deletions
diff --git a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPAcceptor.java b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPAcceptor.java
index 7afa077..3c16ca4 100644
--- a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPAcceptor.java
+++ b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPAcceptor.java
@@ -236,7 +236,7 @@ public class TCPAcceptor extends Acceptor implements ITCPAcceptor, ITCPSelectorL
super.doActivate();
serverSocketChannel = ServerSocketChannel.open();
serverSocketChannel.configureBlocking(false);
- selector.register(serverSocketChannel, this);
+ selector.orderRegistration(serverSocketChannel, this);
if (startSynchronously)
{
diff --git a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPConnector.java b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPConnector.java
index 3c3ec31..39ce603 100644
--- a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPConnector.java
+++ b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPConnector.java
@@ -117,7 +117,7 @@ public abstract class TCPConnector extends Connector implements ITCPConnector, I
public void multiplexBuffer(IChannel channel)
{
checkSelectionKey();
- selector.setWriteInterest(selectionKey, isClient(), true);
+ selector.orderWriteInterest(selectionKey, isClient(), true);
}
public void handleRegistration(SelectionKey selectionKey)
@@ -135,8 +135,8 @@ public abstract class TCPConnector extends Connector implements ITCPConnector, I
{
if (channel.finishConnect())
{
- selector.setConnectInterest(selectionKey, true, false);
- selector.setReadInterest(selectionKey, true, true);
+ selector.orderConnectInterest(selectionKey, true, false);
+ selector.orderReadInterest(selectionKey, true, true);
leaveConnecting();
}
}
@@ -236,7 +236,7 @@ public abstract class TCPConnector extends Connector implements ITCPConnector, I
if (!moreToWrite)
{
checkSelectionKey();
- selector.setWriteInterest(selectionKey, isClient(), false);
+ selector.orderWriteInterest(selectionKey, isClient(), false);
}
}
catch (NullPointerException ignore)
@@ -358,7 +358,7 @@ public abstract class TCPConnector extends Connector implements ITCPConnector, I
super.doActivate();
controlChannel = new ControlChannel(getNextChannelID(), this);
controlChannel.activate();
- selector.register(socketChannel, isClient(), this);
+ selector.orderRegistration(socketChannel, isClient(), this);
}
@Override
diff --git a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPSelector.java b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPSelector.java
index 4c98995..0837784 100644
--- a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPSelector.java
+++ b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPSelector.java
@@ -52,7 +52,7 @@ public class TCPSelector extends Lifecycle implements ITCPSelector, Runnable
{
}
- public void register(final ServerSocketChannel channel, final Passive listener)
+ public void orderRegistration(final ServerSocketChannel channel, final Passive listener)
{
assertValidListener(listener);
order(false, new Runnable()
@@ -70,7 +70,7 @@ public class TCPSelector extends Lifecycle implements ITCPSelector, Runnable
});
}
- public void register(final SocketChannel channel, final boolean client, final Active listener)
+ public void orderRegistration(final SocketChannel channel, final boolean client, final Active listener)
{
assertValidListener(listener);
order(client, new Runnable()
@@ -88,7 +88,7 @@ public class TCPSelector extends Lifecycle implements ITCPSelector, Runnable
});
}
- public void setConnectInterest(final SelectionKey selectionKey, boolean client, final boolean on)
+ public void orderConnectInterest(final SelectionKey selectionKey, boolean client, final boolean on)
{
order(client, new Runnable()
{
@@ -105,7 +105,7 @@ public class TCPSelector extends Lifecycle implements ITCPSelector, Runnable
});
}
- public void setReadInterest(final SelectionKey selectionKey, boolean client, final boolean on)
+ public void orderReadInterest(final SelectionKey selectionKey, boolean client, final boolean on)
{
order(client, new Runnable()
{
@@ -122,7 +122,7 @@ public class TCPSelector extends Lifecycle implements ITCPSelector, Runnable
});
}
- public void setWriteInterest(final SelectionKey selectionKey, boolean client, final boolean on)
+ public void orderWriteInterest(final SelectionKey selectionKey, boolean client, final boolean on)
{
order(client, new Runnable()
{