cgl.narada.transport.ssl
Class SSLTransportJSSEImpl

java.lang.Object
  extended by cgl.narada.transport.sslHttpBase.TransportImpl
      extended by cgl.narada.transport.ssl.SSLTransportJSSEImpl
All Implemented Interfaces:
SSLTransport, Transport

public class SSLTransportJSSEImpl
extends TransportImpl
implements SSLTransport


Field Summary
 
Fields inherited from class cgl.narada.transport.sslHttpBase.TransportImpl
m_host, m_ioerror, m_localhost, m_port, m_receiveQueue, m_sendQueue, m_sslFactory, m_statusInterval, proxyInfo, proxyTunnel
 
Fields inherited from interface cgl.narada.transport.ssl.SSLTransport
DEFAULT_SSL_PORT
 
Constructor Summary
  SSLTransportJSSEImpl()
          -------------------------------------------------------------------
protected SSLTransportJSSEImpl(Socket socket)
          ------------------------------------------------------------------- Used when an SSL transport end point is accepted rather than initiated.
 
Method Summary
 void connect()
          -------------------------------------------------------------------
 void connect(String host)
          -------------------------------------------------------------------
 void connect(String host, int port)
          -------------------------------------------------------------------
 void disconnect()
          -------------------------------------------------------------------
 String getType()
          -------------------------------------------------------------------
protected  void handleReceiveException(Exception e)
          -------------------------------------------------------------------
protected  void handleSendException(Exception e)
          -------------------------------------------------------------------
 boolean isConnected()
          -------------------------------------------------------------------
 boolean isInErrorState()
          -------------------------------------------------------------------
 boolean isSecure()
          -------------------------------------------------------------------
protected  byte[] receiveDataImmediately()
          -------------------------------------------------------------------
protected  void sendDataImmediately(byte[] message)
          -------------------------------------------------------------------
 void setProperties(Properties properties)
          ------------------------------------------------------------------- Properties Recognized: host - The desitnation end point host port - The destination end point port.
 void setTransportDataListener(TransportDataListener l)
          -------------------------------------------------------------------
 void startThreads()
          -------------------------------------------------------------------
 void stopThreads()
          -------------------------------------------------------------------
protected  void throwBadConnectionException()
          -------------------------------------------------------------------
 String toString()
          -------------------------------------------------------------------
 
Methods inherited from class cgl.narada.transport.sslHttpBase.TransportImpl
getStatusCheckInterval, handleTransportSystemMessage, receiveData, receiveData, sendData, setStatusCheckInterval, setupSSL
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface cgl.narada.transport.sslHttpBase.Transport
getStatusCheckInterval, receiveData, receiveData, sendData, setStatusCheckInterval
 

Constructor Detail

SSLTransportJSSEImpl

public SSLTransportJSSEImpl()
-------------------------------------------------------------------


SSLTransportJSSEImpl

protected SSLTransportJSSEImpl(Socket socket)
------------------------------------------------------------------- Used when an SSL transport end point is accepted rather than initiated.

Method Detail

setProperties

public void setProperties(Properties properties)
Description copied from class: TransportImpl
------------------------------------------------------------------- Properties Recognized: host - The desitnation end point host port - The destination end point port. truststore - Location of the trusted authorities database keystore - Location of the public/private key database truststorePassword - Password to the truststore keystorePassword - Password to the keystore username - Proxy authenticated user name. password - Proxy authenticated password. domain - local NT domaion [ for NTLM Authenticaton ] https.proxyHost - The location of the HTTPS proxy. Will try to auto detect from System properties if this does not exist. https.proxyPort - The location of the HTTPS proxy port. Will try to auto detec from System properties if this does not exist. secure - true | false. If false, will not do any real SSL.

Specified by:
setProperties in interface Transport
Overrides:
setProperties in class TransportImpl

startThreads

public void startThreads()
                  throws IOException
-------------------------------------------------------------------

Specified by:
startThreads in class TransportImpl
Throws:
IOException

stopThreads

public void stopThreads()
                 throws IOException
-------------------------------------------------------------------

Specified by:
stopThreads in class TransportImpl
Throws:
IOException

setTransportDataListener

public void setTransportDataListener(TransportDataListener l)
-------------------------------------------------------------------

Specified by:
setTransportDataListener in interface Transport
Specified by:
setTransportDataListener in class TransportImpl

isConnected

public boolean isConnected()
-------------------------------------------------------------------

Specified by:
isConnected in interface Transport

isInErrorState

public boolean isInErrorState()
-------------------------------------------------------------------

Specified by:
isInErrorState in interface Transport

getType

public String getType()
-------------------------------------------------------------------

Specified by:
getType in interface Transport
Returns:
A unique id for this transport type. i.e. SSL, TCP, UDP, ...

connect

public void connect()
             throws TransportException
-------------------------------------------------------------------

Specified by:
connect in interface Transport
Throws:
TransportException

connect

public void connect(String host,
                    int port)
             throws TransportException
-------------------------------------------------------------------

Specified by:
connect in interface SSLTransport
Throws:
TransportException

connect

public void connect(String host)
             throws TransportException
-------------------------------------------------------------------

Specified by:
connect in interface SSLTransport
Throws:
TransportException

disconnect

public void disconnect()
                throws IOException
-------------------------------------------------------------------

Specified by:
disconnect in interface Transport
Throws:
IOException

isSecure

public boolean isSecure()
-------------------------------------------------------------------

Specified by:
isSecure in interface Transport

toString

public String toString()
-------------------------------------------------------------------

Overrides:
toString in class Object

throwBadConnectionException

protected void throwBadConnectionException()
                                    throws IOException
-------------------------------------------------------------------

Throws:
IOException

sendDataImmediately

protected void sendDataImmediately(byte[] message)
                            throws IOException
-------------------------------------------------------------------

Specified by:
sendDataImmediately in class TransportImpl
Throws:
IOException

receiveDataImmediately

protected byte[] receiveDataImmediately()
                                 throws IOException
-------------------------------------------------------------------

Specified by:
receiveDataImmediately in class TransportImpl
Throws:
IOException

handleReceiveException

protected void handleReceiveException(Exception e)
-------------------------------------------------------------------

Specified by:
handleReceiveException in class TransportImpl

handleSendException

protected void handleSendException(Exception e)
-------------------------------------------------------------------

Specified by:
handleSendException in class TransportImpl


For comments and suggestions please send e-mail to The NaradaBrokering Project