|
Cisco Systems, Inc. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.pcube.apps.engage.common.ArrayElement
com.pcube.apps.engage.common.UsableArrayElement
com.pcube.apps.engage.policy.Service
public class Service
A collection of protocols. A protocol is limited to a direction (inbound,
outbound or both) and can be limited by a list of ip addresses or ip ranges
which the client or server belong to.
The http and rtsp protocols can be limited also by a list of host names.
The Service belongs to a Policy.
| Constructor Summary | |
|---|---|
Service(Policy policy)
Service Constructor. |
|
Service(Policy policy,
java.lang.String name,
java.lang.String description,
int sampleRate)
Service Constructor. |
|
| Method Summary | |
|---|---|
void |
allocateCounter(AccountingScope scope)
|
java.lang.Object |
clone()
|
static Service |
findNearestAncestorWithExclusiveCounter(Policy policy,
Service service,
AccountingScope scope,
java.lang.String parentServiceName,
boolean exclusiveCounter)
|
void |
freeCounter(AccountingScope scope)
Checks if a ServiceElement containing a specific Protocol combined with a certain direction is found in this Service's ServiceElementArray. |
void |
fromStream(java.io.BufferedReader in,
Formatter f)
parse from stream using the default element tag name |
static java.lang.String |
generatetHypotheticalCounterName(Policy policy,
Service service,
AccountingScope scope,
java.lang.String parentServiceName,
boolean exclusiveCounter)
creates a counter name for the specified service in the specified scope, assuming it has the specified parent and exclusive counter definitions. |
static java.lang.String |
generatetHypotheticalCounterName(Policy policy,
Service service,
AccountingScope scope,
java.lang.String parentServiceName,
boolean exclusiveCounter,
java.lang.String nameSuffix)
creates a counter name for the specified service in the specified scope, assuming it has the specified parent and exclusive counter definitions. |
int |
getActualCounterIndex(AccountingScope scope)
|
Service[] |
getChildrenServices()
|
int |
getCounterIndex(AccountingScope scope)
|
java.lang.String |
getCounterName(AccountingScope scope)
|
java.lang.String |
getDescription()
Gets this Service's description. |
java.lang.String |
getName()
Gets this Service's name. |
int |
getNumericId()
|
java.lang.String |
getParentName()
|
int |
getParentServiceNumericId()
|
Policy |
getPolicy()
|
int |
getSampleRate()
Gets this Service's sample rate for generating the "Service access report". |
java.util.List |
getServiceElements()
Gets this Service's ServiceElement |
java.util.List |
getServiceElementsAndChildrenServiceElements()
get the service elements of this service and the service elements of its children services |
boolean |
isCounterExclusive(AccountingScope scope)
|
boolean |
isDefaultService()
|
boolean |
isGlobalCounterExclusice()
|
boolean |
isSubsCounterExclusice()
|
void |
moveCounter(AccountingScope scope,
int newIndex)
change the index of the specified counter to the specified new index. |
void |
setDescription(java.lang.String newDescription)
Sets this Service's description. |
void |
setName(java.lang.String newName)
Sets this Service's name. |
void |
setNumericId(int newId)
|
void |
setParentServiceByName(java.lang.String parentServiceName)
|
void |
setParentServiceByNumericId(int parentServiceNumericId)
|
void |
setSampleRate(int newSampleRate)
Sets this Service's rate for generating the "Service access report", which reports the number of times this Service has been accessed by different subscribers. |
void |
setUsed(boolean newUsed)
Setting this Service as used in the ServiceArray |
void |
setVetoableNameChangeListener(java.beans.VetoableChangeListener listener)
set the votable change listener: |
void |
toStream(java.io.PrintStream out,
Formatter f)
write to stream using default tag name |
java.lang.String |
toString()
returns a string representation of this service. |
| Methods inherited from class com.pcube.apps.engage.common.UsableArrayElement |
|---|
fromStream, isUsed, toStream |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Service(Policy policy)
policy - the Policy this Service belongs to
public Service(Policy policy,
java.lang.String name,
java.lang.String description,
int sampleRate)
policy - the Policy this Service belongs toname - this Service's namedescription - this Service's descriptionsampleRate - this Service's sample rate| Method Detail |
|---|
public static Service findNearestAncestorWithExclusiveCounter(Policy policy,
Service service,
AccountingScope scope,
java.lang.String parentServiceName,
boolean exclusiveCounter)
public static java.lang.String generatetHypotheticalCounterName(Policy policy,
Service service,
AccountingScope scope,
java.lang.String parentServiceName,
boolean exclusiveCounter)
service - scope - parentServiceName - exclusiveCounter -
public static java.lang.String generatetHypotheticalCounterName(Policy policy,
Service service,
AccountingScope scope,
java.lang.String parentServiceName,
boolean exclusiveCounter,
java.lang.String nameSuffix)
service - scope - parentServiceName - exclusiveCounter - nameSuffix -
public void allocateCounter(AccountingScope scope)
throws com.pcube.apps.engage.foundations.FullCollectionException
scope -
com.pcube.apps.engage.foundations.FullCollectionExceptionpublic java.lang.Object clone()
clone in class ArrayElementArrayElement.clone()public void freeCounter(AccountingScope scope)
protocolName - the name of the Protocoldirection - the directionServiceElement#DIRECTION_NETWORK_INITIATED,
ServiceElement#DIRECTION_SUBSCRIBER_INITIATED,
ServiceElement#DIRECTION_BOTH
public void fromStream(java.io.BufferedReader in,
Formatter f)
throws ImportExportException
UsableArrayElement
fromStream in interface FormattablefromStream in class UsableArrayElementImportExportExceptionFormattable.fromStream(java.io.BufferedReader,
com.pcube.apps.engage.common.Formatter)public int getActualCounterIndex(AccountingScope scope)
scope -
public Service[] getChildrenServices()
public int getCounterIndex(AccountingScope scope)
scope -
public java.lang.String getCounterName(AccountingScope scope)
scope -
public java.lang.String getDescription()
public java.lang.String getName()
public int getNumericId()
public void setNumericId(int newId)
throws ItemNotFoundException
ItemNotFoundExceptionpublic java.lang.String getParentName()
public int getParentServiceNumericId()
public int getSampleRate()
public java.util.List getServiceElements()
public java.util.List getServiceElementsAndChildrenServiceElements()
public boolean isCounterExclusive(AccountingScope scope)
public boolean isDefaultService()
public boolean isGlobalCounterExclusice()
public boolean isSubsCounterExclusice()
public void moveCounter(AccountingScope scope,
int newIndex)
throws DuplicateItemException,
ItemNotFoundException
scope - newIndex -
DuplicateItemException - if the requested new index is not free
ItemNotFoundException - if no counter allocated for this servicepublic void setDescription(java.lang.String newDescription)
newDescription - this Service's new description
public void setName(java.lang.String newName)
throws DuplicateItemException
newName - this Service's new name
DuplicateItemException - if a Service with the same name already exists in the
Policy's ServiceArray
ItemNotFoundException - if an item was missing while validating the rename
public void setParentServiceByName(java.lang.String parentServiceName)
throws ItemNotFoundException
parentServiceName -
ItemNotFoundException
public void setParentServiceByNumericId(int parentServiceNumericId)
throws ItemNotFoundException
parentServiceNumericId -
ItemNotFoundExceptionpublic void setSampleRate(int newSampleRate)
newSampleRate - the new report generation ratepublic void setUsed(boolean newUsed)
setUsed in class UsableArrayElement
public void toStream(java.io.PrintStream out,
Formatter f)
UsableArrayElement
toStream in interface FormattabletoStream in class UsableArrayElementFormattable.toStream(java.io.PrintStream,
com.pcube.apps.engage.common.Formatter)public java.lang.String toString()
toString in class java.lang.Objectpublic void setVetoableNameChangeListener(java.beans.VetoableChangeListener listener)
listener - public Policy getPolicy()
|
Cisco Systems, Inc. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||