> ## 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: AnalysisServerResponse

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

**Class Hierarchy**

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

***

**Declaration**

```java theme={null}
Public class AnalysisServerResponse
extends java.lang.Object
```

Implementation of `PHXResponse` along lines of `PHXResponse` in C++ code.

## Constructor Summary

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

## Method Summary

| Modifier and Type | Method and Description |
| - | - |
| `com.phoenix_int.aserver.client.v2.ChunkDescriptor` | `asChunkDescriptor()` Parse the response as a chunk descriptor. |
| `PHXComponentDescription` | `asComponentDescription(boolean asXml)` Parse a component description. |
| `java.util.Map<java.lang.String,AnalysisVariableValue>` | `asHierarchy()` Parse the response as a variable hierarchy. |
| `java.util.List<java.lang.String>` | `asList()` Convert the string data to a list of properties. |
| `java.util.List<PHXMethodDescriptor>` | `asMethodDescriptors()` Convert the string data to a list of method descriptors. |
| `java.util.List<PHXPropertyDescriptor>` | `asPropertyDescriptors()` Parse this response as a sequence of property descriptors. |
| `java.util.List<PHXPropertyDescriptor>` | `asPropertyDescriptors(java.lang.String baseObjectName)` Parse this response as a sequence of property descriptors. |
| `java.util.List<PHXPropertyValue>` | `asValueDescriptors()` Parse the response as a list of value descriptors. |
| `AnalysisServerVersion` | `asVersion()` Get the response as a server version. |
| `PHXComponentBranch` | `asVersionHistory()` Parse the response as a version history. |
| `byte[]` | `getBinaryData()` Get the binary data; only valid if format is Extended or Icon. |
| `java.lang.String` | `getErrorMessage()` Get the server error; only valid if response type is ServerError or ConnectionError. |
| `java.lang.String` | `getHost()` Get the host which sent the message. |
| `java.lang.String` | `getID()` Get the unique identifier of the message. |
| `AnalysisServerResponseType` | `getResponseType()` Get the type of response. |
| `java.lang.String` | `getStringData()` Get the string data; only valid if format is Normal or Extended. |
| `boolean` | `hasText()` Does this response have actual string data (i.e. string data is not empty)? |
| `boolean` | `isBinary()` Is this a response with binary data? |
| `boolean` | `isError()` Does the response represent an error? |
| `boolean` | `isSuccess()` Is the response a successful response? |
| `boolean` | `isText()` Does the response have text content? |

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

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

## Constructor Detail

**Constructor:** AnalysisServerResponse

```java theme={null}
Public AnalysisServerResponse()
```

## Method Detail

### getID

```java theme={null}
Public java.lang.String getID()
```

Get the unique identifier of the message.

### getHost

```java theme={null}
Public java.lang.String getHost()
```

Get the host which sent the message.

### getResponseType

```java theme={null}
Public AnalysisServerResponseType getResponseType()
```

Get the type of response.

### getStringData

```java theme={null}
Public java.lang.String getStringData()
```

Get the string data; only valid if format is `Normal` or `Extended`.

### getErrorMessage

```java theme={null}
Public java.lang.String getErrorMessage()
```

Get the server error; only valid if response type is `ServerError` or `ConnectionError`.

### getBinaryData

```java theme={null}
Public byte[] getBinaryData()
```

Get the binary data; only valid if format is `Extended` or `Icon`.

### isText

```java theme={null}
Public boolean isText()
```

Does the response have text content?

### hasText

```java theme={null}
Public boolean hasText()
```

Does this response have actual string data (i.e. string data is not empty)?

### isBinary

```java theme={null}
Public boolean isBinary()
```

Is this a response with binary data?

### isSuccess

```java theme={null}
Public boolean isSuccess()
```

Is the response a successful response?

### isError

```java theme={null}
Public boolean isError()
```

Does the response represent an error?

### asVersion

```java theme={null}
Public AnalysisServerVersion asVersion()
                                throws java.lang.IllegalStateException,
                                       AnalysisServerException
```

Get the response as a server version.

**Throws:**

* `java.lang.IllegalStateException` - if this is not a text response
* `AnalysisServerException` - if the data is not valid

### asComponentDescription

```java theme={null}
Public PHXComponentDescription asComponentDescription(boolean asXml)
                                               throws java.lang.IllegalStateException,
                                                      AnalysisServerException
```

Parse a component description.

**Parameters:**

* `asXml` - whether to interpret the result as XML

**Returns:**

* the description

**Throws:**

* `java.lang.IllegalStateException` - if this is not a text response
* `AnalysisServerException` - if the data is not valid

### asList

```java theme={null}
Public java.util.List<java.lang.String> asList()
                                        throws java.lang.IllegalStateException
```

Convert the string data to a list of properties.

**Returns:**

* the list of items

**Throws:**

* `java.lang.IllegalStateException` - if the data is not text

### asMethodDescriptors

```java theme={null}
Public java.util.List<PHXMethodDescriptor> asMethodDescriptors()
                                                        throws java.lang.IllegalStateException
```

Convert the string data to a list of method descriptors.

**Returns:**

* the list

**Throws:**

* `java.lang.IllegalStateException` - if the data is not text

### asPropertyDescriptors

```java theme={null}
Public java.util.List<PHXPropertyDescriptor> asPropertyDescriptors()
                                                            throws java.lang.IllegalStateException,
                                                                   AnalysisServerException
```

Parse this response as a sequence of property descriptors.

**Returns:**

* a set of property descriptors, which may be empty

**Throws:**

* `java.lang.IllegalStateException` - if this is not a text response
* `AnalysisServerException` - if the data is not valid

### asPropertyDescriptors

```java theme={null}
Public java.util.List<PHXPropertyDescriptor> asPropertyDescriptors(java.lang.String baseObjectName)
                                                            throws java.lang.IllegalStateException,
                                                                   AnalysisServerException
```

Parse this response as a sequence of property descriptors.

**Parameters:**

* `baseObjectName` - the object to retrieve information for; null for none

**Returns:**

* a set of property descriptors, which may be empty

**Throws:**

* `java.lang.IllegalStateException` - if this is not a text response
* `AnalysisServerException` - if the data is not valid

### asChunkDescriptor

```java theme={null}
Public com.phoenix_int.aserver.client.v2.ChunkDescriptor asChunkDescriptor()
                                                                    throws java.lang.IllegalStateException, 
                                                                           AnalysisServerException
```

Parse the response as a chunk descriptor.

**Returns:**

* the chunk descriptor

**Throws:**

* `java.lang.IllegalStateException` - if this is not a text response
* `AnalysisServerException` - if the data is not valid

### asValueDescriptors

```java theme={null}
Public java.util.List<PHXPropertyValue> asValueDescriptors()
                                                    throws java.lang.IllegalStateException,
                                                           AnalysisServerException
```

Parse the response as a list of value descriptors.

**Returns:**

* the list, which may be empty

**Throws:**

* `java.lang.IllegalStateException` - if this is not a text response
* `AnalysisServerException` - if the data is not valid

### asVersionHistory

```java theme={null}
Public PHXComponentBranch asVersionHistory()
                                    throws java.lang.IllegalStateException,
                                           AnalysisServerException
```

Parse the response as a version history.

**Returns:**

* the version history

**Throws:**

* `java.lang.IllegalStateException` - if this is not a text response
* `AnalysisServerException` - if the data is not valid

### asHierarchy

```java theme={null}
Public java.util.Map<java.lang.String,AnalysisVariableValue> asHierarchy()
                                                                  throws java.lang.IllegalStateException,
                                                                         AnalysisServerException
```

Parse the response as a variable hierarchy.

**Returns:**

* the map from variable paths to values

**Throws:**

* `java.lang.IllegalStateException` - if this is not a text response
* `AnalysisServerException` - if the data is not valid
