Cisco Systems, Inc.

com.pcube.apps.engage.apply
Class RuleResolutionKey

java.lang.Object
  extended by com.pcube.apps.framework.commons.IPRange
      extended by com.pcube.apps.engage.apply.RuleResolutionKey
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class RuleResolutionKey
extends com.pcube.apps.framework.commons.IPRange

The key which the SML app uses to decide which rule to apply to a flow. Tke key is a triplet

Author:
rafis
See Also:
Serialized Form

Constructor Summary
RuleResolutionKey(Package pkg, Service srv, TimeFrame timeFrame)
           
 
Method Summary
static java.util.List fromIPRange(com.pcube.apps.framework.commons.IPRange range, PackageArray packages, ServiceArray services, TimeFrame[] timeFrames)
          Returns a list of RuleResolutionKey that are in the specified IPRange.
 Package getPkg()
           
 Service getSrv()
           
 TimeFrame getTimeFrame()
           
static long to32bitEncoding(Package pkg, Service srv, TimeFrame timeFrame)
          encodes the key in a 32 long binary number.
 java.lang.String toString()
           
 
Methods inherited from class com.pcube.apps.framework.commons.IPRange
clone, compare, contains, createFromLowHigh, createFromMask, createFromSignificantBits, equals, getIpAddr, getIpMask, getIpType, getIpv6, getIpv6Mask, getMaxIpAddr, getMinIpAddr, getNumOfSignificantBits, getRangeSize, isIPv6, maskToRange, rangeToMask, setIPv6, toCanonicalForm, valueOf
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RuleResolutionKey

public RuleResolutionKey(Package pkg,
                         Service srv,
                         TimeFrame timeFrame)
Parameters:
pkg - - package
srv - - service
timeFrame - - time frame
Method Detail

to32bitEncoding

public static long to32bitEncoding(Package pkg,
                                   Service srv,
                                   TimeFrame timeFrame)
encodes the key in a 32 long binary number. package index bits 16-31 service index bits 6-15 timeFrame index bits 0-5

Parameters:
pkg -
srv -
timeFrame -
Returns:

fromIPRange

public static java.util.List fromIPRange(com.pcube.apps.framework.commons.IPRange range,
                                         PackageArray packages,
                                         ServiceArray services,
                                         TimeFrame[] timeFrames)
Returns a list of RuleResolutionKey that are in the specified IPRange.

Parameters:
range -
packages - - collection of packages
services - - collection of services
timeFrams - - array of time frames
Returns:

getPkg

public Package getPkg()
Returns:
Returns the pkg.

getSrv

public Service getSrv()
Returns:
Returns the srv.

getTimeFrame

public TimeFrame getTimeFrame()
Returns:
Returns the timeFrame.

toString

public java.lang.String toString()
Overrides:
toString in class com.pcube.apps.framework.commons.IPRange

Cisco Systems, Inc.

Copyright © 2013 Cisco Systems, Inc. Confidential.