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 void
connect()
void
initReceiver()
Initialize the receiver.IMessage
receiveMessage()
Will return null or throw EOFException when the connection has been severed.void
sendAck()
void
sendMessage(IMessage message)
void
sendStop()
void
shutDown()
void
stopReceiver()
Stop the receiver.
-
-
-
Method Detail
-
connect
void connect() throws java.io.IOException
- Throws:
java.io.IOException
-
initReceiver
void initReceiver() throws java.net.SocketTimeoutException
Initialize 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()
-
-