3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-01-31 07:12:17 +00:00

Reformat FakeChannel.

This commit is contained in:
Mike Hearn 2012-12-06 15:01:17 +01:00
parent 4989ecf15a
commit 7bfef81664

View File

@ -1,12 +1,12 @@
package com.google.bitcoin.core; package com.google.bitcoin.core;
import org.jboss.netty.channel.*;
import org.jboss.netty.util.internal.QueueFactory;
import java.net.InetSocketAddress; import java.net.InetSocketAddress;
import java.net.SocketAddress; import java.net.SocketAddress;
import java.util.concurrent.BlockingQueue; import java.util.concurrent.BlockingQueue;
import org.jboss.netty.channel.*;
import org.jboss.netty.util.internal.QueueFactory;
public class FakeChannel extends AbstractChannel { public class FakeChannel extends AbstractChannel {
final BlockingQueue<ChannelEvent> events = QueueFactory.createQueue(ChannelEvent.class); final BlockingQueue<ChannelEvent> events = QueueFactory.createQueue(ChannelEvent.class);
@ -14,8 +14,7 @@ public class FakeChannel extends AbstractChannel {
private SocketAddress localAddress; private SocketAddress localAddress;
private SocketAddress remoteAddress; private SocketAddress remoteAddress;
protected FakeChannel(ChannelFactory factory, protected FakeChannel(ChannelFactory factory, ChannelPipeline pipeline, ChannelSink sink) {
ChannelPipeline pipeline, ChannelSink sink) {
super(null, factory, pipeline, sink); super(null, factory, pipeline, sink);
config = new DefaultChannelConfig(); config = new DefaultChannelConfig();
localAddress = new InetSocketAddress("127.0.0.1", 2000); localAddress = new InetSocketAddress("127.0.0.1", 2000);
@ -47,7 +46,6 @@ public class FakeChannel extends AbstractChannel {
return true; return true;
} }
public ChannelEvent nextEvent() { public ChannelEvent nextEvent() {
return events.poll(); return events.poll();
} }