ACP API

net.juniper.smgt.acp.application
Interface ActionCongestionPoint

All Known Subinterfaces:
ActionCongestionPointExt

public interface ActionCongestionPoint

An ActionCongestionPoint can be thought of as an plug-in that runs inside the ACP's Java Virtual Machine. It can authorize or reject service sesssions, and can monitor the status of specific congestion points in the network via calls to the interfaces in this Java package.

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.)


Method Summary
 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.
 

Method Detail

init

void init(CongestionPointInfo cpInfo,
          javax.naming.directory.Attributes ldapAttrs,
          java.util.Properties acpConfig)
          throws ActionCongestionPointException
Initializes the ActionCongestionPoint application.

Parameters:
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.
Throws:
ActionCongestionPointException - Can be thrown to signal that the ActionCongestionPoint initialization failed.

authorize

net.juniper.smgt.sae.sspPlugin.NameValue[] authorize(net.juniper.smgt.sae.sspPlugin.NameValue[] nvl)
                                                     throws AuthorizationDenied
Authorizes or denies a service session.

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.

Parameters:
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.
Returns:
NameValue[] May be null. These name value pairs will be applied as parameters to the session activation.
Throws:
AuthorizationDenied - If thrown, the service session will not be activated.

track

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. Also provides interim accounting information while the service session is active.

Parameters:
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.

ACP API