Package org.testng.remote.strprotocol
Class MessageHub
- java.lang.Object
-
- org.testng.remote.strprotocol.MessageHub
-
public class MessageHub extends java.lang.ObjectCentral class to connect to the host and send message.
-
-
Field Summary
Fields Modifier and Type Field Description private booleanm_debugprivate IMessageSenderm_messageSender
-
Constructor Summary
Constructors Constructor Description MessageHub(IMessageSender messageSender)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconnect()Starts the connection.IMessageSendergetMessageSender()voidinitReceiver()IMessagereceiveMessage()voidsendMessage(IMessage message)voidsetDebug(boolean debug)voidshutDown()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.IOExceptionStarts 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()
-
-