public interface ActionCongestionPoint
This class should be implemented to provide customized congestion point behaviour. It will be instantiated by the ACP. The authorize method is called whenever the ACP receives a service session authorization request from an SAE. The track method is called whenever the ACP receives a service session tracking event from an SAE.
Note that an ActionCongestionPoint implementation will receive only service session authorization requests for services that are associated, via the service's configuration, with the action congestion point.
Critically for stateful ActionCongestionPoints, as soon as zero service sessions are associated with an ActionCongestionPoint, the ACP discards that ActionCongestionPoint, making it available for garbage collection. Later, a new service session requiring authorization may trigger the creation of another ActionCongestionPoint instance with the same instance ID as the discarded ActionCongestionPoint. (The instance ID is accessible via the CongestionPointInfo object passed to the init method.)
Modifier and Type | Method and Description |
---|---|
net.juniper.smgt.sae.sspPlugin.NameValue[] |
authorize(net.juniper.smgt.sae.sspPlugin.NameValue[] nvl)
Authorizes or denies a service session.
|
void |
init(CongestionPointInfo cpInfo,
javax.naming.directory.Attributes ldapAttrs,
java.util.Properties acpConfig)
Initializes the ActionCongestionPoint application.
|
void |
track(net.juniper.smgt.sae.sspPlugin.PluginEventType pet,
net.juniper.smgt.sae.sspPlugin.NameValue[] nvl,
net.juniper.smgt.sae.sspPlugin.SubscriptionInfoHolder subscription)
Notifies this ActionCongestionPoint that a service session has started or stopped.
|
void init(CongestionPointInfo cpInfo, javax.naming.directory.Attributes ldapAttrs, java.util.Properties acpConfig) throws ActionCongestionPointException
cpInfo
- Contains information about the congestion point associated with this ActionCongestionPoint
application, and provides access to a CongestionPointChecker instance, which can be used to
learn about other congestion points.ldapAttrs
- The attributes of the congestion point definition, including the multivalued attribute
"actionProperties", which contains the values entered in the CLI using the CLI command "set
action-parameters". It is possible to specify via the CLI action parameters of the form
"name=value", and then parse them in this method's implementation.acpConfig
- Contains the configuration properties for the ACP that is hosting this action congestion
point application.ActionCongestionPointException
- Can be thrown to signal that the ActionCongestionPoint initialization failed.net.juniper.smgt.sae.sspPlugin.NameValue[] authorize(net.juniper.smgt.sae.sspPlugin.NameValue[] nvl) throws AuthorizationDenied
The names in the name value pairs that are used in this method's arguments and return value are defined in the SAE's CORBA plugin interface. See the CORBA IDL definition of enum "PluginAttribute" for details. The Java binding for this interface provides a constant for each possible name. These can be found in the generated Java class net.juniper.smgt.sae.sspPlugin.PluginAttribute, which is part of /opt/UMC/sae/lib/sae.jar.
nvl
- Name value list. These attributes describe the service session. They are received from the
SAE that is trying to activate the service session. One of the NameValue objects may
represent the substitutions (i.e. activation parameters) exactly as provided in
the original service activation request. Note that these substitutions have not been
affected by the substitution value acquisition mechanism.AuthorizationDenied
- If thrown, the service session will not be activated.void track(net.juniper.smgt.sae.sspPlugin.PluginEventType pet, net.juniper.smgt.sae.sspPlugin.NameValue[] nvl, net.juniper.smgt.sae.sspPlugin.SubscriptionInfoHolder subscription)
pet
- The event type (e.g. start-service, interim-service, stop-service).nvl
- Name/value list. These attributes describe the service session. They are received from the
SAE that is trying to activate the service session. One of the NameValue objects may
represent the substitutions (i.e. activation parameters) exactly as provided in
the original service activation request. Note that these substitutions have not been
affected by the substitution value acquisition mechanism.subscription
- Subscription information. Contains modifiable timeout parameters for the service session.