Package org.apache.zookeeper.client
Class FourLetterWordMain
- java.lang.Object
-
- org.apache.zookeeper.client.FourLetterWordMain
-
@Public public class FourLetterWordMain extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.apache.log4j.LoggerLOG
-
Constructor Summary
Constructors Constructor Description FourLetterWordMain()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidmain(java.lang.String[] args)static java.lang.Stringsend4LetterWord(java.lang.String host, int port, java.lang.String cmd)Send the 4letterwordstatic java.lang.Stringsend4LetterWord(java.lang.String host, int port, java.lang.String cmd, int timeout)Send the 4letterword
-
-
-
Method Detail
-
send4LetterWord
public static java.lang.String send4LetterWord(java.lang.String host, int port, java.lang.String cmd) throws java.io.IOExceptionSend the 4letterword- Parameters:
host- the destination hostport- the destination portcmd- the 4letterword- Returns:
- server response
- Throws:
java.io.IOException
-
send4LetterWord
public static java.lang.String send4LetterWord(java.lang.String host, int port, java.lang.String cmd, int timeout) throws java.io.IOExceptionSend the 4letterword- Parameters:
host- the destination hostport- the destination portcmd- the 4letterwordtimeout- in milliseconds, maximum time to wait while connecting/reading data- Returns:
- server response
- Throws:
java.io.IOException
-
main
public static void main(java.lang.String[] args) throws java.io.IOException- Throws:
java.io.IOException
-
-