Package org.apache.zookeeper.client
Class FourLetterWordMain
- java.lang.Object
-
- org.apache.zookeeper.client.FourLetterWordMain
-
@Public public class FourLetterWordMain extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description FourLetterWordMain()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
main(java.lang.String[] args)
static java.lang.String
send4LetterWord(java.lang.String host, int port, java.lang.String cmd)
Send the 4letterwordstatic java.lang.String
send4LetterWord(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.IOException
Send 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.IOException
Send 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
-
-