Package org.testng.remote.strprotocol
Class MessageHub
- java.lang.Object
-
- org.testng.remote.strprotocol.MessageHub
-
public class MessageHub extends java.lang.Object
Central class to connect to the host and send message.
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
m_debug
private IMessageSender
m_messageSender
-
Constructor Summary
Constructors Constructor Description MessageHub(IMessageSender messageSender)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
connect()
Starts the connection.IMessageSender
getMessageSender()
void
initReceiver()
IMessage
receiveMessage()
void
sendMessage(IMessage message)
void
setDebug(boolean debug)
void
shutDown()
Shutsdown the connection to the remote test listener.
-
-
-
Field Detail
-
m_debug
private boolean m_debug
-
m_messageSender
private IMessageSender m_messageSender
-
-
Constructor Detail
-
MessageHub
public MessageHub(IMessageSender messageSender)
-
-
Method Detail
-
connect
public void connect() throws java.io.IOException
Starts the connection.- Throws:
org.testng.TestNGException
- if an exception occurred while establishing the connectionjava.io.IOException
-
shutDown
public void shutDown()
Shutsdown the connection to the remote test listener.
-
sendMessage
public void sendMessage(IMessage message)
-
receiveMessage
public IMessage receiveMessage()
-
setDebug
public void setDebug(boolean debug)
-
initReceiver
public void initReceiver() throws java.net.SocketTimeoutException
- Throws:
java.net.SocketTimeoutException
-
getMessageSender
public IMessageSender getMessageSender()
-
-