peerbase.socket
Class NormalSocketFactory

java.lang.Object
  extended by peerbase.socket.SocketFactory
      extended by peerbase.socket.NormalSocketFactory

public class NormalSocketFactory
extends SocketFactory


Constructor Summary
NormalSocketFactory()
           
 
Method Summary
 SocketInterface makeSocket(java.net.Socket socket)
          Constructs a new SocketInterface object, encapsulating a standard Java API Socket object.
 SocketInterface makeSocket(java.lang.String host, int port)
          Constructs a new socket object, appropriate to the purpose of the factory.
 
Methods inherited from class peerbase.socket.SocketFactory
getSocketFactory, setSocketFactory
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NormalSocketFactory

public NormalSocketFactory()
Method Detail

makeSocket

public SocketInterface makeSocket(java.lang.String host,
                                  int port)
                           throws java.io.IOException,
                                  java.net.UnknownHostException
Description copied from class: SocketFactory
Constructs a new socket object, appropriate to the purpose of the factory.

Specified by:
makeSocket in class SocketFactory
Parameters:
host - the host name
port - the port number
Returns:
a socket connection object
Throws:
java.io.IOException
java.net.UnknownHostException

makeSocket

public SocketInterface makeSocket(java.net.Socket socket)
                           throws java.io.IOException
Description copied from class: SocketFactory
Constructs a new SocketInterface object, encapsulating a standard Java API Socket object.

Specified by:
makeSocket in class SocketFactory
Parameters:
socket - the socket to encapsulate
Returns:
a socket connection object
Throws:
java.io.IOException