Namespace: OpenEdge.Net.HTTP.Trace
Class
TraceConfigLoader
Parent classes:
Inherits: Progress.Lang.Object

Copyright (c) 2021 by Progress Software Corporation. All rights reserved.
File:TraceConfigLoader
Purpose:Loads TraceConfig instances from either JSON or files containing such JSON
Author(s):Dustin Grau
Created:Wed Aug 25 10:04:48 EDT 2021
Notes:* The JSON must match the schema in $DLC/src/netlib/OpenEdge/Net/HTTP/Trace/hctracing.config.schema




Method Summary
Options Name Purpose
ClearConfig () /* Clears all the current tracing config options. */
OpenEdge.Net.HTTP.Trace.Formatter.ITraceFormatter GetFormatter (JsonObject) /** Returns a ITraceFormatter implementation based on JSON config data @param JsonObject JSON Config @return ITraceFormatter An implementation of a trace formatter */
OpenEdge.Net.HTTP.Trace.Writer.ITraceWriter GetWriter (JsonObject) /** Returns a ITraceWriter implementation based on JSON config data @param JsonObject JSON Config @return ITraceWriter An implementation of a trace writer */
OpenEdge.Net.HTTP.Trace.TraceConfig LoadFromFile (character) /* Loads tracing config from a file @param character The filename to load. @return TraceConfig A trace config. This may be loaded from the file, or be a default instance */
OpenEdge.Net.HTTP.Trace.TraceConfig LoadFromJson (JsonObject) /* Loads tracing config from a JSON object @param JsonObject The JSON to load. @return TraceConfig A trace config. This may be loaded from the JSON, or be a default instance */
OpenEdge.Net.HTTP.Trace.TraceConfig LoadRules () /* Load HttpClient tracing policy rules from hctracing.config file. */
OpenEdge.Net.HTTP.Trace.TraceConfig LoadRules (character) /** Loads trace config from a specified filename @param character A file name @return TraceConfig The configuration represented by the file. */
OpenEdge.Net.HTTP.Trace.TraceConfig LoadRules (JsonObject) /* Load HttpClient tracing policy rules from a JSON object as given. @param JsonObject Config data in format described for hctracing.config */
OpenEdge.Net.HTTP.Trace.Rule.ITraceRule ParseRules (MessageTypeEnum, Class, JsonObject) /* Parses JSON to create a set of trace rules. @param MessageTypeEnum The type of rules @parm Progress.Lang.Class The tracerule type (interface) @param JsonObject The config data @return ITraceRule[] An array of rules based on the JSON input */
SetOptions (JsonObject, Object) /** Assigns values from the 'options' JSON object to the writer or formatter implementation. The properties in the JSON are used to look for a OOABL property in the implementation. This property must be an instance public property with a publicly-writable setter. If such a property is found, then the JSON value is best-guess converted to that property's ABL data type. If the conversion or the setting fails, the error is logged and the next property is processed. @param JsonObject The JSON options @param PLO The implementation */

Constructor Summary
Options Name Purpose
TraceConfigLoader () /* Always start with an empty static config object. */
TraceConfigLoader () /* Default constructor. PRIVATE to prevent instantion of this class */

Property Summary
Options Name Purpose
INTEGER FileCheckInterval
OpenEdge.Logging.ILogWriter Logger


Method Detail
Top

ClearConfig ()

/* Clears all the current tracing config options.
Top

OpenEdge.Net.HTTP.Trace.Formatter.ITraceFormatter GetFormatter (JsonObject)

Purpose: Returns a ITraceFormatter implementation based on JSON config data
Parameters:
poJsonConfig Progress.Json.ObjectModel.JsonObject
Returns OpenEdge.Net.HTTP.Trace.Formatter.ITraceFormatter
ITraceFormatter An implementation of a trace formatter
Top

OpenEdge.Net.HTTP.Trace.Writer.ITraceWriter GetWriter (JsonObject)

Purpose: Returns a ITraceWriter implementation based on JSON config data
Parameters:
poJsonConfig Progress.Json.ObjectModel.JsonObject
Returns OpenEdge.Net.HTTP.Trace.Writer.ITraceWriter
ITraceWriter An implementation of a trace writer
Top

OpenEdge.Net.HTTP.Trace.TraceConfig LoadFromFile (character)

/* Loads tracing config from a file
Parameters:
pFileName CHARACTER
Returns OpenEdge.Net.HTTP.Trace.TraceConfig
TraceConfig A trace config. This may be loaded from the file, or be a default instance
Top

OpenEdge.Net.HTTP.Trace.TraceConfig LoadFromJson (JsonObject)

/* Loads tracing config from a JSON object
Parameters:
poJsonConfig Progress.Json.ObjectModel.JsonObject
Returns OpenEdge.Net.HTTP.Trace.TraceConfig
TraceConfig A trace config. This may be loaded from the JSON, or be a default instance
Top

OpenEdge.Net.HTTP.Trace.TraceConfig LoadRules ()

/* Load HttpClient tracing policy rules from hctracing.config file.
Returns OpenEdge.Net.HTTP.Trace.TraceConfig
Top

OpenEdge.Net.HTTP.Trace.TraceConfig LoadRules (character)

Purpose: Loads trace config from a specified filename
Parameters:
pConfigFile CHARACTER
Returns OpenEdge.Net.HTTP.Trace.TraceConfig
TraceConfig The configuration represented by the file.
Top

OpenEdge.Net.HTTP.Trace.TraceConfig LoadRules (JsonObject)

/* Load HttpClient tracing policy rules from a JSON object as given.
Parameters:
poJsonConfig Progress.Json.ObjectModel.JsonObject
Returns OpenEdge.Net.HTTP.Trace.TraceConfig
Top

OpenEdge.Net.HTTP.Trace.Rule.ITraceRule ParseRules (MessageTypeEnum, Class, JsonObject)

/* Parses JSON to create a set of trace rules.
@parm Progress.Lang.Class The tracerule type (interface)
Parameters:
pMessageType OpenEdge.Net.HTTP.Trace.MessageTypeEnum
pRuleType Progress.Lang.Class
poJsonRules Progress.Json.ObjectModel.JsonObject
Returns OpenEdge.Net.HTTP.Trace.Rule.ITraceRule
ITraceRule[] An array of rules based on the JSON input
Top

SetOptions (JsonObject, Object)

Purpose: Assigns values from the 'options' JSON object to the writer or formatter implementation.
The properties in the JSON are used to look for a OOABL property in the implementation. This property
must be an instance public property with a publicly-writable setter. If such a property is found,
then the JSON value is best-guess converted to that property's ABL data type.
If the conversion or the setting fails, the error is logged and the next property is processed.
Parameters:
poJsonConfig Progress.Json.ObjectModel.JsonObject
poImplementation Progress.Lang.Object


Constructor Detail
Top

STATIC TraceConfigLoader ()

/* Always start with an empty static config object.
Top

TraceConfigLoader ()

/* Default constructor. PRIVATE to prevent instantion of this class


Property Detail
Top

INTEGER FileCheckInterval

Returns INTEGER
Top

OpenEdge.Logging.ILogWriter Logger

Returns OpenEdge.Logging.ILogWriter


Copyright © 2022 Progress Software Corporation. All rights Reserved.

Progress® OpenEdge® Release 12.5.0