# Class FourLetterWordMain

java.lang.Object
org.apache.zookeeper.client.FourLetterWordMain

@Public public class FourLetterWordMain extends Object

## Field Summary

Fields
Modifier and Type
Field
Description
`protected static final org.slf4j.Logger`
`LOG`

## Constructor Summary

Constructors
Constructor
Description
`FourLetterWordMain()`

## Method Summary

Modifier and Type
Method
Description
`static void`
`main(String[] args)`
`static String`
`send4LetterWord(String host, int port, String cmd)`
Send the 4letterword
`static String`
`send4LetterWord(String host, int port, String cmd, boolean secure)`
Send the 4letterword
`static String`
`send4LetterWord(String host, int port, String cmd, boolean secure, int timeout)`
Send the 4letterword
`static String`
`send4LetterWord(String host, int port, String cmd, boolean secure, int timeout, SSLContext sslContext)`
Send the 4letterword
`static String`
`send4LetterWord(String host, int port, String cmd, ZKClientConfig clientConfig, int timeout)`
Send the 4letterword

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## 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 host
  `port` - the destination port
  `cmd` - the 4letterword
Returns:
  server response
Throws:
  `IOException`
  `X509Exception.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 host
  `port` - the destination port
  `cmd` - the 4letterword
  `secure` - whether to use SSL
Returns:
  server response
Throws:
  `IOException`
  `X509Exception.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 host
  `port` - the destination port
  `cmd` - the 4letterword
  `secure` - whether to use SSL
  `timeout` - in milliseconds, maximum time to wait while connecting/reading data
Returns:
  server response
Throws:
  `IOException`
  `X509Exception.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 host
  `port` - the destination port
  `cmd` - the 4letterword
  `clientConfig` - client config
  `timeout` - in milliseconds, maximum time to wait while connecting/reading data
Returns:
  server response
Throws:
  `X509Exception.SSLContextException`
  `IOException`

### 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 host
  `port` - the destination port
  `cmd` - the 4letterword
  `secure` - whether to use SSL
  `timeout` - in milliseconds, maximum time to wait while connecting/reading data
  `sslContext` - SSL context
Returns:
  server response
Throws:
  `IOException`
  `X509Exception.SSLContextException`

### main

public static void main(String[] args) throws IOException, X509Exception.SSLContextException

Throws:
  `IOException`
  `X509Exception.SSLContextException`