This chapter explains how Oracle Communications Services Gatekeeper plug-ins can use the generic data in SLAs to customize the behavior of the plug-in.
Plug-ins can specify different behavior for individual service providers or applications using the generic data specified in their service provider or application level SLAs. The plug-in uses generic data specified in the SLAs to do this.
This capability is useful when the data used by a plug-in should be different depending on which service provider or application that the request originates. For example, this can be used for information about parameters that corresponds to a certain group of applications. A certain group might get the priority on their SMS set to LOW because they pay less. The priority might be a parameter that is sent down to the network which handles this.
In an SLA, a <contextAttribute>
is defined as a name/value pair, where the name is defined in the <attributeName>
and the value is specified in <attributeValue>
.
A plug-in can retrieve the value specified in <attributeValue>
using the name specified in <attributeName>
. The value is retrieved using the RequestContext for the request:
String attributeValue = (String)RequestContextManager.getCurrent().get("<attributeName>");
For example, you can retrieve the value associated with the contextAttribute with the attributeName com.bea.wlcp.wlng.plugin.sms.testName1:
String value1 = (String)RequestContextManager.getCurrent().get("com.bea.wlcp.wlng.plugin.sms.testName1");