p2ps.peer
Class PeerFactory

java.lang.Object
  extended byp2ps.peer.PeerFactory

public class PeerFactory
extends java.lang.Object

A factory class for creating Peer instances

Version:
$Revision: 295 $
Author:
Ian Wang

Field Summary
static PeerFactoryInterface factory
           
 
Constructor Summary
PeerFactory()
           
 
Method Summary
static Peer newPeer(Config config)
          Creates a new peer with the specified config
static Peer newPeer(Config config, char[] password)
          Creates a new peer with the specified config
static Peer newPeer(Peer parent)
          Creates a new group peer belonging with the given parent.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

factory

public static PeerFactoryInterface factory
Constructor Detail

PeerFactory

public PeerFactory()
Method Detail

newPeer

public static Peer newPeer(Config config)
                    throws InitializationException,
                           java.io.IOException
Creates a new peer with the specified config

Throws:
InitializationException
java.io.IOException

newPeer

public static Peer newPeer(Config config,
                           char[] password)
                    throws InitializationException,
                           java.io.IOException
Creates a new peer with the specified config

Throws:
InitializationException
java.io.IOException

newPeer

public static Peer newPeer(Peer parent)
                    throws InitializationException,
                           java.io.IOException
Creates a new group peer belonging with the given parent. The configuration is taken from the parent, with standard modifications such as disabling discovery pipes.

Throws:
InitializationException
java.io.IOException