> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Class: AnalysisServerWaitCallback

**Package:** `com.phoenix_int.aserver.client.v2`

**Class Hierarchy**

```text theme={null}
↳ java.lang.Object
  ↳ com.phoenix_int.aserver.client.v2.AnalysisServerWaitCallback
```

**Implemented Interfaces**

* [`IAnalysisServerCallback`](https://developer.synopsys.com/docs/modelcenter/modelcenter-remote-execution-java-api/com/phoenix_int/aserver/client/v2/IAnalysisServerCallback)

***

**Declaration**

```java theme={null}
public class AnalysisServerWaitCallback
extends java.lang.Object
implements IAnalysisServerCallback
```

Callback object which uses a monitor to allow the caller to block until a response is received.

## Constructor Summary

| Constructor and Description |
| - |
| `AnalysisServerWaitCallback()` |

## Method Summary

| Modifier and Type | Method and Description |
| - | - |
| [`AnalysisServerResponse`](https://developer.synopsys.com/docs/modelcenter/modelcenter-remote-execution-java-api/com/phoenix_int/aserver/client/v2/AnalysisServerResponse) | `getResponse()` Get the response, or null if it has not been received. |
| `boolean` | `responseReceived(AnalysisServerResponse response)` Callback when a response is received. |
| [`AnalysisServerResponse`](https://developer.synopsys.com/docs/modelcenter/modelcenter-remote-execution-java-api/com/phoenix_int/aserver/client/v2/AnalysisServerResponse) | `waitForResponse()` Wait until the response has been received, if it has not already. |
| [`AnalysisServerResponse`](https://developer.synopsys.com/docs/modelcenter/modelcenter-remote-execution-java-api/com/phoenix_int/aserver/client/v2/AnalysisServerResponse) | `waitForResponse(int timeout)` Wait until the response has been received, if it has not already. |

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

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

## Constructor Detail

### AnalysisServerWaitCallback

```java theme={null}
public AnalysisServerWaitCallback()
```

## Method Detail

### getResponse

```java theme={null}
public AnalysisServerResponse getResponse()
```

Get the response, or null if it has not been received.

### waitForResponse

```java theme={null}
public AnalysisServerResponse waitForResponse()
                                       throws java.lang.InterruptedException
```

Wait until the response has been received, if it has not already.

**Returns:**

* the response

**Throws:**

* `java.lang.InterruptedException` - if the current thread is interrupted during the wait

### waitForResponse

```java theme={null}
public AnalysisServerResponse waitForResponse(int timeout)
                                       throws java.lang.InterruptedException
```

Wait until the response has been received, if it has not already.

**Parameters:**

* `timeout` - the amount of time in ms to wait; 0 for infinite

**Returns:**

* the response, or null if it has not yet been received

**Throws:**

* `java.lang.InterruptedException` - if the current thread is interrupted during the wait

### responseReceived

```java theme={null}
public boolean responseReceived(AnalysisServerResponse response)
```

Callback when a response is received.

**Parameters:**

* `response` - the response

**Returns:**

* true if this callback should be removed

**Specified by:**

* `responseReceived` in interface [`IAnalysisServerCallback`](https://developer.synopsys.com/docs/modelcenter/modelcenter-remote-execution-java-api/com/phoenix_int/aserver/client/v2/IAnalysisServerCallback)
