Skip to main content

ModelCenter Remote Execution Java API 2025 R2

Class: AnalysisServerResponse

Last update: 16.07.2025

Package: com.phoenix_int.aserver.client.v2

Class Hierarchy

↳ java.lang.Object
  ↳ com.phoenix_int.aserver.client.v2.AnalysisServerResponse

Declaration

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` asHierarchy()
Parse the response as a variable hierarchy.
```java.util.List` asList()
Convert the string data to a list of properties.
```java.util.List` asMethodDescriptors()
Convert the string data to a list of method descriptors.
```java.util.List` asPropertyDescriptors()
Parse this response as a sequence of property descriptors.
```java.util.List` asPropertyDescriptors(java.lang.String baseObjectName)
Parse this response as a sequence of property descriptors.
```java.util.List` 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

Public AnalysisServerResponse()

Method Detail

getID

Public java.lang.String getID()

Get the unique identifier of the message.

getHost

Public java.lang.String getHost()

Get the host which sent the message.

getResponseType

Public AnalysisServerResponseType getResponseType()

Get the type of response.

getStringData

Public java.lang.String getStringData()

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

getErrorMessage

Public java.lang.String getErrorMessage()

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

getBinaryData

Public byte[] getBinaryData()

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

isText

Public boolean isText()

Does the response have text content?

hasText

Public boolean hasText()

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

isBinary

Public boolean isBinary()

Is this a response with binary data?

isSuccess

Public boolean isSuccess()

Is the response a successful response?

isError

Public boolean isError()

Does the response represent an error?

asVersion

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

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

Public java.util.List<java> 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

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

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

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

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

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

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

Public java.util.Map<java> 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

Connect with Ansys