PageRenderTime 46ms CodeModel.GetById 41ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/protocols/jain-megaco/megaco-api/src/main/java/javax/megaco/pkg/NetworkPkg/NetworkOsStats.java

http://mobicents.googlecode.com/
Java | 83 lines | 31 code | 15 blank | 37 comment | 0 complexity | 05feba5700d7d957ca7b00c9517b59bb MD5 | raw file
 1package javax.megaco.pkg.NetworkPkg;
 2
 3import javax.megaco.pkg.MegacoPkg;
 4import javax.megaco.pkg.ParamValueType;
 5import javax.megaco.pkg.PkgConsts;
 6import javax.megaco.pkg.PkgStatsItem;
 7
 8/**
 9 * The MEGACO Octet sent statistics class extends the PkgStatsItem class. This
10 * is a final class. This class defines Octet sent statistics of MEGACO Network
11 * package. The methods shall define that this statistics item belongs to the
12 * Network package.
13 */
14public final class NetworkOsStats extends PkgStatsItem {
15
16	/**
17	 * Identifies Octets sent statistics of the MEGACO Network Package. Its
18	 * value shall be set equal to 0x0002.
19	 */
20	public static final int NETWORK_OS_STATS = 0x0002;
21
22	/**
23	 * Constructs a Jain MEGACO Object representing statistics Item of the
24	 * MEGACO Package for statistics Octet sent and Package as Network.
25	 */
26	public NetworkOsStats() {
27		super();
28		super.itemId = NETWORK_OS_STATS;
29		super.statisticsId = NETWORK_OS_STATS;
30		super.packageId = new NetworkPkg();
31		
32		super.itemType = ParamValueType.M_STRING;
33	}
34
35	/**
36	 * This method is used to get the item identifier from an Item object. The
37	 * implementations of this method in this class returns the id of the Octet
38	 * Sent statistics of Network Package.
39	 * 
40	 * @return It shall return {@link NETWORK_OS_STATS}.
41	 */
42	public int getItemId() {
43		return super.itemId;
44	}
45
46	/**
47	 * This method is used to get the statistics identifier from an Statistics
48	 * Item object. The implementations of this method in this class returns the
49	 * id of the Octet Sent statistics of Network Package.
50	 * 
51	 * @return It shall return {@link NETWORK_OS_STATS}.
52	 */
53	public int getStatisticsId() {
54		return super.statisticsId;
55	}
56
57	/**
58	 * This method gets the package id to which the item belongs. Since the
59	 * Octet Sent statistics is defined in the Network Package of MEGACO
60	 * protocol, this method returns the value {@link PkgConsts.NETWORK_PACKAGE}
61	 * constant. This constant is defined in the PkgConsts class.
62	 * 
63	 * @return The package id {@link PkgConsts.NETWORK_PACKAGE}.
64	 */
65	public MegacoPkg getItemsPkgId() {
66		return super.packageId;
67	}
68
69	
70	//FIXME: add jdoc ? those are not present
71	
72	public int getItemValueType() {
73		
74		return super.itemType;
75	}
76
77	@Override
78	public int[] getItemsDescriptorIds() {
79
80		return new int[]{};
81	}
82
83}