Author: david.lloyd(a)jboss.com
Date: 2008-07-21 10:10:27 -0400 (Mon, 21 Jul 2008)
New Revision: 4416
Modified:
remoting3/trunk/protocol/basic/src/test/java/org/jboss/cx/remoting/protocol/basic/ConnectionTestCase.java
Log:
Organize for readability
Modified:
remoting3/trunk/protocol/basic/src/test/java/org/jboss/cx/remoting/protocol/basic/ConnectionTestCase.java
===================================================================
---
remoting3/trunk/protocol/basic/src/test/java/org/jboss/cx/remoting/protocol/basic/ConnectionTestCase.java 2008-07-21
13:16:30 UTC (rev 4415)
+++
remoting3/trunk/protocol/basic/src/test/java/org/jboss/cx/remoting/protocol/basic/ConnectionTestCase.java 2008-07-21
14:10:27 UTC (rev 4416)
@@ -26,7 +26,6 @@
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
-import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import java.net.InetSocketAddress;
@@ -47,7 +46,6 @@
import org.jboss.xnio.IoUtils;
import org.jboss.xnio.Xnio;
import org.jboss.xnio.IoHandlerFactory;
-import org.jboss.xnio.ConfigurableFactory;
import org.jboss.xnio.IoFuture;
import org.jboss.xnio.TcpClient;
import org.jboss.xnio.ChannelSource;
@@ -100,11 +98,9 @@
serviceRegistry.bind(serviceEndpointHandle.getResource(),
13);
final IoHandlerFactory<AllocatedMessageChannel>
handlerFactory = BasicProtocol.createServer(closeableExecutor, allocator,
serviceRegistry);
final IoHandlerFactory<StreamChannel> newHandlerFactory
= Channels.convertStreamToAllocatedMessage(handlerFactory, 32768, 32768);
- final ConfigurableFactory<Closeable> tcpServerFactory =
xnio.createTcpServer(newHandlerFactory, new InetSocketAddress(12345));
- final Closeable tcpServerCloseable =
tcpServerFactory.create();
+ final Closeable tcpServerCloseable =
xnio.createTcpServer(newHandlerFactory, new InetSocketAddress(12345)).create();
try {
- final ConfigurableFactory<CloseableTcpConnector>
connectorFactory = xnio.createTcpConnector();
- final CloseableTcpConnector connector =
connectorFactory.create();
+ final CloseableTcpConnector connector =
xnio.createTcpConnector().create();
try {
final TcpClient tcpClient =
connector.createChannelSource(new InetSocketAddress("localhost", 12345));
final ChannelSource<AllocatedMessageChannel>
channelSource = Channels.convertStreamToAllocatedMessage(tcpClient, 32768, 32768);
@@ -113,8 +109,7 @@
try {
final Handle<RemoteServiceEndpoint>
handleThirteen = connection.getServiceForId(13);
try {
- final RemoteServiceEndpoint serviceThirteen =
handleThirteen.getResource();
- final ClientSource<Object,Object>
clientSource = endpoint.createClientSource(serviceThirteen);
+ final ClientSource<Object,Object>
clientSource = endpoint.createClientSource(handleThirteen.getResource());
try {
final Client<Object,Object> client
= clientSource.createClient();
try {
Show replies by date