Namespace: OpenEdge.ApplicationServer.Util
Type: Class OEManagerConnection
Parent Classes:
Inherits: Progress.Lang.Object
Implements: OpenEdge.Logging.ISupportLogging


Copyright (c) 2022 by Progress Software Corporation. All rights reserved.
File:OEManagerConnection
Purpose:Create a reusable connection for OEManager RESTful API's
Description:See https://docs.progress.com/bundle/pas-for-openedge-reference/page/REST-API-Reference-for-oemanager.war.html
Author(s):Dustin Grau
Created:Wed Oct 26 09:27:39 EDT 2022
Notes:Each instance of this class shall include and retain the
relevant server information (host, port, credentials, etc.)
required for accessing only one specific PAS instance.
For instructions on securing the OEManager endpoint, see:
https://docs.progress.com/bundle/openedge-security-and-auditing/page/Secure-the-Tomcat-Manager-and-OpenEdge-Manager-web-applications.html
Purpose:



Method Summary
  Options Name Purpose
  CHARACTER AddAgent (character) /* Add (start) a new MSAgent for an ABL Application https://docs.progress.com/bundle/pas-for-openedge-reference/page/Add-a-multi-session-agent.html @param character ABL Application Name @return character Returned status as text */
  OpenEdge.ApplicationServer.Util.OEManagerConnection Build (character, character, integer, character, character) /* Creates a client connection using a valid URI @param character Scheme @param character Host @param integer Port @param character Username for Basic Auth @param character Password for Basic Auth @return OEManagerConnection */
  OpenEdge.ApplicationServer.Util.OEManagerConnection Build (URI) /* Creates a client connection using a valid URI @param URI Server Uri with credentials for Basic Auth @return OEManagerConnection */
  CreateClient () /* Create the HttpClient and Credentials objects for this connection. */
  Progress.Json.ObjectModel.JsonObject DeleteData (character) /* Perform a termination action against the PAS instance; a valid URL with all parameters must be passed in (excluding the server instance) @param character RESTful API endpoint URL @return JsonObject Data returned from server */
  Progress.Json.ObjectModel.JsonObject FlushDeferredLog (character, integer) /* Write any accumulated deferred log data of an MSAgent for an ABL Application to the configured output file https://docs.progress.com/bundle/pas-for-openedge-reference/page/Flush-deferred-log-buffer-to-agent-log-file.html @param character ABL Application Name @param integer Agent Process ID (PID) @return JsonObject Object as server response */
  Progress.Json.ObjectModel.JsonObject GetAgentManagerProperties (character) /* Get all the agent manager properties for an ABL Application https://docs.progress.com/bundle/pas-for-openedge-reference/page/Get-agent-configuration-properties.html @param character ABL Application Name @return JsonObject Object with AgentManager properties */
  Progress.Json.ObjectModel.JsonArray GetAgentMetrics (character, integer) /* Get available agent metrics for an ABL Application @param character ABL Application Name @param integer Agent Process ID (PID) @return JsonArray Object with agent metrics */
  Progress.Json.ObjectModel.JsonArray GetAgents (character) /* Get a listing of available MSAgents for an ABL Application https://docs.progress.com/bundle/pas-for-openedge-reference/page/List-agents.html @param character ABL Application Name @return JsonArray Array of MSAgent information */
  Progress.Json.ObjectModel.JsonArray GetAgentSessions (character, integer) /* Get a listng of agent (ABL) sessions for a single agent of an ABL Application https://docs.progress.com/bundle/pas-for-openedge-reference/page/Get-session-metrics.html @param character ABL Application Name @param integer Agent Process ID (PID) @return JsonArray Array of ABL Sessions */
  Progress.Json.ObjectModel.JsonArray GetAgentSessionStacks (character, integer, character) /* Get the runtime stack information about a session of an MSAgent for an ABL Application https://docs.progress.com/bundle/pas-for-openedge-reference/page/Dump-a-session-stack.html @param character ABL Application Name @param integer Agent Process ID (PID) @param character Client Session ID (alphanumeric) @return JsonArray Array of MSAgent information */
  Progress.Json.ObjectModel.JsonArray GetAgentSessionStacks (character, integer, integer) /* Get the runtime stack information about a session of an MSAgent for an ABL Application https://docs.progress.com/bundle/pas-for-openedge-reference/page/Dump-a-session-stack.html @param character ABL Application Name @param integer Agent Process ID (PID) @param integer ABL Session ID (numeric) @return JsonArray Array of MSAgent information */
  Progress.Json.ObjectModel.JsonArray GetAgentStacks (character, integer) /* Get the runtime stack information about an MSAgent for an ABL Application @param character ABL Application Name @param integer Agent Process ID (PID) @return JsonArray Array of MSAgent information */
  Progress.Json.ObjectModel.JsonArray GetAgentThreads (character, integer) /* Get a listing of agent (ABL) threads for an ABL Application; Useful for calculating the lifetime of an ABLSession from its start time @param character ABL Application Name @param integer Agent Process ID (PID) @return JsonArray Array of MSAgent threads */
  Progress.Json.ObjectModel.JsonArray GetApplications () /* Get a listing of ABL Applications for a PAS instance https://docs.progress.com/bundle/pas-for-openedge-reference/page/List-ABL-application-information.html @return JsonArray Array of ABL Application information */
  Progress.Json.ObjectModel.JsonArray GetClientSessions (character) /* Get a listing of client (HTTP) sessions for an ABL Application https://docs.progress.com/bundle/pas-for-openedge-reference/page/Get-session-information.html https://docs.progress.com/bundle/pas-for-openedge-management/page/About-session-and-request-states.html @param character ABL Application Name @return JsonArray Array of client sessions */
  Progress.Json.ObjectModel.JsonObject GetData (character) /* Perform a request for information from the PAS instance; a valid URL with all parameters must be passed in (excluding the server instance) @param character RESTful API endpoint URL @return JsonObject Data returned from server */
  Progress.Json.ObjectModel.JsonArray GetDynamicSessionLimit (character, integer) /* Get a listing of session info (incl. the dynamic session limit) for an ABL Application https://docs.progress.com/bundle/pas-for-openedge-reference/page/Get-dynamic-session-limit.html @param character ABL Application Name @param integer Agent Process ID (PID) @return JsonArray Array of session information */
  CHARACTER GetOpOutcome (JsonObject) /* Return the operation outcome from a standard JSON response @param JsonObject Server's JSON response @return character Status as text */
  Progress.Json.ObjectModel.JsonObject GetSessionManagerProperties (character) /* Get all the session manager properties for an ABL Application https://docs.progress.com/bundle/pas-for-openedge-reference/page/Get-configuration-properties.html @param character ABL Application Name @return JsonObject Object with SessionManager properties */
  Progress.Json.ObjectModel.JsonObject GetSessionMetrics (character) /* Get metrics about the session manager which comes from the collectMetrics flag https://docs.progress.com/bundle/pas-for-openedge-reference/page/Get-runtime-metrics.html @param character ABL Application Name @return JsonObject Abject of session metrics */
  LogCommand (character, character) /* Write a server command (Verb+URL) to the commands.log file @param character Action or HTTP Verb @param character Command bound for the OEManager webapp */
  Progress.Json.ObjectModel.JsonObject MakeRequest (MethodEnum, character) /* Perform a request to the PAS instance; expects an HTTP verb and valid URL where all parameters must be passed in (excluding the server instance). This handles various error conditions which may occur when attempting to reach the server or obtain the expected status or JSON results. @param MethodEnum HTTP Method (Verb) @param character RESTful API endpoint URL @return JsonObject Data returned from server */
  Progress.Json.ObjectModel.JsonObject PostData (character) /* Perform an update action against the PAS instance; a valid URL with all parameters must be passed in (excluding the server instance) @param character RESTful API endpoint URL @return JsonObject Data returned from server */
  Progress.Json.ObjectModel.JsonObject RefreshAgent (character, character) /* Trigger a refresh (termination) of all sessions of an MSAgent for an ABL Application https://docs.progress.com/bundle/pas-for-openedge-reference/page/Refresh-all-ABL-sessions-of-one-or-all-agents.html @param character ABL Application Name @param character Agent ID (alphanumeric) @return JsonObject Object as server response */
  Progress.Json.ObjectModel.JsonObject ResetAgentStats (character, integer) /* Clear (reset) any accumulated agent stat data of an MSAgent for an ABL Application @param character ABL Application Name @param integer Agent Process ID (PID) @return JsonObject Object as server response */
  Progress.Json.ObjectModel.JsonObject ResetDeferredLog (character, integer) /* Clear (reset) any accumulated deferred log data of an MSAgent for an ABL Application https://docs.progress.com/bundle/pas-for-openedge-reference/page/Reset-deferred-log-buffer.html @param character ABL Application Name @param integer Agent Process ID (PID) @return JsonObject Object as server response */
  Progress.Json.ObjectModel.JsonObject StopAgent (character, character, character, character) /* Stop (terminate) a single MSAgent for an ABL Application https://docs.progress.com/bundle/pas-for-openedge-reference/page/Stop-a-multi-session-agent.html @param character ABL Application Name @param character Internal Agent ID (alphanumeric) @param character Time to wait (ms) for current request to finish @param character Time to wait (ms) after the current request @return JsonObject Object as server response */
  Progress.Json.ObjectModel.JsonObject TerminateAblSession (character, integer, integer, integer) /* Terminate an agent (ABL) session for an ABL Application @param character ABL Application Name @param integer Agent Process ID (PID) @param integer ABL Session ID (numeric) @param integer Termination option [0-2] @return JsonObject Object as server response */
  Progress.Json.ObjectModel.JsonObject TerminateClientSession (character, integer, character) /* Terminate a client (HTTP) session for an ABL Application https://docs.progress.com/bundle/pas-for-openedge-reference/page/Terminate-a-session.html @param character ABL Application Name @param integer Termination option [0-2] @param character Client Session ID (alphanumeric) @return JsonObject Object as server response */

Constructor Summary
  Options Name Purpose
  OEManagerConnection (character, character, integer, character, character) /* Creates a connection using a valid URI @param character Scheme @param character Host @param integer Port @param character Username for Basic Auth @param character Password for Basic Auth */
  OEManagerConnection (URI) /* Creates a connection using a valid URI @param URI Server Uri with credentials for Basic Auth */

Property Summary
  Options Name Purpose
  CHARACTER Instance
  OpenEdge.Logging.ILogWriter Logger


Method Detail
Top

CHARACTER AddAgent (character)

/* Add (start) a new MSAgent for an ABL Application
https://docs.progress.com/bundle/pas-for-openedge-reference/page/Add-a-multi-session-agent.html //docs.progress.com/bundle/pas-for-openedge-reference/page/Add-a-multi-session-agent.html
Parameters:
pcAblApp CHARACTER
 
Returns CHARACTER
  character Returned status as text
Top

OpenEdge.ApplicationServer.Util.OEManagerConnection Build (character, character, integer, character, character)

/* Creates a client connection using a valid URI
Parameters:
pcScheme CHARACTER
 
pcHost CHARACTER
 
piPort INTEGER
 
pcUser CHARACTER
 
pcPasswd CHARACTER
 
Returns OpenEdge.ApplicationServer.Util.OEManagerConnection
  OEManagerConnection
Top

OpenEdge.ApplicationServer.Util.OEManagerConnection Build (URI)

/* Creates a client connection using a valid URI
Parameters:
poURI OpenEdge.Net.URI
 
Returns OpenEdge.ApplicationServer.Util.OEManagerConnection
  OEManagerConnection
Top

CreateClient ()

/* Create the HttpClient and Credentials objects for this connection.
Top

Progress.Json.ObjectModel.JsonObject DeleteData (character)

/* Perform a termination action against the PAS instance; a valid URL
with all parameters must be passed in (excluding the server instance)
Parameters:
pcHttpUrl CHARACTER
 
Returns Progress.Json.ObjectModel.JsonObject
  JsonObject Data returned from server
Top

Progress.Json.ObjectModel.JsonObject FlushDeferredLog (character, integer)

/* Write any accumulated deferred log data of an MSAgent for an ABL Application to the configured output file
https://docs.progress.com/bundle/pas-for-openedge-reference/page/Flush-deferred-log-buffer-to-agent-log-file.html //docs.progress.com/bundle/pas-for-openedge-reference/page/Flush-deferred-log-buffer-to-agent-log-file.html
Parameters:
pcAblApp CHARACTER
 
piPID INTEGER
 
Returns Progress.Json.ObjectModel.JsonObject
  JsonObject Object as server response
Top

Progress.Json.ObjectModel.JsonObject GetAgentManagerProperties (character)

/* Get all the agent manager properties for an ABL Application
https://docs.progress.com/bundle/pas-for-openedge-reference/page/Get-agent-configuration-properties.html //docs.progress.com/bundle/pas-for-openedge-reference/page/Get-agent-configuration-properties.html
Parameters:
pcAblApp CHARACTER
 
Returns Progress.Json.ObjectModel.JsonObject
  JsonObject Object with AgentManager properties
Top

Progress.Json.ObjectModel.JsonArray GetAgentMetrics (character, integer)

/* Get available agent metrics for an ABL Application
Parameters:
pcAblApp CHARACTER
 
piPID INTEGER
 
Returns Progress.Json.ObjectModel.JsonArray
  JsonArray Object with agent metrics
Top

Progress.Json.ObjectModel.JsonArray GetAgents (character)

/* Get a listing of available MSAgents for an ABL Application
https://docs.progress.com/bundle/pas-for-openedge-reference/page/List-agents.html //docs.progress.com/bundle/pas-for-openedge-reference/page/List-agents.html
Parameters:
pcAblApp CHARACTER
 
Returns Progress.Json.ObjectModel.JsonArray
  JsonArray Array of MSAgent information
Top

Progress.Json.ObjectModel.JsonArray GetAgentSessions (character, integer)

/* Get a listng of agent (ABL) sessions for a single agent of an ABL Application
https://docs.progress.com/bundle/pas-for-openedge-reference/page/Get-session-metrics.html //docs.progress.com/bundle/pas-for-openedge-reference/page/Get-session-metrics.html
Parameters:
pcAblApp CHARACTER
 
piPID INTEGER
 
Returns Progress.Json.ObjectModel.JsonArray
  JsonArray Array of ABL Sessions
Top

Progress.Json.ObjectModel.JsonArray GetAgentSessionStacks (character, integer, character)

/* Get the runtime stack information about a session of an MSAgent for an ABL Application
https://docs.progress.com/bundle/pas-for-openedge-reference/page/Dump-a-session-stack.html //docs.progress.com/bundle/pas-for-openedge-reference/page/Dump-a-session-stack.html
Parameters:
pcAblApp CHARACTER
 
piPID INTEGER
 
pcSession CHARACTER
 
Returns Progress.Json.ObjectModel.JsonArray
  JsonArray Array of MSAgent information
Top

Progress.Json.ObjectModel.JsonArray GetAgentSessionStacks (character, integer, integer)

/* Get the runtime stack information about a session of an MSAgent for an ABL Application
https://docs.progress.com/bundle/pas-for-openedge-reference/page/Dump-a-session-stack.html //docs.progress.com/bundle/pas-for-openedge-reference/page/Dump-a-session-stack.html
Parameters:
pcAblApp CHARACTER
 
piPID INTEGER
 
piSession INTEGER
 
Returns Progress.Json.ObjectModel.JsonArray
  JsonArray Array of MSAgent information
Top

Progress.Json.ObjectModel.JsonArray GetAgentStacks (character, integer)

/* Get the runtime stack information about an MSAgent for an ABL Application
Parameters:
pcAblApp CHARACTER
 
piPID INTEGER
 
Returns Progress.Json.ObjectModel.JsonArray
  JsonArray Array of MSAgent information
Top

Progress.Json.ObjectModel.JsonArray GetAgentThreads (character, integer)

/* Get a listing of agent (ABL) threads for an ABL Application;
Useful for calculating the lifetime of an ABLSession from its start time
Parameters:
pcAblApp CHARACTER
 
piPID INTEGER
 
Returns Progress.Json.ObjectModel.JsonArray
  JsonArray Array of MSAgent threads
Top

Progress.Json.ObjectModel.JsonArray GetApplications ()

/* Get a listing of ABL Applications for a PAS instance
https://docs.progress.com/bundle/pas-for-openedge-reference/page/List-ABL-application-information.html //docs.progress.com/bundle/pas-for-openedge-reference/page/List-ABL-application-information.html
Returns Progress.Json.ObjectModel.JsonArray
  JsonArray Array of ABL Application information
Top

Progress.Json.ObjectModel.JsonArray GetClientSessions (character)

/* Get a listing of client (HTTP) sessions for an ABL Application
https://docs.progress.com/bundle/pas-for-openedge-reference/page/Get-session-information.html //docs.progress.com/bundle/pas-for-openedge-reference/page/Get-session-information.html
https://docs.progress.com/bundle/pas-for-openedge-management/page/About-session-and-request-states.html //docs.progress.com/bundle/pas-for-openedge-management/page/About-session-and-request-states.html
Parameters:
pcAblApp CHARACTER
 
Returns Progress.Json.ObjectModel.JsonArray
  JsonArray Array of client sessions
Top

Progress.Json.ObjectModel.JsonObject GetData (character)

/* Perform a request for information from the PAS instance; a valid URL
with all parameters must be passed in (excluding the server instance)
Parameters:
pcHttpUrl CHARACTER
 
Returns Progress.Json.ObjectModel.JsonObject
  JsonObject Data returned from server
Top

Progress.Json.ObjectModel.JsonArray GetDynamicSessionLimit (character, integer)

/* Get a listing of session info (incl. the dynamic session limit) for an ABL Application
https://docs.progress.com/bundle/pas-for-openedge-reference/page/Get-dynamic-session-limit.html //docs.progress.com/bundle/pas-for-openedge-reference/page/Get-dynamic-session-limit.html
Parameters:
pcAblApp CHARACTER
 
piPID INTEGER
 
Returns Progress.Json.ObjectModel.JsonArray
  JsonArray Array of session information
Top

CHARACTER GetOpOutcome (JsonObject)

/* Return the operation outcome from a standard JSON response
Parameters:
poResponse Progress.Json.ObjectModel.JsonObject
 
Returns CHARACTER
  character Status as text
Top

Progress.Json.ObjectModel.JsonObject GetSessionManagerProperties (character)

/* Get all the session manager properties for an ABL Application
https://docs.progress.com/bundle/pas-for-openedge-reference/page/Get-configuration-properties.html //docs.progress.com/bundle/pas-for-openedge-reference/page/Get-configuration-properties.html
Parameters:
pcAblApp CHARACTER
 
Returns Progress.Json.ObjectModel.JsonObject
  JsonObject Object with SessionManager properties
Top

Progress.Json.ObjectModel.JsonObject GetSessionMetrics (character)

/* Get metrics about the session manager which comes from the collectMetrics flag
https://docs.progress.com/bundle/pas-for-openedge-reference/page/Get-runtime-metrics.html //docs.progress.com/bundle/pas-for-openedge-reference/page/Get-runtime-metrics.html
Parameters:
pcAblApp CHARACTER
 
Returns Progress.Json.ObjectModel.JsonObject
  JsonObject Abject of session metrics
Top

LogCommand (character, character)

/* Write a server command (Verb+URL) to the commands.log file
Parameters:
pcVerb CHARACTER
 
pcCommand CHARACTER
 
Top

Progress.Json.ObjectModel.JsonObject MakeRequest (MethodEnum, character)

/* Perform a request to the PAS instance; expects an HTTP verb and valid URL
where all parameters must be passed in (excluding the server instance).
This handles various error conditions which may occur when attempting
to reach the server or obtain the expected status or JSON results.
Parameters:
poVerb OpenEdge.Net.HTTP.MethodEnum
 
pcHttpUrl CHARACTER
 
Returns Progress.Json.ObjectModel.JsonObject
  JsonObject Data returned from server
Top

Progress.Json.ObjectModel.JsonObject PostData (character)

/* Perform an update action against the PAS instance; a valid URL
with all parameters must be passed in (excluding the server instance)
Parameters:
pcHttpUrl CHARACTER
 
Returns Progress.Json.ObjectModel.JsonObject
  JsonObject Data returned from server
Top

Progress.Json.ObjectModel.JsonObject RefreshAgent (character, character)

/* Trigger a refresh (termination) of all sessions of an MSAgent for an ABL Application
https://docs.progress.com/bundle/pas-for-openedge-reference/page/Refresh-all-ABL-sessions-of-one-or-all-agents.html //docs.progress.com/bundle/pas-for-openedge-reference/page/Refresh-all-ABL-sessions-of-one-or-all-agents.html
Parameters:
pcAblApp CHARACTER
 
pcAgentID CHARACTER
 
Returns Progress.Json.ObjectModel.JsonObject
  JsonObject Object as server response
Top

Progress.Json.ObjectModel.JsonObject ResetAgentStats (character, integer)

/* Clear (reset) any accumulated agent stat data of an MSAgent for an ABL Application
Parameters:
pcAblApp CHARACTER
 
piPID INTEGER
 
Returns Progress.Json.ObjectModel.JsonObject
  JsonObject Object as server response
Top

Progress.Json.ObjectModel.JsonObject ResetDeferredLog (character, integer)

/* Clear (reset) any accumulated deferred log data of an MSAgent for an ABL Application
https://docs.progress.com/bundle/pas-for-openedge-reference/page/Reset-deferred-log-buffer.html //docs.progress.com/bundle/pas-for-openedge-reference/page/Reset-deferred-log-buffer.html
Parameters:
pcAblApp CHARACTER
 
piPID INTEGER
 
Returns Progress.Json.ObjectModel.JsonObject
  JsonObject Object as server response
Top

Progress.Json.ObjectModel.JsonObject StopAgent (character, character, character, character)

/* Stop (terminate) a single MSAgent for an ABL Application
https://docs.progress.com/bundle/pas-for-openedge-reference/page/Stop-a-multi-session-agent.html //docs.progress.com/bundle/pas-for-openedge-reference/page/Stop-a-multi-session-agent.html
Parameters:
pcAblApp CHARACTER
 
pcAgentID CHARACTER
 
piWaitFinish CHARACTER
 
piWaitAfter CHARACTER
 
Returns Progress.Json.ObjectModel.JsonObject
  JsonObject Object as server response
Top

Progress.Json.ObjectModel.JsonObject TerminateAblSession (character, integer, integer, integer)

/* Terminate an agent (ABL) session for an ABL Application
Parameters:
pcAblApp CHARACTER
 
piPID INTEGER
 
piSession INTEGER
 
piTermOpt INTEGER
 
Returns Progress.Json.ObjectModel.JsonObject
  JsonObject Object as server response
Top

Progress.Json.ObjectModel.JsonObject TerminateClientSession (character, integer, character)

/* Terminate a client (HTTP) session for an ABL Application
https://docs.progress.com/bundle/pas-for-openedge-reference/page/Terminate-a-session.html //docs.progress.com/bundle/pas-for-openedge-reference/page/Terminate-a-session.html
Parameters:
pcAblApp CHARACTER
 
piTermOpt INTEGER
 
pcSession CHARACTER
 
Returns Progress.Json.ObjectModel.JsonObject
  JsonObject Object as server response


Constructor Detail
Top

OEManagerConnection (character, character, integer, character, character)

/* Creates a connection using a valid URI
Parameters:
pcScheme CHARACTER
 
pcHost CHARACTER
 
piPort INTEGER
 
pcUser CHARACTER
 
pcPasswd CHARACTER
 
Top

OEManagerConnection (URI)

/* Creates a connection using a valid URI
Parameters:
poURI OpenEdge.Net.URI
 


Property Detail
Top

CHARACTER Instance

Returns CHARACTER
 
Top

OpenEdge.Logging.ILogWriter Logger

Returns OpenEdge.Logging.ILogWriter