Package org.testng.remote.strprotocol
Class StdoutMessageSender
- java.lang.Object
-
- org.testng.remote.strprotocol.StdoutMessageSender
-
- All Implemented Interfaces:
IMessageSender
public class StdoutMessageSender extends java.lang.Object implements IMessageSender
this is a dummy IMessageSender implementation for test purpose only.
-
-
Constructor Summary
Constructors Constructor Description StdoutMessageSender()
-
Method Summary
All Methods Instance Methods Concrete 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
public void connect() throws java.io.IOException- Specified by:
connectin interfaceIMessageSender- Throws:
java.io.IOException
-
initReceiver
public void initReceiver() throws java.net.SocketTimeoutExceptionDescription copied from interface:IMessageSenderInitialize the receiver. the underlying socket server will be polling until a first client connect.- Specified by:
initReceiverin interfaceIMessageSender- Throws:
java.net.SocketTimeoutException
-
stopReceiver
public void stopReceiver()
Description copied from interface:IMessageSenderStop the receiver. it provides a way that allow the API invoker to stop the receiver, e.g. break from a dead while loop- Specified by:
stopReceiverin interfaceIMessageSender
-
sendMessage
public void sendMessage(IMessage message) throws java.lang.Exception
- Specified by:
sendMessagein interfaceIMessageSender- Throws:
java.lang.Exception
-
receiveMessage
public IMessage receiveMessage() throws java.lang.Exception
Description copied from interface:IMessageSenderWill return null or throw EOFException when the connection has been severed.- Specified by:
receiveMessagein interfaceIMessageSender- Throws:
java.lang.Exception
-
shutDown
public void shutDown()
- Specified by:
shutDownin interfaceIMessageSender
-
sendAck
public void sendAck()
- Specified by:
sendAckin interfaceIMessageSender
-
sendStop
public void sendStop()
- Specified by:
sendStopin interfaceIMessageSender
-
-