jrunx.iiop
Class IIOPSSLSocketFactory

jrunx.iiop.IIOPSSLSocketFactory
All Implemented Interfaces:
java.io.Serializable

public class IIOPSSLSocketFactory
implements java.io.Serializable

This is socket factory used to create either plain sockets or SSL sockets based on the target's policies and the client policies.

Author:
Vivek Nagar
See Also:
Serialized Form

Constructor Summary
IIOPSSLSocketFactory()
          Constructs an IIOPSSLSocketFactory
 
Method Summary
 java.net.ServerSocket createServerSocket(java.lang.String type, int port)
          Create a server socket on the specified port (port 0 indicates an anonymous port) based on the type of the server socket (SSL, SSL_MUTUALAUTH, PERSISTENT_SSL or CLEAR_TEXT).
 java.net.Socket createSocket(com.sun.corba.ee.connection.EndPointInfo endPointInfo)
          Create a client socket for the specified endpoint.
 com.sun.corba.ee.connection.EndPointInfo getEndPointInfo(org.omg.CORBA.ORB orb, com.sun.corba.ee.internal.core.IOR ior, com.sun.corba.ee.connection.EndPointInfo endPointInfo)
          Get the endpoint information for the specified IOR.
static void setFactories(com.sun.net.ssl.KeyManagerFactory k, com.sun.net.ssl.TrustManagerFactory t)
           
static java.lang.String[] stringToArray(java.lang.String from, java.lang.String separator)
          Convert a string of delimited strings to an array of strings.
 

Constructor Detail

IIOPSSLSocketFactory

public IIOPSSLSocketFactory()
Constructs an IIOPSSLSocketFactory
Method Detail

stringToArray

public static java.lang.String[] stringToArray(java.lang.String from,
                                               java.lang.String separator)
Convert a string of delimited strings to an array of strings. Similar to AWK's and Tcl's split.
Parameters:
from - the string to convert
separator - the delimiter

createServerSocket

public java.net.ServerSocket createServerSocket(java.lang.String type,
                                                int port)
                                         throws java.io.IOException
Create a server socket on the specified port (port 0 indicates an anonymous port) based on the type of the server socket (SSL, SSL_MUTUALAUTH, PERSISTENT_SSL or CLEAR_TEXT).
Parameters:
the - type of socket to create.
port - the port number
Returns:
the server socket on the specified port
Throws:
java.io.IOException - if an I/O error occurs during server socket creation

getEndPointInfo

public com.sun.corba.ee.connection.EndPointInfo getEndPointInfo(org.omg.CORBA.ORB orb,
                                                                com.sun.corba.ee.internal.core.IOR ior,
                                                                com.sun.corba.ee.connection.EndPointInfo endPointInfo)
Get the endpoint information for the specified IOR. This chooses the type of socket to create and the port based on the information in the IOR (target policy) and the client policy.
Parameters:
the - ORB instance.
the - target IOR.
Returns:
the endpoint information.

createSocket

public java.net.Socket createSocket(com.sun.corba.ee.connection.EndPointInfo endPointInfo)
                             throws java.io.IOException,
                                    com.sun.corba.ee.connection.GetEndPointInfoAgainException
Create a client socket for the specified endpoint. Creates an SSL socket if the type specified is SSL or SSL_MUTUALAUTH.
Parameters:
the - endpoint info.
Returns:
the socket.

setFactories

public static void setFactories(com.sun.net.ssl.KeyManagerFactory k,
                                com.sun.net.ssl.TrustManagerFactory t)


Copyright � 2002 Macromedia Corporation. All Rights Reserved.