# Class Emulator (2.79.0)

2.79.0 (latest) 2.78.1 2.77.0 2.74.0 2.73.0 2.72.0 2.71.0 2.70.0 2.68.0 2.67.1 2.66.0 2.65.1 2.63.0 2.62.0 2.61.0 2.60.0 2.59.0 2.58.2 2.56.0 2.54.0 2.52.0 2.51.2 2.49.0 2.46.0 2.45.1 2.44.1 2.43.0 2.42.0 2.40.0 2.39.5 2.37.0 2.35.1 2.34.0 2.33.0 2.32.0 2.31.0 2.30.0 2.29.1 2.28.0

> [!WARNING]
> **Beta**
>
>
> This library is covered by the [Pre-GA Offerings Terms](https://docs.cloud.google.com/terms/service-terms#1)
> of the Terms of Service. Pre-GA libraries might have limited support,
> and changes to pre-GA libraries might not be compatible with other pre-GA versions.
> For more information, see the
> [launch stage descriptions](https://docs.cloud.google.com/products#product-launch-stages).

    public class Emulator

Wraps the Bigtable emulator in a java api and decorates it with grpc channel builders.

This class will use the golang binaries embedded in this jar to launch the emulator as an
external process and redirect its output to a Logger.

## Inheritance

[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \> Emulator

## Inherited Members

[Object.clone()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--) [Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-) [Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) [Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) [Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--) [Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) [Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) [Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--) [Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) [Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) [Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)

## Static Methods

### createBundled()

    public static Emulator createBundled()

Create a new instance of emulator. The emulator will use the bundled binaries in this jar.
Please note that the emulator is created in a stopped state, please use [#start()](https://docs.cloud.google.com/java/docs/reference/google-cloud-bigtable/latest/com.google.cloud.bigtable.emulator.v2.Emulator#com_google_cloud_bigtable_emulator_v2_Emulator_start__) after
creating it.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigtable/latest/com.google.cloud.bigtable.emulator.v2.Emulator` |   |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html` |   |

### createFromPath(Path path)

    public static Emulator createFromPath(Path path)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `path` | `https://docs.oracle.com/javase/8/docs/api/java/nio/file/Path.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-bigtable/latest/com.google.cloud.bigtable.emulator.v2.Emulator` |   |

## Methods

### getAdminChannel()

    public synchronized ManagedChannel getAdminChannel()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `io.grpc.ManagedChannel` |   |

### getDataChannel()

    public synchronized ManagedChannel getDataChannel()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `io.grpc.ManagedChannel` |   |

### getPort()

    public synchronized int getPort()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### start()

    public synchronized void start()

Starts the emulator process and waits for it to be ready.

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html` |   |
| `https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/TimeoutException.html` |   |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/InterruptedException.html` |   |

### start(int port)

    public synchronized void start(int port)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `port` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html` |   |
| `https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/TimeoutException.html` |   |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/InterruptedException.html` |   |

### stop()

    public synchronized void stop()

Stops the emulator process.