public class TestWithNetworkConnections extends Object
Modifier and Type | Class and Description |
---|---|
static class |
TestWithNetworkConnections.ClientType |
Modifier and Type | Field and Description |
---|---|
protected Address |
address |
protected BlockChain |
blockChain |
protected BlockStore |
blockStore |
protected ECKey |
key |
protected BlockingQueue<InboundMessageQueuer> |
newPeerWriteTargetQueue |
static int |
PEER_SERVERS |
protected SocketAddress |
socketAddress |
protected NetworkParameters |
unitTestParams |
protected Wallet |
wallet |
Constructor and Description |
---|
TestWithNetworkConnections(TestWithNetworkConnections.ClientType clientType) |
Modifier and Type | Method and Description |
---|---|
protected void |
closePeer(Peer peer) |
protected InboundMessageQueuer |
connect(Peer peer,
VersionMessage versionMessage) |
protected void |
inbound(InboundMessageQueuer peerChannel,
Message message) |
protected Message |
outbound(InboundMessageQueuer p1) |
protected Peer |
peerOf(InboundMessageQueuer ch) |
protected void |
pingAndWait(InboundMessageQueuer p) |
void |
setUp() |
void |
setUp(BlockStore blockStore) |
protected void |
startPeerServer(int i) |
protected void |
startPeerServers() |
protected void |
stopPeerServer(int i) |
protected void |
stopPeerServers() |
void |
tearDown() |
protected Message |
waitForOutbound(InboundMessageQueuer ch) |
public static final int PEER_SERVERS
protected NetworkParameters unitTestParams
protected BlockStore blockStore
protected BlockChain blockChain
protected Wallet wallet
protected ECKey key
protected Address address
protected SocketAddress socketAddress
protected final BlockingQueue<InboundMessageQueuer> newPeerWriteTargetQueue
public TestWithNetworkConnections(TestWithNetworkConnections.ClientType clientType)
public void setUp(BlockStore blockStore) throws Exception
Exception
protected void startPeerServers() throws IOException
IOException
protected void startPeerServer(int i) throws IOException
IOException
protected void stopPeerServers()
protected void stopPeerServer(int i)
protected InboundMessageQueuer connect(Peer peer, VersionMessage versionMessage) throws Exception
Exception
protected void inbound(InboundMessageQueuer peerChannel, Message message)
protected void pingAndWait(InboundMessageQueuer p) throws Exception
Exception
protected Message outbound(InboundMessageQueuer p1) throws Exception
Exception
protected Message waitForOutbound(InboundMessageQueuer ch) throws InterruptedException
InterruptedException
protected Peer peerOf(InboundMessageQueuer ch)
Copyright © 2014. All rights reserved.