org.jacorb.orb.factory
Interface SocketFactory

All Known Implementing Classes:
AbstractSocketFactory, DefaultSocketFactory, FixedAddressSocketFactory, PortRangeSocketFactory

public interface SocketFactory

SocketFactory is used by JacORB to create the client-side socket for an outgoing connection.

Version:
$Id: SocketFactory.java,v 1.10 2009-04-07 16:07:28 alexander.bykov Exp $
Author:
Gerald Brose

Method Summary
 java.net.Socket createSocket(java.lang.String host, int port)
          create a connected stream Socket.
 java.net.Socket createSocket(java.lang.String host, int port, int timeout)
          create a connected stream Socket.
 boolean isSSL(java.net.Socket socket)
           
 

Method Detail

createSocket

java.net.Socket createSocket(java.lang.String host,
                             int port)
                             throws java.io.IOException
create a connected stream Socket.

Parameters:
host - the host name
port - the port number
Returns:
a connected stream Socket
Throws:
java.io.IOException

createSocket

java.net.Socket createSocket(java.lang.String host,
                             int port,
                             int timeout)
                             throws java.io.IOException,
                                    TIMEOUT
create a connected stream Socket. Compliant implementations must ensure to throw org.omg.CORBA.TIMEOUT in case a timeout occurs instead of the SocketTimeoutException thats available in the JDK.

Parameters:
host - the host name
port - the port number
timeout - the timeout value to be used in milliseconds
Returns:
a connected stream Socket
Throws:
java.io.IOException
TIMEOUT - if a timeout occurs during connect.

isSSL

boolean isSSL(java.net.Socket socket)
Returns:
true if the specified socket supports SSL.