Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions 2025R2/modelCenter_java_api/Changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Changelog

## 2025 R2
- added ModelCenter JAVA API to developer page
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Interface: IPHXAlwaysWriteable

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

**Known Implementing Classes**
- [`PHXReference`](../types/PHXReference.md), [`PHXReferenceArray`](../types/PHXReferenceArray.md)

**Related Classes**
- [`PHXPropertyDescriptor`](PHXPropertyDescriptor.md)

**Declaration**
```java
public interface IPHXAlwaysWriteable
```

This is a specialized interface for ModelCenter Remote Execution. If an object implements this interface, its writeable properties will be writeable regardless of whether any parent properties are writeable or not. Normally a property is only writeable if it is writeable and all of its parent objects are also writeable.
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Interface: IPHXAnalysis

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

**Superinterfaces**
- [`IPHXComponent`](IPHXComponent.md)

**Declaration**
```java
public interface IPHXAnalysis
extends IPHXComponent
```

This is the interface that analyses managed by ModelCenter Remote Execution must implement.

<!--
If you also want to support Athena, you should extend `IPHXAthenaAnalysis` instead.
-->

## Method Summary

| Modifier and Type | Method and Description |
|-------------------|----------------------|
| `void` | `execute()`<br>Executes the analysis. |

### Methods inherited from interface [`com.phoenix_int.aserver.IPHXComponent`](IPHXComponent.md)
`end`

## Method Detail

### execute
```java
void execute()
throws java.lang.Exception
```
Executes the analysis. If the analysis does not run successfully, e.g. the solution does not converge, then an exception should be thrown.

**Throws:**
- `java.lang.Exception` - thrown if the function does not complete successfully
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Interface: IPHXComponent

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

**Known Subinterfaces**
- [`IPHXAnalysis`](IPHXAnalysis.md), [`IPHXDriver`](IPHXDriver.md)

**Known Implementing Classes**
- [`PHXSimpleSelfManager`](PHXSimpleSelfManager.md), [`PHXSimpleSelfManager2`](PHXSimpleSelfManager2.md), [`PHXSimpleSelfManager3`](PHXSimpleSelfManager3.md)

**Related Classes**
- [`PHXComponentBranch`](PHXComponentBranch.md), [`PHXComponentDescription`](PHXComponentDescription.md), [`PHXComponentVersion`](PHXComponentVersion.md), [`PHXGroup`](PHXGroup.md), [`PHXMethodDescriptor`](PHXMethodDescriptor.md), [`PHXPropertyDescriptor`](PHXPropertyDescriptor.md), [`PHXVariableInfo`](PHXVariableInfo.md), [`PHXDFTException`](PHXDFTException.md), [`PHXNoSuchObjectException`](PHXNoSuchObjectException.md), [`PHXNoSuchWriteableObjectException`](PHXNoSuchWriteableObjectException.md), [`PHXInvokeReturn`](PHXInvokeReturn.md), [`PHXNameAlreadyInUseException`](PHXNameAlreadyInUseException.md), [`PHXInvalidNameException`](PHXInvalidNameException.md)

**Declaration**
```java
public interface IPHXComponent
```

This is a common base interface for things served on the ModelCenter Remote Execution.

In addition to the functions specified by this interface, the following static functions may also be defined to provide additional information about a component:

- `public static String getVersion()` — retrieves the version of the component.
- `public static String getAuthor()` — retrieves the author of the component.
- `public static String getDescription()` — retrieves a one-line description of the component.
- `public static String getHelpURL()` — retrieves a URL associated with the component.
- `public static String getKeywords()` — retrieves keywords associated with the component.
- `public static String getIconFile()` — retrieves the name of a 64x64 bmp file used to represent the component as an icon in graphical environments.

The above functions are used by the "describe" command in ModelCenter Remote Execution. If not defined, default values are used. The functions are all static so that they may be called without instantiating the component.

## Method Summary

| Modifier and Type | Method and Description |
|-------------------|----------------------|
| `void` | `end()`<br>Notifies the driver that it has ended. |

## Method Detail

### end
```java
void end()
throws java.lang.Exception
```
Notifies the driver that it has ended. The driver should perform any necessary shutdown functions.

**Throws:**
- `java.lang.Exception` - thrown if the function does not complete successfully
62 changes: 62 additions & 0 deletions 2025R2/modelCenter_java_api/com/phoenix_int/aserver/IPHXDriver.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Interface: IPHXDriver

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

**Superinterfaces**
- [`IPHXComponent`](IPHXComponent.md)

**Related Classes**
- [`IPHXAnalysis`](IPHXAnalysis.md), [`PHXSimpleSelfManager`](PHXSimpleSelfManager.md), [`PHXSimpleSelfManager2`](PHXSimpleSelfManager2.md), [`PHXSimpleSelfManager3`](PHXSimpleSelfManager3.md), [`PHXComponentBranch`](PHXComponentBranch.md), [`PHXComponentDescription`](PHXComponentDescription.md), [`PHXComponentVersion`](PHXComponentVersion.md), [`PHXGroup`](PHXGroup.md), [`PHXMethodDescriptor`](PHXMethodDescriptor.md), [`PHXPropertyDescriptor`](PHXPropertyDescriptor.md), [`PHXVariableInfo`](PHXVariableInfo.md), [`PHXDFTException`](PHXDFTException.md), [`PHXNoSuchObjectException`](PHXNoSuchObjectException.md), [`PHXNoSuchWriteableObjectException`](PHXNoSuchWriteableObjectException.md), [`PHXInvokeReturn`](PHXInvokeReturn.md), [`PHXNameAlreadyInUseException`](PHXNameAlreadyInUseException.md), [`PHXInvalidNameException`](PHXInvalidNameException.md)

**Declaration**
```java
public interface IPHXDriver
extends IPHXComponent
```

This is the interface that drivers managed by ModelCenter Remote Execution must implement.

## Method Summary

| Modifier and Type | Method and Description |
|-------------------|----------------------|
| `boolean` | `endIteration()`<br>Performs the second step for an iteration of a driver. |
| `void` | `initializeIterations()`<br>Initializes the driver to a starting state. |
| `void` | `startIteration()`<br>Performs the first step for an iteration of a driver. |

### Methods inherited from interface [`com.phoenix_int.aserver.IPHXComponent`](IPHXComponent.md)
`end`

## Method Detail

### initializeIterations
```java
void initializeIterations()
throws java.lang.Exception
```
Initializes the driver to a starting state. This function will be called once before a series of step() calls will be made. The function should reset things like iteration counts to initial values.

**Throws:**
- `java.lang.Exception` - thrown if the function does not complete successfully

### startIteration
```java
void startIteration()
throws java.lang.Exception
```
Performs the first step for an iteration of a driver. The driver should set values for all output reference variables. The client application will load these values and compute new values for the input references.

**Throws:**
- `java.lang.Exception` - thrown if the function does not complete successfully

### endIteration
```java
boolean endIteration()
throws java.lang.Exception
```
Performs the second step for an iteration of a driver. Prior to calling this function, the client application will have set values for all input reference variables. The driver should use these values to determine the next iteration, if any.

Returns true if another iteration needs to be performed, false if the driver is complete.

**Throws:**
- `java.lang.Exception` - thrown if the function does not complete successfully
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Interface: IPHXHaltableComponent

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

**Related Interfaces and Classes**
- [`IPHXComponent`](IPHXComponent.md), [`IPHXAnalysis`](IPHXAnalysis.md), [`IPHXDriver`](IPHXDriver.md), [`PHXSimpleSelfManager`](PHXSimpleSelfManager.md), [`PHXSimpleSelfManager2`](PHXSimpleSelfManager2.md), [`PHXSimpleSelfManager3`](PHXSimpleSelfManager3.md), [`PHXComponentBranch`](PHXComponentBranch.md), [`PHXComponentDescription`](PHXComponentDescription.md), [`PHXComponentVersion`](PHXComponentVersion.md), [`PHXGroup`](PHXGroup.md), [`PHXMethodDescriptor`](PHXMethodDescriptor.md), [`PHXPropertyDescriptor`](PHXPropertyDescriptor.md), [`PHXVariableInfo`](PHXVariableInfo.md), [`PHXDFTException`](PHXDFTException.md), [`PHXNoSuchObjectException`](PHXNoSuchObjectException.md), [`PHXNoSuchWriteableObjectException`](PHXNoSuchWriteableObjectException.md), [`PHXInvokeReturn`](PHXInvokeReturn.md), [`PHXNameAlreadyInUseException`](PHXNameAlreadyInUseException.md), [`PHXInvalidNameException`](PHXInvalidNameException.md)

**Declaration**
```java
public interface IPHXHaltableComponent
```

This is a specialized interface for ModelCenter Remote Execution. If a component implements this interface, the MCRE will call this method if a connection is lost prior to ending the component. The method is useful to halt components that are currently running when a connection is lost.

## Method Summary

| Modifier and Type | Method and Description |
|-------------------|----------------------|
| `void` | `halt()`<br>Notifies the component to stop doing whatever it is currently doing. |

## Method Detail

### halt
```java
void halt()
throws java.lang.Exception
```
Notifies the component to stop doing whatever it is currently doing.

**Throws:**
- `java.lang.Exception` - thrown if the function does not complete successfully
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Interface: IPHXMonitorable

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

**Known Implementing Classes**
- [`PHXRunShare`](PHXRunShare.md)

**Related Interfaces and Classes**
- [`IPHXComponent`](IPHXComponent.md), [`IPHXAnalysis`](IPHXAnalysis.md), [`IPHXDriver`](IPHXDriver.md), [`IPHXHaltableComponent`](IPHXHaltableComponent.md), [`PHXSimpleSelfManager`](PHXSimpleSelfManager.md), [`PHXSimpleSelfManager2`](PHXSimpleSelfManager2.md), [`PHXSimpleSelfManager3`](PHXSimpleSelfManager3.md), [`PHXComponentBranch`](PHXComponentBranch.md), [`PHXComponentDescription`](PHXComponentDescription.md), [`PHXComponentVersion`](PHXComponentVersion.md), [`PHXGroup`](PHXGroup.md), [`PHXMethodDescriptor`](PHXMethodDescriptor.md), [`PHXPropertyDescriptor`](PHXPropertyDescriptor.md), [`PHXVariableInfo`](PHXVariableInfo.md), [`PHXDFTException`](PHXDFTException.md), [`PHXNoSuchObjectException`](PHXNoSuchObjectException.md), [`PHXNoSuchWriteableObjectException`](PHXNoSuchWriteableObjectException.md), [`PHXInvokeReturn`](PHXInvokeReturn.md), [`PHXNameAlreadyInUseException`](PHXNameAlreadyInUseException.md), [`PHXInvalidNameException`](PHXInvalidNameException.md)

**Declaration**
```java
public interface IPHXMonitorable
```

This is the interface that analyses which provide information about running processes should implement.

## Method Summary

| Modifier and Type | Method and Description |
|-------------------|----------------------|
| `java.lang.Object` | `getMonitor(java.lang.String monitorName)`<br>Gets a specified monitor. |
| `java.lang.String[]` | `listMonitorableFiles()`<br>Lists all items that may be monitored for output as a component is running. |
| `PHXProcessInfo[]` | `listProcesses()`<br>Lists all the running processes associated with a component. |

## Method Detail

### listProcesses
```java
PHXProcessInfo[] listProcesses()
throws java.io.IOException
```
Lists all the running processes associated with a component.

**Throws:**
- `java.io.IOException` - If there was a problem reading information about running processes

### listMonitorableFiles
```java
java.lang.String[] listMonitorableFiles()
throws java.io.IOException
```
Lists all items that may be monitored for output as a component is running. Note that this is normally in addition to any PHXRawFile output variables that your component exposes. Because of this, these names must not conflict with any variable names.

**Throws:**
- `java.io.IOException`

### getMonitor
```java
java.lang.Object getMonitor(java.lang.String monitorName)
throws PHXNoSuchObjectException
```
Gets a specified monitor. This method can return PHXRawFile objects to publish files for monitoring that don't appear as a regular variable, or PHXMonitorableStream objects to publish random streams of monitor data.

**Returns:**
- either a PHXRawFile or a PHXMonitorableStream object

**Throws:**
- [`PHXNoSuchObjectException`](PHXNoSuchObjectException.md)
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Interface: IPHXRunQueue

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

**Declaration**
```java
public interface IPHXRunQueue
```

## Method Summary

| Modifier and Type | Method and Description |
|-------------------|----------------------|
| `void` | `setRunQueue(java.lang.String connector, java.lang.String queue)`<br>Sets the run queue for a component. |

## Method Detail

### setRunQueue
```java
void setRunQueue(java.lang.String connector, java.lang.String queue)
throws java.lang.Exception
```
Sets the run queue for a component. It is important that this class throws [PHXNoSuchCategoryException](library/PHXNoSuchCategoryException.md) and [ClassNotFoundException](../util/PHXClassNotFoundException.md) in the appropriate cases as they are handled in special ways by the [PHXLibrarianMounter](library/PHXLibrarianMounter.md) and [PHXLibrarianCombiner](library/PHXLibrarianCombiner.md).

**Parameters:**
- `connector` - The name of the selected connector
- `queue` - The name of the selected queue

**Throws:**
- [`ClassNotFoundException`](../util/PHXClassNotFoundException.md) - If compClass doesn't indicate a valid class for the specified directory
- `java.lang.Exception` - If anything goes wrong
- [`PHXNoSuchCategoryException`](library/PHXNoSuchCategoryException.md) - If an invalid category is specified

**See Also:**
- [PHXLibrarianMounter](library/PHXLibrarianMounter.md)
- [PHXLibrarianCombiner](library/PHXLibrarianCombiner.md)
- [PHXNoSuchCategoryException](library/PHXNoSuchCategoryException.md)
- [PHXClassNotFoundException](../util/PHXClassNotFoundException.md)
Loading