org.testng.remote.strprotocol
Class BaseMessageSender

java.lang.Object  extended by org.testng.remote.strprotocol.BaseMessageSender
All Implemented Interfaces:
IMessageSender
Direct Known Subclasses:
SerializedMessageSender, StringMessageSender

public abstract class BaseMessageSender
extends Object
implements IMessageSender


Field Summary
protected  Objectm_ackLock
           
protected  Socketm_clientSocket
           
protected  BufferedReaderm_inReader
          Used to receive ACK and STOP
protected  InputStreamm_inStream
          Incoming message stream.
protected  OutputStreamm_outStream
          Outgoing message stream.
 
Constructor Summary
BaseMessageSender(String host, int port, boolean ack)
           
 
Method Summary
 voidconnect()
          Starts the connection.
 voidinitReceiver()
          Initialize the receiver.
 voidsendAck()
           
 voidsendStop()
           
 voidshutDown()
           
protected  voidwaitForAck()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.testng.remote.strprotocol.IMessageSender
receiveMessage, sendMessage
 

Field Detail

m_clientSocket

protected Socket m_clientSocket

m_ackLock

protected Object m_ackLock

m_outStream

protected OutputStream m_outStream
Outgoing message stream.


m_inStream

protected volatile InputStream m_inStream
Incoming message stream.


m_inReader

protected volatile BufferedReader m_inReader
Used to receive ACK and STOP

Constructor Detail

BaseMessageSender

public BaseMessageSender(String host,                         int port,                         boolean ack)
Method Detail

connect

public void connect()             throws IOException
Starts the connection.

Specified by:
connect in interface IMessageSender
Throws:
TestNGException - if an exception occurred while establishing the connection
IOException

sendAck

public void sendAck()
Specified by:
sendAck in interface IMessageSender

sendStop

public void sendStop()
Specified by:
sendStop in interface IMessageSender

initReceiver

public void initReceiver()                  throws SocketTimeoutException
Description copied from interface: IMessageSender
Initialize the receiver.

Specified by:
initReceiver in interface IMessageSender
Throws:
SocketTimeoutException

shutDown

public void shutDown()
Specified by:
shutDown in interface IMessageSender

waitForAck

protected void waitForAck()


Copyright © 2012. All Rights Reserved.


NOTHING
NOTHING
Add the Maven Dependecy to your project: maven dependecy for com.amazonaws : aws-java-sdk : 1.3.14