org.jpos.iso
Class SunJSSESocketFactory

java.lang.Object
  extended by org.jpos.util.SimpleLogSource
      extended by org.jpos.iso.SunJSSESocketFactory
All Implemented Interfaces:
Configurable, ISOClientSocketFactory, ISOServerSocketFactory, LogSource

public class SunJSSESocketFactory
extends SimpleLogSource
implements ISOServerSocketFactory, ISOClientSocketFactory, Configurable

SunJSSESocketFactory is used by BaseChannel and ISOServer in order to provide hooks for SSL implementations.

Since:
1.3.3
Version:
$Revision$ $Date$
Author:
Bharavi Gade, Alwyn Schoeman

Field Summary
 
Fields inherited from class org.jpos.util.SimpleLogSource
logger, realm
 
Constructor Summary
SunJSSESocketFactory()
           
 
Method Summary
 ServerSocket createServerSocket(int port)
          Create a server socket on the specified port (port 0 indicates an anonymous port).
protected  SSLServerSocketFactory createServerSocketFactory()
          Create a socket factory
 Socket createSocket(String host, int port)
          Create a client socket connected to the specified host and port.
protected  SSLSocketFactory createSocketFactory()
          Create a socket factory
 boolean getClientAuthNeeded()
           
 Configuration getConfiguration()
           
 String[] getEnabledCipherSuites()
           
protected  String getKeyPassword()
           
 String getKeyStore()
           
protected  String getPassword()
           
 boolean getServerAuthNeeded()
           
 String getServerName()
           
 void setClientAuthNeeded(boolean clientAuthNeeded)
           
 void setConfiguration(Configuration cfg)
           
 void setEnabledCipherSuites(String[] enabledCipherSuites)
           
 void setKeyPassword(String keyPassword)
           
 void setKeyStore(String keyStore)
           
 void setPassword(String password)
           
 void setServerAuthNeeded(boolean serverAuthNeeded)
           
 void setServerName(String serverName)
           
 
Methods inherited from class org.jpos.util.SimpleLogSource
error, error, getLogger, getRealm, info, info, setLogger, setRealm, warning, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SunJSSESocketFactory

public SunJSSESocketFactory()
Method Detail

setKeyStore

public void setKeyStore(String keyStore)

setPassword

public void setPassword(String password)

setKeyPassword

public void setKeyPassword(String keyPassword)

setServerName

public void setServerName(String serverName)

setClientAuthNeeded

public void setClientAuthNeeded(boolean clientAuthNeeded)

setServerAuthNeeded

public void setServerAuthNeeded(boolean serverAuthNeeded)

createServerSocketFactory

protected SSLServerSocketFactory createServerSocketFactory()
                                                    throws ISOException
Create a socket factory

Returns:
the socket factory
Throws:
ISOException - if an error occurs during server socket creation

createSocketFactory

protected SSLSocketFactory createSocketFactory()
                                        throws ISOException
Create a socket factory

Returns:
the socket factory
Throws:
ISOException - if an error occurs during server socket creation

createServerSocket

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

Specified by:
createServerSocket in interface ISOServerSocketFactory
Parameters:
port - the port number
Returns:
the server socket on the specified port
Throws:
IOException - should an I/O error occurs during
ISOException - should an error occurs during creation

createSocket

public Socket createSocket(String host,
                           int port)
                    throws IOException,
                           ISOException
Create a client socket connected to the specified host and port.

Specified by:
createSocket in interface ISOClientSocketFactory
Parameters:
host - the host name
port - the port number
Returns:
a socket connected to the specified host and port.
Throws:
IOException - if an I/O error occurs during socket creation
ISOException - should any other error occurs

getKeyStore

public String getKeyStore()

getPassword

protected String getPassword()

getKeyPassword

protected String getKeyPassword()

getServerName

public String getServerName()

getClientAuthNeeded

public boolean getClientAuthNeeded()

getServerAuthNeeded

public boolean getServerAuthNeeded()

setEnabledCipherSuites

public void setEnabledCipherSuites(String[] enabledCipherSuites)

getEnabledCipherSuites

public String[] getEnabledCipherSuites()

setConfiguration

public void setConfiguration(Configuration cfg)
                      throws ConfigurationException
Specified by:
setConfiguration in interface Configurable
Parameters:
cfg - Configuration object
Throws:
ConfigurationException
See Also:
Configurable.setConfiguration(org.jpos.core.Configuration)

getConfiguration

public Configuration getConfiguration()


Copyright © 1998-2012 jPOS.org. All Rights Reserved.