p2ps.imp.peer
Class DefaultPeerFactory

java.lang.Object
  extended byp2ps.imp.peer.DefaultPeerFactory
All Implemented Interfaces:
PeerFactoryInterface

public class DefaultPeerFactory
extends java.lang.Object
implements PeerFactoryInterface

An implementation of the PeerFactoryInterface for PeerImp instances

Version:
$Revision: 295 $
Author:
Ian Wang

Constructor Summary
DefaultPeerFactory()
           
 
Method Summary
 Peer newPeer(Config config, char[] password)
           
 Peer newPeer(Peer parent)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultPeerFactory

public DefaultPeerFactory()
Method Detail

newPeer

public Peer newPeer(Config config,
                    char[] password)
             throws InitializationException,
                    java.io.IOException
Specified by:
newPeer in interface PeerFactoryInterface
Returns:
a new peer instance with the specified config
Throws:
InitializationException
java.io.IOException

newPeer

public Peer newPeer(Peer parent)
             throws InitializationException,
                    java.io.IOException
Specified by:
newPeer in interface PeerFactoryInterface
Returns:
a new group peer with the specified parent. The configuration is taken from the parent, with standard modifications such as disabling discovery pipes.
Throws:
InitializationException
java.io.IOException