public class PeerCreator extends Object
| Constructor and Description |
|---|
PeerCreator(int p2pId,
Number160 peerId,
KeyPair keyPair,
ChannelServerConfiguration channelServerConfiguration,
ChannelClientConfiguration channelClientConfiguration,
ScheduledExecutorService timer,
SendBehavior sendBehavior)
Creates a master peer and starts UPD and TCP channels.
|
PeerCreator(PeerCreator parent,
Number160 peerId,
KeyPair keyPair)
Creates a slave peer that will attach itself to a master peer.
|
| Modifier and Type | Method and Description |
|---|---|
ConnectionBean |
connectionBean() |
PeerBean |
peerBean() |
FutureDone<Void> |
shutdown()
Shutdown the peer.
|
FutureDone<Void> |
shutdownFuture() |
public PeerCreator(int p2pId,
Number160 peerId,
KeyPair keyPair,
ChannelServerConfiguration channelServerConfiguration,
ChannelClientConfiguration channelClientConfiguration,
ScheduledExecutorService timer,
SendBehavior sendBehavior)
throws IOException
p2pId - The id of the networkpeerId - The id of this peerkeyPair - The key pair or nullchannelServerConfiguration - The server configuration to create the channel server that is
used for listening for incoming connectionschannelClientConfiguration - The client side configurationtimer - The executor servicesendBehavior - The sending behavior for direct messagesIOException - If the startup of listening to connections failedpublic PeerCreator(PeerCreator parent, Number160 peerId, KeyPair keyPair)
parent - The parent peerpeerId - The id of this peerkeyPair - The key pair or nullpublic FutureDone<Void> shutdown()
public FutureDone<Void> shutdownFuture()
shutdown()public PeerBean peerBean()
public ConnectionBean connectionBean()
Copyright © 2014. All rights reserved.