Each parameter set type may have an OID suffix assigned to it. The OID suffix forms part of the OIDs registered for that parameter set type’s statistics.

A component’s parameter set types must each have a unique OID suffix. Otherwise, an OID conflict occurs.

Assign the OID suffix of a parameter set type with the statistic presentation options defined in the component’s deployment descriptor or in an annotation on its class file.

A parameter set type may be a singleton or a non-singleton. The following example shows a Java annotation, which specifies the statistic presentations of two singleton parameter set types for a resource adaptor.

@OcResourceAdaptor(
    statsPresentation=@ResourceAdaptorStatsPresentation( //This can also be @SBBStatsPresentation or @ProfileStatsPresentation for their corresponding component types.
        alias="RFControl",
        baseOid="@oid.products.sentinel.core.resource-adaptors.rf-control@",
        usageParametersInterfaceTypeOidMappings = {
            @UsageParametersInterfaceTypeOidMapping(interfaceTypeName="ExecutorStats", singleton=true, oidSuffix="@oid.products.sentinel.core.resource-adaptors.rf-control.parameter-set-types.ExecutorStats@"),
            @UsageParametersInterfaceTypeOidMapping(interfaceTypeName="ProxyStats", singleton=true, oidSuffix="@oid.products.sentinel.core.resource-adaptors.rf-control.parameter-set-types.ProxyStats@"),
        }
    )
)

From the annotation in this example, the compile-time annotation processor generates the corresponding entries in an extension deployment descriptor, as shown below:

<oc-resource-adaptor-jar>
    <resource-adaptor id="rf-control-ra-id">
        <stats-presentation alias="RFControl" base-oid="${oid.products.sentinel.core.resource-adaptors.rf-control}">
            <usage-parameters-interface-type-oid-mapping usage-parameters-interface-type-name="ExecutorStats" oid-suffix="${oid.products.sentinel.core.resource-adaptors.rf-control.parameter-set-types.ExecutorStats}" singleton="True"/>
            <usage-parameters-interface-type-oid-mapping usage-parameters-interface-type-name="ProxyStats" oid-suffix="${oid.products.sentinel.core.resource-adaptors.rf-control.parameter-set-types.ProxyStats}" singleton="True"/>
        </stats-presentation>
    </resource-adaptor>
</oc-resource-adaptor-jar>

The Java annotation and the extension deployment descriptor above are equivalent.

Previous page Next page