Cisco Systems, Inc.

com.pcube.apps.engage.policy
Class Rule

java.lang.Object
  extended by com.pcube.apps.engage.common.ArrayElement
      extended by com.pcube.apps.engage.policy.Rule
All Implemented Interfaces:
Formattable, java.io.Serializable, java.lang.Cloneable

public class Rule
extends ArrayElement
implements java.io.Serializable, java.lang.Cloneable, Formattable

An action to perform on a flow. A rule is package-service-timeslot dependant and is part of the Package's properties (Package->ServiceRuleArray->ServiceRule->Rule). A rule has numerous parameters defining resources the flow is allowed while being preBreached and postBreached.
The rule is time based and is kept in the ServiceRule. A rule can be for a specific time frame or a default rule for all the time frames which didn't define a specific rule in the ServiceRule.
The Rule belongs to a Policy which enforces validation restrictions on it, such as the existance of the Service.
The Rule defines certain volume and sessions limitations that crossing them is considered as a breach. The Rule has active limitations prior to the breach and another set of limitations after the breach. The limitations are on the flow's access (allow, block or block and redirect if possible), bandwidth, number of concurrent sessions and a BWController to which the bandwidth is accumulated and which sets the QoS the flow will get.

See Also:
ServiceRule, ACCESS_ADMIT, ACCESS_BLOCK, ACCESS_BLOCK_AND_REDIRECT, Serialized Form

Field Summary
static byte ACCESS_ADMIT
          Allow the flow to continue.
static byte ACCESS_BLOCK
          Block the flow.
static byte ACCESS_BLOCK_AND_REDIRECT
          Block the flow by redirectiong it.
static byte ACCESS_NO_CHANGE_IN_ACTIVE_ACTIONS
          Post breach access is the same as the pre-breach access.
static byte BLOCK_REPORT_DONT_GENERATE
          Do not generate block report.
static byte BLOCK_REPORT_ON_ACCESS_BLOCK
          Generate block report when the flow is blocked.
static byte BLOCK_REPORT_ON_BOTH_ACCESS_AND_CONC_SESSIONS
          Generate block report when the block both when the flow is blocked and when number of concurrent sessions is exceeded.
static byte BLOCK_REPORT_ON_CONC_SESSION
          Generate block report when number of concurrent sessions is exceeded.
static int DEFAULT_CONDITIONAL_REDIRECT_VAL
           
static int DEFAULT_TRAFFIC_MIRRORING_VAL
           
static int DISABLE_NOTIFICATION
          Comment for DISABLE_NOTIFICATION
static int EXTERNAL_QUOTA_MANAGMENT
          Comment for EXTERNAL_QUOTA_MANAGMENT
static long MAX_BANDWIDTH
          57Mbps, bandwidth should be multiple by 1000.
static long MAX_CONCURRENT_SESSIONS
          Max concurrent sessions for the concurrent sessions limit.
static int PERIODICAL_QUOTA_MANAGMENT
          Comment for PERIODICAL_QUOTA_MANAGMENT
static short RULE_STATE_DISABLED
          Disables the Rule.
static short RULE_STATE_ENABLED
          Enables the Rule.
static short RULE_STATE_IGNORE
          The Rule is ignored.
static long UNLIMITED_BANDWIDTH
          Unlimited bandwidth for the bandwidth volume.
static long UNLIMITED_CONCURRENT_SESSIONS
          Unlimited concurrent sessions for the concurrent sessions limit.
static int UNLIMITED_QUOTA_BUCKET_ID
          Comment for DEFUALT_QUOTA_BUCKET
 
Method Summary
 java.lang.Object clone()
           
 void disablePostBreachNotification()
          don't activate subscriber notification if breach occures
 void fromStream(java.io.BufferedReader in, Formatter f)
          Method fromStream
 byte getBlockReportParameter()
          Gets the term in which a report for blocking a flow is generated.
 java.lang.String getBwcName()
           
 CoS getCos()
           
 java.lang.String getDescription()
          Gets this Rule's description.
 int getDirection()
           
 QuotaBucketInterface getDownQuotaBucket()
          QuotaBucket: Services will use this quota bucket
 java.lang.String getGcName()
           
 long getGcPir()
           
 int getInternalRedirectStringsIndex()
          Deprecated.  
 java.lang.String getName()
          Gets this Rule's name.
 Package getPackage()
           
 int getPackageIndex()
          Deprecated. use setPackage
 byte getPostBreachAccessMode()
          Gets this Rule's access mode after the breach occurance.
 long getPostBreachConcSessions()
          Gets this Rule's limitation for concurrent sessions after the breach occurance.
 long getPostBreachDownstreamBW()
          Gets this Rule's downstream BW limitation prior to the breach occurance.
 ToSMarker getPostBreachDownstreamTos()
           
 SubscriberRedirection getPostBreachNotification()
           
 long getPostBreachUpstreamBW()
          Gets this Rule's upstream BW limitation prior to the breach occurance.
 ToSMarker getPostBreachUpstreamTos()
           
 int getPostConditionalRedirectIndex()
           
 SubscriberRedirection getPostConditionalRedirectItem()
           
 int getPostDownBWCIdx()
          Gets the downstram BWController index of the BWController that this Rule's activity, after the breach occurance, is accumulated into.
 int getPostTrafficMirroringIndex()
           
 int getPostUpBWCIdx()
          Gets the upstream BWController index of the BWController that this Rule's activity, after the breach occurance, is accumulated into.
 byte getPreBreachAccessMode()
          Gets this Rule's access mode prior to the breach occurance.
 long getPreBreachConcSessions()
          Gets this Rule's limitation for concurrent sessions before the breach occurance.
 long getPreBreachDownstreamBW()
          Gets this Rule's downstream BW limit for the behavior prior to a breach occurance.
 ToSMarker getPreBreachDownstreamTos()
           
 long getPreBreachUpstreamBW()
          Gets this Rule's upstream BW limit for the behavior prior to a breach occurance.
 ToSMarker getPreBreachUpstreamTos()
           
 int getPreConditionalRedirectIndex()
           
 SubscriberRedirection getPreConditionalRedirectItem()
           
 int getPreDownBWCIdx()
          Gets the downstram BWController index of the BWController that this Rule's activity, prior to the breach occurance, is accumulated into.
 int getPreTrafficMirroringIndex()
           
 int getPreUpBWCIdx()
          Gets the upstream BWController index of the BWController that this Rule's activity, prior to the breach occurance, is accumulated into.
 int getQuotaManagmentMode()
          quota managment mode
 boolean getRdrDataEnabled()
           
 int getRedirectStringsIndex()
          Deprecated.  
 RuleFrame getRuleFrame()
           
 int getRuleFrameIndex()
           
 java.lang.String getRuleFrameName()
           
 Service getService()
           
 java.lang.String getServiceName()
          Gets the Service name of the Service that this Rule applys to.
 QuotaBucketInterface getSessionQuotaBucket()
          returns the session quota bucket.
 short getState()
          Gets this Rule's restriction enforcement mode.
 TimeFrame getTimeFrame()
          Gets the time frame this Rule applys to.
 QuotaBucketInterface getUpQuotaBucket()
          QuotaBucket: Service will use this quota bucket for upstream traffic
 boolean isBillingReportEnabled()
          Checking if the billing report is enabled or disabled
 boolean isDefaultRule()
          isDefaultRule - false if rule is a time based rule
 boolean isDefaultRuleOverride()
           
 boolean isDisablePostBreachNotification()
           
 boolean isExternalQuotaManagment()
           
 boolean isFlowSignalingRdrEnabled()
           
 boolean isGlobalRule()
           
 boolean isMirroringAttached()
           
 boolean isOverrideTurChecked()
           
 boolean isPostBeachNotificationEnabled()
           
 boolean isPostRedirected()
           
 boolean isPostTrafficMirroringSet()
           
 boolean isPreTrafficMirroringSet()
           
 boolean isRedirected()
           
 boolean isRuleFrame()
           
 boolean isTurEnabled()
           
 void resetRuleValuesToDefault()
          Sets the rule properties to default access mode - admit BWC are set to the package's default BWC.
 void setBillingReportEnabled(boolean newBillingReportEnabled)
          Enabling or disabling the billing report
 void setBlockReportParameter(byte newBlockReportParameter)
          Configures the terms in which to create a report for blocking a flow.
 void setBwcName(java.lang.String bwcName)
           
 void setCos(CoS newCos)
           
 void setDefaultRuleOverride(boolean defaultRuleOverride)
           
 void setDescription(java.lang.String newDescription)
          Sets this Rule's description.
 void setDirection(int direction)
           
 void setDownQuotaBucket(int id)
          set the quota bucket for downstream traffic.
 void setFlowSignalingRdrEnabled(boolean flowSignalingRdrEnabled)
           
 void setGcName(java.lang.String gcName)
           
 void setGcPir(long gcPir)
           
 void setGlobalRule(boolean globalRule)
           
 void setName(java.lang.String newName)
          Sets this Rule's name.
 void setOverrideTurChecked(boolean overrideTur)
           
 void setPackageIndex(int index)
          Gets the index in the Policy's PackageArray of the Package this Rule belongs to.
 void setPolicy(Policy m_policy)
           
 void setPostBreachAccessMode(byte newPostBreachAccessMode)
          Sets this Rule's access mode after the breach occurance.
 void setPostBreachConcSessions(long newPostBreachConcSessions)
          Sets this Rule's limitation for concurrent sessions after the breach occurance.
 void setPostBreachDownstreamBW(long newPostBreachBW)
          Sets this Rule's downstream BW limitation prior to the breach occurance.
 void setPostBreachDownstreamTos(ToSMarker marker)
           
 void setPostBreachNotification(SubNotification conditionalRedirectNotifications)
          sets the notification that will be activated upon quota breach.
 void setPostBreachNotification(SubscriberRedirection subscriberRedirection)
          sets the notification that will be activated upon quota breach.
 void setPostBreachUpstreamBW(long newPostBreachBW)
          Sets this Rule's upstream BW limitation prior to the breach occurance.
 void setPostBreachUpstreamTos(ToSMarker marker)
           
 void setPostConditionalRedirectIndex(int _postConditionalRedirectIndex)
           
 void setPostDownBWCIdx(int newBWCIdx)
          Sets the downstream BWController index of the BWController that this Rule's activity, prior to the breach occurance, is accumulated into.
 void setPostTrafficMirroringIndex(int postTrafficMirroringIndex)
           
 void setPostTrafficMirroringSet(boolean isPostTrafficMirroringSet)
           
 void setPostUpBWCIdx(int newBWCIdx)
          Sets the upstream BWController index of the BWController that this Rule's activity, prior to the breach occurance, is accumulated into.
 void setPreBreachAccessMode(byte newPreBreachAccessMode)
          Sets this Rule's access mode prior to the breach occurance.
 void setPreBreachConcSessions(long newPreBreachConcSessions)
          Sets this Rule's limitation for concurrent sessions before the breach occurance.
 void setPreBreachDownstreamBW(long newPreBreachBW)
          Sets this Rule's upstream BW limit which is enforced prior to a breach occuring.
 void setPreBreachDownstreamTos(ToSMarker marker)
           
 void setPreBreachUpstreamBW(long newPreBreachBW)
          Sets this Rule's upstream BW limit which is enforced prior to a breach occuring.
 void setPreBreachUpstreamTos(ToSMarker marker)
           
 void setPreConditionalRedirectIndex(int _preConditionalRedirectIndex)
           
 void setPreDownBWCIdx(int newBWCIdx)
          Sets the downstram BWController that this Rule's activity, prior to the breach occurance, is accumulated into.
 void setPreTrafficMirroringIndex(int preTrafficMirroringIndex)
           
 void setPreTrafficMirroringSet(boolean isPreTrafficMirroringSet)
           
 void setPreUpBWCIdx(int newBWCIdx)
          Sets the upstram BWController that this Rule's activity, prior to the breach occurance, is accumulated into.
 void setQuotaManagmentMode(int mode)
          quota managment mode
 void setRdrDataEnabled(boolean rdrDataEnabled)
           
 void setRedirectStringsIndex(int index)
          Deprecated.  
 void setRuleFrame(boolean ruleFrame)
           
 void setRuleFrameIndex(int ruleFrameIndex)
           
 void setServiceName(java.lang.String newServiceName)
          Sets the Service name of the Service that this Rule applys to.
 void setSessionQuotaBucket(int id)
           
 void setState(short newState)
          Sets this Rule's restriction behavior.
 void setTurEnabled(boolean turEnabled)
           
 void setUpQuotaBucket(int id)
           
 void toStream(java.io.PrintStream out, Formatter f)
          Method toStream
 java.lang.String toString()
          Gets this Rule's String represntation.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ACCESS_ADMIT

public static final byte ACCESS_ADMIT
Allow the flow to continue.

See Also:
Constant Field Values

ACCESS_BLOCK

public static final byte ACCESS_BLOCK
Block the flow.

See Also:
Constant Field Values

ACCESS_BLOCK_AND_REDIRECT

public static final byte ACCESS_BLOCK_AND_REDIRECT
Block the flow by redirectiong it.

See Also:
Constant Field Values

ACCESS_NO_CHANGE_IN_ACTIVE_ACTIONS

public static final byte ACCESS_NO_CHANGE_IN_ACTIVE_ACTIONS
Post breach access is the same as the pre-breach access.

See Also:
Constant Field Values

BLOCK_REPORT_DONT_GENERATE

public static final byte BLOCK_REPORT_DONT_GENERATE
Do not generate block report.

See Also:
Constant Field Values

BLOCK_REPORT_ON_ACCESS_BLOCK

public static final byte BLOCK_REPORT_ON_ACCESS_BLOCK
Generate block report when the flow is blocked.

See Also:
Constant Field Values

BLOCK_REPORT_ON_BOTH_ACCESS_AND_CONC_SESSIONS

public static final byte BLOCK_REPORT_ON_BOTH_ACCESS_AND_CONC_SESSIONS
Generate block report when the block both when the flow is blocked and when number of concurrent sessions is exceeded.

See Also:
Constant Field Values

BLOCK_REPORT_ON_CONC_SESSION

public static final byte BLOCK_REPORT_ON_CONC_SESSION
Generate block report when number of concurrent sessions is exceeded.

See Also:
Constant Field Values

DISABLE_NOTIFICATION

public static final int DISABLE_NOTIFICATION
Comment for DISABLE_NOTIFICATION

See Also:
Constant Field Values

EXTERNAL_QUOTA_MANAGMENT

public static final int EXTERNAL_QUOTA_MANAGMENT
Comment for EXTERNAL_QUOTA_MANAGMENT

See Also:
Constant Field Values

PERIODICAL_QUOTA_MANAGMENT

public static final int PERIODICAL_QUOTA_MANAGMENT
Comment for PERIODICAL_QUOTA_MANAGMENT

See Also:
Constant Field Values

RULE_STATE_DISABLED

public static final short RULE_STATE_DISABLED
Disables the Rule.

See Also:
Constant Field Values

RULE_STATE_ENABLED

public static final short RULE_STATE_ENABLED
Enables the Rule.

See Also:
Constant Field Values

RULE_STATE_IGNORE

public static final short RULE_STATE_IGNORE
The Rule is ignored.

See Also:
Constant Field Values

UNLIMITED_BANDWIDTH

public static final long UNLIMITED_BANDWIDTH
Unlimited bandwidth for the bandwidth volume.

See Also:
Constant Field Values

UNLIMITED_CONCURRENT_SESSIONS

public static final long UNLIMITED_CONCURRENT_SESSIONS
Unlimited concurrent sessions for the concurrent sessions limit.

See Also:
Constant Field Values

MAX_BANDWIDTH

public static final long MAX_BANDWIDTH
57Mbps, bandwidth should be multiple by 1000.

See Also:
Constant Field Values

MAX_CONCURRENT_SESSIONS

public static final long MAX_CONCURRENT_SESSIONS
Max concurrent sessions for the concurrent sessions limit.

See Also:
Constant Field Values

UNLIMITED_QUOTA_BUCKET_ID

public static final int UNLIMITED_QUOTA_BUCKET_ID
Comment for DEFUALT_QUOTA_BUCKET


DEFAULT_TRAFFIC_MIRRORING_VAL

public static final int DEFAULT_TRAFFIC_MIRRORING_VAL
See Also:
Constant Field Values

DEFAULT_CONDITIONAL_REDIRECT_VAL

public static final int DEFAULT_CONDITIONAL_REDIRECT_VAL
See Also:
Constant Field Values
Method Detail

clone

public java.lang.Object clone()
Specified by:
clone in class ArrayElement
See Also:
ArrayElement.clone()

disablePostBreachNotification

public void disablePostBreachNotification()
don't activate subscriber notification if breach occures


isDisablePostBreachNotification

public boolean isDisablePostBreachNotification()

fromStream

public void fromStream(java.io.BufferedReader in,
                       Formatter f)
                throws ImportExportException
Description copied from interface: Formattable
Method fromStream

Specified by:
fromStream in interface Formattable
Throws:
ImportExportException
See Also:
Formattable.fromStream(java.io.BufferedReader, com.pcube.apps.engage.common.Formatter)

getBlockReportParameter

public byte getBlockReportParameter()
Gets the term in which a report for blocking a flow is generated.

Returns:
this Rule's block report parameter
See Also:
BLOCK_REPORT_ON_ACCESS_BLOCK, BLOCK_REPORT_ON_BOTH_ACCESS_AND_CONC_SESSIONS, BLOCK_REPORT_ON_CONC_SESSION

getCos

public CoS getCos()
Returns:

getDescription

public java.lang.String getDescription()
Gets this Rule's description.

Returns:
this Rule's description

getDownQuotaBucket

public QuotaBucketInterface getDownQuotaBucket()
QuotaBucket: Services will use this quota bucket

Returns:
a quota bucket

getName

public java.lang.String getName()
Gets this Rule's name.

Returns:
this Rule's name

getPackage

public Package getPackage()
                   throws ItemNotFoundException
Returns:
Returns the pack.
Throws:
ItemNotFoundException

getPackageIndex

public int getPackageIndex()
Deprecated. use setPackage

Gets the index in the Policy's PackageArray of the Package this Rule belongs to.

Returns:
this Rule's Package index *

getPostBreachAccessMode

public byte getPostBreachAccessMode()
Gets this Rule's access mode after the breach occurance.

Returns:
this Rule's post breach access mode
See Also:
ACCESS_ADMIT, ACCESS_BLOCK, ACCESS_BLOCK_AND_REDIRECT, ACCESS_NO_CHANGE_IN_ACTIVE_ACTIONS

getPostBreachConcSessions

public long getPostBreachConcSessions()
Gets this Rule's limitation for concurrent sessions after the breach occurance.

Returns:
this Rule's post breach session limitation

getPostBreachDownstreamBW

public long getPostBreachDownstreamBW()
Gets this Rule's downstream BW limitation prior to the breach occurance.

Returns:
this Rule's pre breach BW limitation

getPostDownBWCIdx

public int getPostDownBWCIdx()
Gets the downstram BWController index of the BWController that this Rule's activity, after the breach occurance, is accumulated into.

Returns:
- the BWController index in the BWControllerArray.

getPostBreachNotification

public SubscriberRedirection getPostBreachNotification()
                                                throws PolicyInconsistencyException
Returns:
subscriber notification or null if does not exists (inconsistency problem)
Throws:
PolicyInconsistencyException

getPostBreachUpstreamBW

public long getPostBreachUpstreamBW()
Gets this Rule's upstream BW limitation prior to the breach occurance.

Returns:
this Rule's pre breach BW limitation

getPostUpBWCIdx

public int getPostUpBWCIdx()
Gets the upstream BWController index of the BWController that this Rule's activity, after the breach occurance, is accumulated into.

Returns:
- the BWController index in the BWControllerArray.

getPreBreachAccessMode

public byte getPreBreachAccessMode()
Gets this Rule's access mode prior to the breach occurance.

Returns:
this Rule's pre breach access mode
See Also:
ACCESS_ADMIT, ACCESS_BLOCK, ACCESS_BLOCK_AND_REDIRECT

getPreBreachConcSessions

public long getPreBreachConcSessions()
Gets this Rule's limitation for concurrent sessions before the breach occurance.

Returns:
this Rule's pre breach session limitation

getPreBreachDownstreamBW

public long getPreBreachDownstreamBW()
Gets this Rule's downstream BW limit for the behavior prior to a breach occurance.

Returns:
the BW limit

getPreDownBWCIdx

public int getPreDownBWCIdx()
Gets the downstram BWController index of the BWController that this Rule's activity, prior to the breach occurance, is accumulated into.

Returns:
- the BWController index in the BWControllerArray.

getPreBreachUpstreamBW

public long getPreBreachUpstreamBW()
Gets this Rule's upstream BW limit for the behavior prior to a breach occurance.

Returns:
the BW limit

getPreUpBWCIdx

public int getPreUpBWCIdx()
Gets the upstream BWController index of the BWController that this Rule's activity, prior to the breach occurance, is accumulated into.

Returns:
- the BWController index in the BWControllerArray.

getQuotaManagmentMode

public int getQuotaManagmentMode()
quota managment mode

Returns:
Rule.EXTERNAL_QUOTA_MANAGMENT or Rule.PERIODICAL_MANAGMENT_MODE

getRedirectStringsIndex

public int getRedirectStringsIndex()
Deprecated. 

Gets the redirect string which the redirectable Rule's Service's Protocols will use from their array of redirect strings. Since there is no loger redirect in rule, we support this only for backward compatebility... we will retrieve the redirect index from the conditional redirect assgined to this rule.

Returns:
the index of the Rule's Service's Protocol redirect string in their redirect string array

getInternalRedirectStringsIndex

public int getInternalRedirectStringsIndex()
Deprecated. 

Gets the redirect string which the redirectable Rule's Service's Protocols will use from their array of redirect strings. used for converting the redirect to notification - for backward competability

Returns:
the index of the Rule's Service's Protocol redirect string in their redirect string array

getService

public Service getService()
                   throws ItemNotFoundException
Throws:
ItemNotFoundException

getServiceName

public java.lang.String getServiceName()
Gets the Service name of the Service that this Rule applys to.

Returns:
this Rule's Service name

getRuleFrameName

public java.lang.String getRuleFrameName()

getSessionQuotaBucket

public QuotaBucketInterface getSessionQuotaBucket()
returns the session quota bucket. if quota managment mode is external returns the unlimited bucket.

Returns:
session quota bucket.

getState

public short getState()
Gets this Rule's restriction enforcement mode.

Returns:
this Rule's restriction enforcement mode
See Also:
RULE_STATE_ENABLED, RULE_STATE_DISABLED, RULE_STATE_IGNORE

getTimeFrame

public TimeFrame getTimeFrame()
Gets the time frame this Rule applys to. If this Rule is a default Rule, this parameter is insignificant.

Returns:
the TimeFrame this Rule applys to

getRuleFrame

public RuleFrame getRuleFrame()

getUpQuotaBucket

public QuotaBucketInterface getUpQuotaBucket()
QuotaBucket: Service will use this quota bucket for upstream traffic

Returns:
a quota bucket

isBillingReportEnabled

public boolean isBillingReportEnabled()
Checking if the billing report is enabled or disabled

Returns:
true - the billing report is enabled ; false - the billing report is disabled

isExternalQuotaManagment

public boolean isExternalQuotaManagment()
Returns:

isPostBeachNotificationEnabled

public boolean isPostBeachNotificationEnabled()
Returns:
true if there is a notification associated with this rule

setBillingReportEnabled

public void setBillingReportEnabled(boolean newBillingReportEnabled)
Enabling or disabling the billing report

Parameters:
newBillingReportEnabled - - if true enabling the report, otherwise disabling it

setBlockReportParameter

public void setBlockReportParameter(byte newBlockReportParameter)
Configures the terms in which to create a report for blocking a flow.

Parameters:
newBlockReportParameter - the new block report parameter
See Also:
BLOCK_REPORT_DONT_GENERATE, BLOCK_REPORT_ON_ACCESS_BLOCK, BLOCK_REPORT_ON_BOTH_ACCESS_AND_CONC_SESSIONS, BLOCK_REPORT_ON_CONC_SESSION

setCos

public void setCos(CoS newCos)
Parameters:
newCos -

setDescription

public void setDescription(java.lang.String newDescription)
Sets this Rule's description.

Parameters:
newDescription - the new description

setDownQuotaBucket

public void setDownQuotaBucket(int id)
set the quota bucket for downstream traffic.

Parameters:
bucket - bucket
Throws:
java.lang.IllegalArgumentException - - thrown if quota bucket is not one of the system's buckets

setName

public void setName(java.lang.String newName)
Sets this Rule's name.

Parameters:
newName - the new name

setPackageIndex

public void setPackageIndex(int index)
Gets the index in the Policy's PackageArray of the Package this Rule belongs to.

Parameters:
index - the new Package index

setPolicy

public void setPolicy(Policy m_policy)
Parameters:
m_policy - The policy to set.

setPostBreachAccessMode

public void setPostBreachAccessMode(byte newPostBreachAccessMode)
Sets this Rule's access mode after the breach occurance.

Parameters:
newPostBreachAccessMode - the new post breach access mode
See Also:
ACCESS_ADMIT, ACCESS_BLOCK, ACCESS_BLOCK_AND_REDIRECT, ACCESS_NO_CHANGE_IN_ACTIVE_ACTIONS

setPostBreachConcSessions

public void setPostBreachConcSessions(long newPostBreachConcSessions)
Sets this Rule's limitation for concurrent sessions after the breach occurance.

Parameters:
newPostBreachConcSessions - the new post breach session limitation
Throws:
java.lang.IllegalArgumentException - if the post breach access mode is ACCESS_NO_CHANGE_IN_ACTIVE_ACTIONS

setPostBreachDownstreamBW

public void setPostBreachDownstreamBW(long newPostBreachBW)
Sets this Rule's downstream BW limitation prior to the breach occurance.

Parameters:
newPostBreachBW - the new BW limit
Throws:
java.lang.IllegalArgumentException - if the post breach access mode is ACCESS_NO_CHANGE_IN_ACTIVE_ACTIONS

setPostDownBWCIdx

public void setPostDownBWCIdx(int newBWCIdx)
                       throws ItemNotFoundException
Sets the downstream BWController index of the BWController that this Rule's activity, prior to the breach occurance, is accumulated into.

Parameters:
newBWCIdx - the BWController index in the BWControllerArray.
Throws:
ItemNotFoundException - - if such BWC does not exist

setPostBreachNotification

public void setPostBreachNotification(SubscriberRedirection subscriberRedirection)
sets the notification that will be activated upon quota breach. if notification is disabled it will be enabled.

Parameters:
subscriberRedirection -

setPostBreachNotification

public void setPostBreachNotification(SubNotification conditionalRedirectNotifications)
sets the notification that will be activated upon quota breach. if notification is disabled it will be enabled.

Parameters:
conditionalRedirectNotifications -

setPostBreachUpstreamBW

public void setPostBreachUpstreamBW(long newPostBreachBW)
Sets this Rule's upstream BW limitation prior to the breach occurance.

Parameters:
newPostBreachBW - the new BW limit
Throws:
java.lang.IllegalArgumentException - if the post breach access mode is ACCESS_NO_CHANGE_IN_ACTIVE_ACTIONS

setPostUpBWCIdx

public void setPostUpBWCIdx(int newBWCIdx)
                     throws ItemNotFoundException
Sets the upstream BWController index of the BWController that this Rule's activity, prior to the breach occurance, is accumulated into.

Parameters:
newBWCIdx - the BWController index in the BWControllerArray.
Throws:
ItemNotFoundException - if no such BWController exists

setPreBreachAccessMode

public void setPreBreachAccessMode(byte newPreBreachAccessMode)
Sets this Rule's access mode prior to the breach occurance.

Parameters:
newPreBreachAccessMode - the new pre breach access mode
See Also:
ACCESS_ADMIT, ACCESS_BLOCK, ACCESS_BLOCK_AND_REDIRECT

setPreBreachConcSessions

public void setPreBreachConcSessions(long newPreBreachConcSessions)
Sets this Rule's limitation for concurrent sessions before the breach occurance.

Parameters:
newPreBreachConcSessions - the new pre breach session limitation

setPreBreachDownstreamBW

public void setPreBreachDownstreamBW(long newPreBreachBW)
Sets this Rule's upstream BW limit which is enforced prior to a breach occuring.

Parameters:
newPreBreachBW - the new BW limit

setPreDownBWCIdx

public void setPreDownBWCIdx(int newBWCIdx)
                      throws ItemNotFoundException
Sets the downstram BWController that this Rule's activity, prior to the breach occurance, is accumulated into.

Parameters:
newBWCIdx - the BWController index in the BWControllerArray.
Throws:
ItemNotFoundException - if no such BWController exists

setPreBreachUpstreamBW

public void setPreBreachUpstreamBW(long newPreBreachBW)
Sets this Rule's upstream BW limit which is enforced prior to a breach occuring.

Parameters:
newPreBreachBW - the new BW limit

setPreUpBWCIdx

public void setPreUpBWCIdx(int newBWCIdx)
                    throws ItemNotFoundException
Sets the upstram BWController that this Rule's activity, prior to the breach occurance, is accumulated into.

Parameters:
newBWCIdx - the BWController index in the BWControllerArray.
ItemNotFoundException - if such BWC does not exist
Throws:
ItemNotFoundException

setQuotaManagmentMode

public void setQuotaManagmentMode(int mode)
                           throws java.lang.IllegalArgumentException
quota managment mode

Parameters:
mode -
Throws:
java.lang.IllegalArgumentException - if mode is different then Rule.EXTERNAL_QUOTA_MANAGMENT and Rule.PERIODICAL_MANAGMENT_MODE

setRedirectStringsIndex

public void setRedirectStringsIndex(int index)
                             throws ItemNotFoundException
Deprecated. 

Sets the redirect string which the redirectable Rule's Service's Protocols will use from their array of redirect strings. The default is index 0. method is deprectated in 3.5.0 we will convert the redirect idex to subscriber notification and will set it....

Parameters:
index - the new redirect string array index
Throws:
ItemNotFoundException - if the index is out of bound

setServiceName

public void setServiceName(java.lang.String newServiceName)
Sets the Service name of the Service that this Rule applys to.

Parameters:
newServiceName - - the new Service's name

setSessionQuotaBucket

public void setSessionQuotaBucket(int id)
Parameters:
id -

setState

public void setState(short newState)
Sets this Rule's restriction behavior. This configures the enforcement mode of the restrictions this Rule has.

Parameters:
newState - the new state
See Also:
RULE_STATE_ENABLED, RULE_STATE_DISABLED, RULE_STATE_IGNORE

setOverrideTurChecked

public void setOverrideTurChecked(boolean overrideTur)

isOverrideTurChecked

public boolean isOverrideTurChecked()

setTurEnabled

public void setTurEnabled(boolean turEnabled)

isTurEnabled

public boolean isTurEnabled()

setRdrDataEnabled

public void setRdrDataEnabled(boolean rdrDataEnabled)

getRdrDataEnabled

public boolean getRdrDataEnabled()

setUpQuotaBucket

public void setUpQuotaBucket(int id)

toStream

public void toStream(java.io.PrintStream out,
                     Formatter f)
Description copied from interface: Formattable
Method toStream

Specified by:
toStream in interface Formattable
See Also:
Formattable.toStream(java.io.PrintStream, com.pcube.apps.engage.common.Formatter)

toString

public java.lang.String toString()
Gets this Rule's String represntation.

Overrides:
toString in class java.lang.Object
Returns:
this Rule's String represntation

isDefaultRule

public boolean isDefaultRule()
isDefaultRule - false if rule is a time based rule

Returns:

resetRuleValuesToDefault

public void resetRuleValuesToDefault()
Sets the rule properties to default access mode - admit BWC are set to the package's default BWC. no limits on quota, BW or number of sessions. class of service - Best Efort. blocking RDR is enabled (though it would never be generated).


isFlowSignalingRdrEnabled

public boolean isFlowSignalingRdrEnabled()

setFlowSignalingRdrEnabled

public void setFlowSignalingRdrEnabled(boolean flowSignalingRdrEnabled)

getPostBreachDownstreamTos

public ToSMarker getPostBreachDownstreamTos()

setPostBreachDownstreamTos

public void setPostBreachDownstreamTos(ToSMarker marker)

getPostBreachUpstreamTos

public ToSMarker getPostBreachUpstreamTos()

setPostBreachUpstreamTos

public void setPostBreachUpstreamTos(ToSMarker marker)

getPreBreachDownstreamTos

public ToSMarker getPreBreachDownstreamTos()

setPreBreachDownstreamTos

public void setPreBreachDownstreamTos(ToSMarker marker)

getPreBreachUpstreamTos

public ToSMarker getPreBreachUpstreamTos()

setPreBreachUpstreamTos

public void setPreBreachUpstreamTos(ToSMarker marker)

setPreTrafficMirroringIndex

public void setPreTrafficMirroringIndex(int preTrafficMirroringIndex)

getPreTrafficMirroringIndex

public int getPreTrafficMirroringIndex()

setPostTrafficMirroringIndex

public void setPostTrafficMirroringIndex(int postTrafficMirroringIndex)

getPostTrafficMirroringIndex

public int getPostTrafficMirroringIndex()

setPreTrafficMirroringSet

public void setPreTrafficMirroringSet(boolean isPreTrafficMirroringSet)

isPreTrafficMirroringSet

public boolean isPreTrafficMirroringSet()

setPostTrafficMirroringSet

public void setPostTrafficMirroringSet(boolean isPostTrafficMirroringSet)

isPostTrafficMirroringSet

public boolean isPostTrafficMirroringSet()

setPreConditionalRedirectIndex

public void setPreConditionalRedirectIndex(int _preConditionalRedirectIndex)

getPreConditionalRedirectIndex

public int getPreConditionalRedirectIndex()

setPostConditionalRedirectIndex

public void setPostConditionalRedirectIndex(int _postConditionalRedirectIndex)

getPostConditionalRedirectIndex

public int getPostConditionalRedirectIndex()

getPreConditionalRedirectItem

public SubscriberRedirection getPreConditionalRedirectItem()
                                                    throws PolicyInconsistencyException
Throws:
PolicyInconsistencyException

getPostConditionalRedirectItem

public SubscriberRedirection getPostConditionalRedirectItem()
                                                     throws PolicyInconsistencyException
Throws:
PolicyInconsistencyException

isMirroringAttached

public boolean isMirroringAttached()
Returns:
true if mirroing is used in this rule (per or post)

isRedirected

public boolean isRedirected()
Returns:
true if pre redirected is configured (without blocked).

isPostRedirected

public boolean isPostRedirected()
Returns:
true if post redirected is configured (without block).

isGlobalRule

public boolean isGlobalRule()

setGlobalRule

public void setGlobalRule(boolean globalRule)

isRuleFrame

public boolean isRuleFrame()

setRuleFrame

public void setRuleFrame(boolean ruleFrame)

getRuleFrameIndex

public int getRuleFrameIndex()

setRuleFrameIndex

public void setRuleFrameIndex(int ruleFrameIndex)

setDefaultRuleOverride

public void setDefaultRuleOverride(boolean defaultRuleOverride)

isDefaultRuleOverride

public boolean isDefaultRuleOverride()

setGcName

public void setGcName(java.lang.String gcName)

getGcName

public java.lang.String getGcName()

setBwcName

public void setBwcName(java.lang.String bwcName)

getBwcName

public java.lang.String getBwcName()

setGcPir

public void setGcPir(long gcPir)

getGcPir

public long getGcPir()

setDirection

public void setDirection(int direction)

getDirection

public int getDirection()

Cisco Systems, Inc.

Copyright © 2013 Cisco Systems, Inc. Confidential.