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 Context |
context |
protected ECKey |
key |
protected BlockingQueue<InboundMessageQueuer> |
newPeerWriteTargetQueue |
protected NetworkParameters |
params |
static int |
PEER_SERVERS |
protected SocketAddress |
socketAddress |
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 final NetworkParameters params
protected Context context
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
Exceptionprotected void startPeerServers()
throws IOException
IOExceptionprotected void startPeerServer(int i)
throws IOException
IOExceptionprotected void stopPeerServers()
protected void stopPeerServer(int i)
protected InboundMessageQueuer connect(Peer peer, VersionMessage versionMessage) throws Exception
Exceptionprotected void inbound(InboundMessageQueuer peerChannel, Message message)
protected void pingAndWait(InboundMessageQueuer p) throws Exception
Exceptionprotected Message outbound(InboundMessageQueuer p1) throws Exception
Exceptionprotected Message waitForOutbound(InboundMessageQueuer ch) throws InterruptedException
InterruptedExceptionprotected Peer peerOf(InboundMessageQueuer ch)
Copyright © 2015. All rights reserved.