AbstractFourLetterCommand (Apache ZooKeeper - Server 3.7.0 API)
Date: 2021-03-17

org.apache.zookeeper.server.command

## Class AbstractFourLetterCommand

- java.lang.Object
- - org.apache.zookeeper.server.command.AbstractFourLetterCommand

- Direct Known Subclasses:
    CnxnStatResetCommand, ConfCommand, ConsCommand, DigestCommand, DirsCommand, DumpCommand, EnvCommand, IsroCommand, MonitorCommand, NopCommand, RuokCommand, SetTraceMaskCommand, StatCommand, StatResetCommand, TraceMaskCommand, WatchCommand

      public abstract class AbstractFourLetterCommand
      extends Object

  Set of threads for command ports. All the 4 letter commands are run via a thread. Each class maps to a corresponding 4 letter command. CommandThread is the abstract class from which all the others inherit.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected ServerCnxnFactory` | `factory`
    `protected PrintWriter` | `pw`
    `protected ServerCnxn` | `serverCnxn`
    `static String` | `ZK_NOT_SERVING`
    `protected ZooKeeperServer` | `zkServer`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractFourLetterCommand(PrintWriter pw, ServerCnxn serverCnxn)`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract void` | `commandRun()`
    `void` | `run()`
    `void` | `setFactory(ServerCnxnFactory factory)`
    `void` | `setZkServer(ZooKeeperServer zkServer)`
    `void` | `start()`

    - ### Methods inherited from class java.lang.Object

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

- - ### Field Detail

    - #### ZK_NOT_SERVING

          public static final String ZK_NOT_SERVING

      See Also:
        Constant Field Values

    - #### pw

          protected PrintWriter pw

    - #### serverCnxn

          protected ServerCnxn serverCnxn

    - #### zkServer

          protected ZooKeeperServer zkServer

    - #### factory

          protected ServerCnxnFactory factory

  - ### Constructor Detail

    - #### AbstractFourLetterCommand

          public AbstractFourLetterCommand(PrintWriter pw,
                                           ServerCnxn serverCnxn)

  - ### Method Detail

    - #### start

          public void start()

    - #### run

          public void run()

    - #### setZkServer

          public void setZkServer(ZooKeeperServer zkServer)

    - #### setFactory

          public void setFactory(ServerCnxnFactory factory)

    - #### commandRun

          public abstract void commandRun()
                                   throws IOException

      Throws:
        `IOException`

Copyright © 2008–2021 The Apache Software Foundation. All rights reserved.