public class PeerCreator extends Object
| Constructor and Description |
|---|
PeerCreator(int p2pId,
Number160 peerId,
KeyPair keyPair,
ChannelServerConficuration channelServerConficuration,
ChannelClientConfiguration channelClientConfiguration,
PeerStatusListener[] peerStatusListeners,
ScheduledExecutorService timer)
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,
ChannelServerConficuration channelServerConficuration,
ChannelClientConfiguration channelClientConfiguration,
PeerStatusListener[] peerStatusListeners,
ScheduledExecutorService timer)
throws IOException
p2pId - The id of the networkpeerId - The id of this peerkeyPair - The key pair or nullchannelServerConficuration - The server configuration to create the channel server that is
used for listening for incoming connectionschannelClientConfiguration - The client side configurationpeerStatusListeners - The status listener for offline peersIOException - 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.