org.apache.sling.maven.kickstart.run

## Class ControlClient

- java.lang.Object
- - org.apache.sling.maven.kickstart.run.ControlClient

    public class ControlClient
    extends Object

The `ControlClient` class is a helper class to interact with a started Sling instance through its ControlListener class.

### Constructor Summary

Constructors
Constructor and Description
`ControlClient(File directory, org.apache.maven.plugin.logging.Log logger)` Creates an instance of this control support class.

### Method Summary

All Methods Instance Methods Concrete Methods
`int` `dumpThreads()` Implements the client side of the control connection sending the command to retrieve a thread dump.
`int` `getPort()`
`boolean` `isStarted()`
`int` `shutdownServer()` Implements the client side of the control connection sending the command to shutdown Sling.
`int` `statusServer()` Implements the client side of the control connection sending the command to check whether Sling is active.

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

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

### Constructor Detail

#### ControlClient

    public ControlClient(File directory,
                         org.apache.maven.plugin.logging.Log logger)

Creates an instance of this control support class.

The host (name or address) and port number of the socket is defined by the `listenSpec` parameter. This parameter is defined as `[ host ":" ] port`. If the parameter is empty or `null` it defaults to localhost:0. If the host name is missing it defaults to localhost.

### Method Detail

#### getPort

    public int getPort()

#### isStarted

    public boolean isStarted()

#### shutdownServer

    public int shutdownServer()

Implements the client side of the control connection sending the command to shutdown Sling.

#### statusServer

    public int statusServer()

Implements the client side of the control connection sending the command to check whether Sling is active.

#### dumpThreads

    public int dumpThreads()

Implements the client side of the control connection sending the command to retrieve a thread dump.