Class FourLetterWordMain
java.lang.Object
org.apache.zookeeper.client.FourLetterWordMain
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatic Stringsend4LetterWord(String host, int port, String cmd) Send the 4letterwordstatic Stringsend4LetterWord(String host, int port, String cmd, boolean secure) Send the 4letterwordstatic Stringsend4LetterWord(String host, int port, String cmd, boolean secure, int timeout) Send the 4letterwordstatic Stringsend4LetterWord(String host, int port, String cmd, boolean secure, int timeout, SSLContext sslContext) Send the 4letterwordstatic Stringsend4LetterWord(String host, int port, String cmd, ZKClientConfig clientConfig, int timeout) Send the 4letterword
-
Field Details
-
LOG
protected static final org.slf4j.Logger LOG
-
-
Constructor Details
-
FourLetterWordMain
public FourLetterWordMain()
-
-
Method Details
-
send4LetterWord
public static String send4LetterWord(String host, int port, String cmd) throws IOException, X509Exception.SSLContextException Send the 4letterword- Parameters:
host- the destination hostport- the destination portcmd- the 4letterword- Returns:
- server response
- Throws:
IOExceptionX509Exception.SSLContextException
-
send4LetterWord
public static String send4LetterWord(String host, int port, String cmd, boolean secure) throws IOException, X509Exception.SSLContextException Send the 4letterword- Parameters:
host- the destination hostport- the destination portcmd- the 4letterwordsecure- whether to use SSL- Returns:
- server response
- Throws:
IOExceptionX509Exception.SSLContextException
-
send4LetterWord
public static String send4LetterWord(String host, int port, String cmd, boolean secure, int timeout) throws IOException, X509Exception.SSLContextException Send the 4letterword- Parameters:
host- the destination hostport- the destination portcmd- the 4letterwordsecure- whether to use SSLtimeout- in milliseconds, maximum time to wait while connecting/reading data- Returns:
- server response
- Throws:
IOExceptionX509Exception.SSLContextException
-
send4LetterWord
public static String send4LetterWord(String host, int port, String cmd, ZKClientConfig clientConfig, int timeout) throws X509Exception.SSLContextException, IOException Send the 4letterword- Parameters:
host- the destination hostport- the destination portcmd- the 4letterwordclientConfig- client configtimeout- in milliseconds, maximum time to wait while connecting/reading data- Returns:
- server response
- Throws:
X509Exception.SSLContextExceptionIOException
-
send4LetterWord
public static String send4LetterWord(String host, int port, String cmd, boolean secure, int timeout, SSLContext sslContext) throws IOException, X509Exception.SSLContextException Send the 4letterword- Parameters:
host- the destination hostport- the destination portcmd- the 4letterwordsecure- whether to use SSLtimeout- in milliseconds, maximum time to wait while connecting/reading datasslContext- SSL context- Returns:
- server response
- Throws:
IOExceptionX509Exception.SSLContextException
-
main
-