public abstract class BaseMessageSender extends Object implements IMessageSender
| Modifier and Type | Field and Description |
|---|---|
protected Object |
m_ackLock |
protected Socket |
m_clientSocket |
protected BufferedReader |
m_inReader
Used to receive ACK and STOP
|
protected InputStream |
m_inStream
Incoming message stream.
|
protected OutputStream |
m_outStream
Outgoing message stream.
|
| Constructor and Description |
|---|
BaseMessageSender(String host,
int port,
boolean ack) |
| Modifier and Type | Method and Description |
|---|---|
void |
connect()
Starts the connection.
|
void |
initReceiver()
Initialize the receiver.
|
void |
sendAck() |
void |
sendStop() |
void |
shutDown() |
protected void |
waitForAck() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitreceiveMessage, sendMessageprotected Socket m_clientSocket
protected Object m_ackLock
protected OutputStream m_outStream
protected volatile InputStream m_inStream
protected volatile BufferedReader m_inReader
public BaseMessageSender(String host, int port, boolean ack)
public void connect()
throws IOException
connect in interface IMessageSenderTestNGException - if an exception occurred while establishing the connectionIOExceptionpublic void sendAck()
sendAck in interface IMessageSenderpublic void sendStop()
sendStop in interface IMessageSenderpublic void initReceiver()
throws SocketTimeoutException
IMessageSenderinitReceiver in interface IMessageSenderSocketTimeoutExceptionpublic void shutDown()
shutDown in interface IMessageSenderprotected void waitForAck()
Copyright © 2016. All Rights Reserved.