com.ibm.di.api.remote.impl.rmi
Class SSLRMIServerSocketFactory

java.lang.Object
  extended by com.ibm.di.api.remote.impl.rmi.SSLRMIServerSocketFactory
All Implemented Interfaces:
RMIServerSocketFactory

public class SSLRMIServerSocketFactory
extends Object
implements RMIServerSocketFactory

Instances of this class are used by the RMI to obtain SSL server sockets for RMI calls. This class implements RMIServerSocketFactory interface.


Constructor Summary
SSLRMIServerSocketFactory()
          Creates SSLRMIServerSocketFactory object.
SSLRMIServerSocketFactory(BindAddressPolicy bindAddrPol)
          Creates SSLRMIServerSocketFactory object.
SSLRMIServerSocketFactory(boolean aUseCustomSecuritySettings)
          Creates SSLRMIServerSocketFactory object with specified or not use of custom settings.
SSLRMIServerSocketFactory(boolean aUseCustomSecuritySettings, BindAddressPolicy bindAddrPol)
          Creates SSLRMIServerSocketFactory object with specified or not use of custom settings.
SSLRMIServerSocketFactory(boolean aUseCustomSecuritySettings, boolean isTDIServerSide)
          Creates SSLRMIServerSocketFactory object with specified or not use of custom settings and stash.
SSLRMIServerSocketFactory(boolean aUseCustomSecuritySettings, boolean isTDIServerSide, BindAddressPolicy bindAddrPol)
          Creates SSLRMIServerSocketFactory object with specified or not use of custom settings and stash.
 
Method Summary
 ServerSocket createServerSocket(int aPort)
          Create a server socket on the specified port (port 0 indicates an anonymous port).
 boolean equals(Object obj)
          Indicates whether some other object is "equal to" this one.
static Principal getLocalThreadPrincipal()
          Gets the local thread principal.
 int hashCode()
          Returns a hash code value for the object.
protected static void setLocalThreadSocket(Socket aSocket)
          Sets the local thread socket.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SSLRMIServerSocketFactory

public SSLRMIServerSocketFactory()
Creates SSLRMIServerSocketFactory object.


SSLRMIServerSocketFactory

public SSLRMIServerSocketFactory(BindAddressPolicy bindAddrPol)
Creates SSLRMIServerSocketFactory object.

Parameters:
bindAddrPol - Object for obtaining the bind addresses from.

SSLRMIServerSocketFactory

public SSLRMIServerSocketFactory(boolean aUseCustomSecuritySettings)
                          throws Exception
Creates SSLRMIServerSocketFactory object with specified or not use of custom settings.

Parameters:
aUseCustomSecuritySettings - whether to use custom security settings or not
Throws:
Exception - if the security protocol is not available in the default provider package or any of the other provider packages that were searched.

SSLRMIServerSocketFactory

public SSLRMIServerSocketFactory(boolean aUseCustomSecuritySettings,
                                 BindAddressPolicy bindAddrPol)
                          throws Exception
Creates SSLRMIServerSocketFactory object with specified or not use of custom settings.

Parameters:
aUseCustomSecuritySettings - whether to use custom security settings or not
bindAddrPol - Object for obtaining the bind addresses from.
Throws:
Exception - if the security protocol is not available in the default provider package or any of the other provider packages that were searched.

SSLRMIServerSocketFactory

public SSLRMIServerSocketFactory(boolean aUseCustomSecuritySettings,
                                 boolean isTDIServerSide)
                          throws Exception
Creates SSLRMIServerSocketFactory object with specified or not use of custom settings and stash.

Parameters:
aUseCustomSecuritySettings - whether to use custom security settings or not
isTDIServerSide - Whether the code is executing on the side of the Directory Integrator Server. False means that the code is executing on a Server API client.
Throws:
Exception - if the security protocol is not available in the default provider package or any of the other provider packages that were searched.

SSLRMIServerSocketFactory

public SSLRMIServerSocketFactory(boolean aUseCustomSecuritySettings,
                                 boolean isTDIServerSide,
                                 BindAddressPolicy bindAddrPol)
                          throws Exception
Creates SSLRMIServerSocketFactory object with specified or not use of custom settings and stash.

Parameters:
aUseCustomSecuritySettings - whether to use custom security settings or not
isTDIServerSide - Whether the code is executing on the side of the Directory Integrator Server. False means that the code is executing on a Server API client.
bindAddrPol - Object for obtaining the bind addresses from.
Throws:
Exception - if the security protocol is not available in the default provider package or any of the other provider packages that were searched.
Method Detail

setLocalThreadSocket

protected static void setLocalThreadSocket(Socket aSocket)
Sets the local thread socket.

Parameters:
aSocket - Socket object

getLocalThreadPrincipal

public static Principal getLocalThreadPrincipal()
                                         throws Exception
Gets the local thread principal.

Returns:
subject distinguished name of the peer's own certificate.
Throws:
Exception - if local thread socket or SSL socket session are null, or SSL session certificate chain is empty.

createServerSocket

public ServerSocket createServerSocket(int aPort)
                                throws IOException
Create a server socket on the specified port (port 0 indicates an anonymous port).

Specified by:
createServerSocket in interface RMIServerSocketFactory
Parameters:
aPort - the port number
Returns:
the server socket on the specified port
Throws:
IOException

equals

public boolean equals(Object obj)
Indicates whether some other object is "equal to" this one.

Overrides:
equals in class Object
Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument and they have same hash codes; false otherwise.

hashCode

public int hashCode()
Returns a hash code value for the object.

Overrides:
hashCode in class Object
Returns:
a hash code value for this object.