Skip to main content

HS.Util.BaseHost

class HS.Util.BaseHost

Update the host class with
  • Add SETTINGS parameter to host - Parameter SETTINGS = "CustomProcessor:Basic";
  • Add oninit code - Method OnInit() As %Status
    { Quit ..ValidateCustomProcessor() }
  • Property Inventory

    Method Inventory

    Parameters

    parameter DOMAIN = HS;

    Properties

    property CustomProcessor as %String (MAXLEN = 512);
    Class name which contains the override OnPre/OnPost methods. Not all OnPre/OnPost methods must be defined.
    Tracing within the methods of the custom processor can be accomplished using
  • $$$HSTRACECALLED (traceoperations set to non-null and not minimal or errorsonly),
  • $$$HSTRACECALLEDMIN (*MINIMAL*),
  • $$$HSTRACECALLEDERROR (*ERRORSONLY*)

  • Call out to another Host Using pHost.SendRequestSync() or pHost.SendRequestAsync()
    Terminate processing in the calling method by setting pStopProcessing = 1 or returning an Error status

    Both OnPre and OnPost methods will be defined as ClassMethods, not instance methods.
    OnPre method signatures are a copy of the method signature with OnPre prepended to the name and pHost,pStop prepended to the variable list
    OnPost method signatures are a copy of the method signature with OnPost prepended to the name and pHost prepended to the variable list
    Property methods: CustomProcessorDisplayToLogical(), CustomProcessorGet(), CustomProcessorIsValid(), CustomProcessorIsValidDisplayToLogical(), CustomProcessorIsValidGet(), CustomProcessorIsValidIsValid(), CustomProcessorIsValidLogicalToDisplay(), CustomProcessorIsValidNormalize(), CustomProcessorIsValidSet(), CustomProcessorLogicalToDisplay(), CustomProcessorLogicalToOdbc(), CustomProcessorNormalize(), CustomProcessorSet()

    Methods

    method InvokeCustom(pMethod, args...)
    $$$OnPre(.tStop,.pRequest,.pResponse) Quit:$g(tStop) $$$OnPost(.pRequest,.pResponse) Tracing can be accomplished using $$$HSTRACECALLED (traceoperations set to non-null and not minimal or errorsonly), $$$HSTRACECALLEDMIN (*MINIMAL*), $$$HSTRACECALLEDERROR (*ERRORSONLY*)
    method ValidateCustomProcessor() as %Status

    Subclasses

    FeedbackOpens in a new tab