if(sendBehavior == null) {
sendBehavior = new DefaultSendBehavior();
}
final PeerCreator peerCreator;
if (masterPeer != null) {
peerCreator = new PeerCreator(masterPeer.peerCreator(), peerId, keyPair);
} else {
peerCreator = new PeerCreator(p2pID, peerId, keyPair, channelServerConfiguration,
channelClientConfiguration, scheduledExecutorService, sendBehavior);
}
final Peer peer = new Peer(p2pID, peerId, peerCreator);
PeerBean peerBean = peerCreator.peerBean();
peerBean.addPeerStatusListener(peerMap);
ConnectionBean connectionBean = peerCreator.connectionBean();
peerBean.peerMap(peerMap);
peerBean.keyPair(keyPair);
if (bloomfilterFactory == null) {