Package org.testng.remote.strprotocol
Interface IMessageSender
-
- All Known Implementing Classes:
BaseMessageSender,JsonMessageSender,SerializedMessageSender,StdoutMessageSender,StringMessageSender
public interface IMessageSender
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidconnect()voidinitReceiver()Initialize the receiver.IMessagereceiveMessage()Will return null or throw EOFException when the connection has been severed.voidsendAck()voidsendMessage(IMessage message)voidsendStop()voidshutDown()voidstopReceiver()Stop the receiver.
-
-
-
Method Detail
-
connect
void connect() throws java.io.IOException- Throws:
java.io.IOException
-
initReceiver
void initReceiver() throws java.net.SocketTimeoutExceptionInitialize the receiver. the underlying socket server will be polling until a first client connect.- Throws:
java.net.SocketException- This exception will be thrown if a connection to the remote TestNG instance could not be established after ten seconds.java.net.SocketTimeoutException
-
stopReceiver
void stopReceiver()
Stop the receiver. it provides a way that allow the API invoker to stop the receiver, e.g. break from a dead while loop
-
sendMessage
void sendMessage(IMessage message) throws java.lang.Exception
- Throws:
java.lang.Exception
-
receiveMessage
IMessage receiveMessage() throws java.lang.Exception
Will return null or throw EOFException when the connection has been severed.- Throws:
java.lang.Exception
-
shutDown
void shutDown()
-
sendAck
void sendAck()
-
sendStop
void sendStop()
-
-