cgl.narada.transport.https
Class HTTPSTransportImpl

java.lang.Object
  extended by cgl.narada.transport.sslHttpBase.TransportImpl
      extended by cgl.narada.transport.https.HTTPSTransportImpl
All Implemented Interfaces:
Transport

public class HTTPSTransportImpl
extends TransportImpl

Version:
1.1

Field Summary
static int DEFAULT_HTTPS_PORT
           
static int MAX_POST_SIZE
           
static long PUSH_INTERVAL
           
 
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
 
Constructor Summary
  HTTPSTransportImpl()
          -------------------------------------------------------------------
protected HTTPSTransportImpl(Socket socket)
          ------------------------------------------------------------------- Used when an HTTPS transport end point is accepted rather than initiated.
 
Method Summary
 void connect()
          -------------------------------------------------------------------
 void connect(String host)
           
 void connect(String host, int port)
           
 void disconnect()
          ------------------------------------------------------------------- Connect to a destination using SSL.
 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[] messages)
          -------------------------------------------------------------------
 void setTransportDataListener(TransportDataListener l)
          -------------------------------------------------------------------
 void startThreads()
          ------------------------------------------------------------------- Should invoke this in child class to initialize send/receive threads.
 void stopThreads()
          ------------------------------------------------------------------- Should invoke this in the child class to clean up resources in TransportImpl.
protected  void throwBadConnectionException()
           
 String toString()
           
 
Methods inherited from class cgl.narada.transport.sslHttpBase.TransportImpl
getStatusCheckInterval, handleTransportSystemMessage, receiveData, receiveData, sendData, setProperties, setStatusCheckInterval, setupSSL
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MAX_POST_SIZE

public static final int MAX_POST_SIZE
See Also:
Constant Field Values

PUSH_INTERVAL

public static final long PUSH_INTERVAL
See Also:
Constant Field Values

DEFAULT_HTTPS_PORT

public static final int DEFAULT_HTTPS_PORT
See Also:
Constant Field Values
Constructor Detail

HTTPSTransportImpl

public HTTPSTransportImpl()
-------------------------------------------------------------------


HTTPSTransportImpl

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

Method Detail

startThreads

public void startThreads()
                  throws IOException
Description copied from class: TransportImpl
------------------------------------------------------------------- Should invoke this in child class to initialize send/receive threads.

Specified by:
startThreads in class TransportImpl
Throws:
IOException

stopThreads

public void stopThreads()
                 throws IOException
Description copied from class: TransportImpl
------------------------------------------------------------------- Should invoke this in the child class to clean up resources in TransportImpl.

Specified by:
stopThreads in class TransportImpl
Throws:
IOException

setTransportDataListener

public void setTransportDataListener(TransportDataListener l)
Description copied from class: TransportImpl
-------------------------------------------------------------------

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

isConnected

public boolean isConnected()
Description copied from interface: Transport
-------------------------------------------------------------------


isInErrorState

public boolean isInErrorState()
Description copied from interface: Transport
-------------------------------------------------------------------


getType

public String getType()
Description copied from interface: Transport
-------------------------------------------------------------------

Returns:
A unique id for this transport type. i.e. SSL, TCP, UDP, ...

connect

public void connect()
             throws TransportException
Description copied from interface: Transport
-------------------------------------------------------------------

Throws:
TransportException

connect

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

connect

public void connect(String host)
             throws TransportException
Throws:
TransportException

disconnect

public void disconnect()
                throws IOException
Description copied from interface: Transport
------------------------------------------------------------------- Connect to a destination using SSL. The port is explicit.

Throws:
IOException

isSecure

public boolean isSecure()
Description copied from interface: Transport
-------------------------------------------------------------------


toString

public String toString()
Overrides:
toString in class Object

throwBadConnectionException

protected void throwBadConnectionException()
                                    throws IOException
Throws:
IOException

sendDataImmediately

protected void sendDataImmediately(byte[] messages)
                            throws IOException
Description copied from class: TransportImpl
-------------------------------------------------------------------

Specified by:
sendDataImmediately in class TransportImpl
Throws:
IOException

receiveDataImmediately

protected byte[] receiveDataImmediately()
                                 throws IOException
Description copied from class: TransportImpl
-------------------------------------------------------------------

Specified by:
receiveDataImmediately in class TransportImpl
Returns:
byte array that possibly include a series of messages with each led by 4 bytes of length. We usually don't need to use this since everything will be put in the receive queue.
Throws:
IOException

handleReceiveException

protected void handleReceiveException(Exception e)
Description copied from class: TransportImpl
-------------------------------------------------------------------

Specified by:
handleReceiveException in class TransportImpl

handleSendException

protected void handleSendException(Exception e)
Description copied from class: TransportImpl
-------------------------------------------------------------------

Specified by:
handleSendException in class TransportImpl


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