• Ingen resultater fundet

Implementation of Network Element Class Hierarchy

6.4.7 Predicater (class)

Predicaterclass represents thePredicate Layerdefined in the framework of SECTOR. It provides a list ofstatic2 methods which provide the predicates on the configuration information of current network. More information is given in section6.7, which introduces the implementation ofpredicate module.

6.4.8 Sector (class)

Sectorclass is the main entry point of SECTOR system. It integrates all func-tionalities provided by SECTOR, which are building a model(buildModel()), setting up the predicate layer(setUpPredicater()), registering event specifica-tion(registerEvent()), reading alarms from alarm source and detecting events(both in start()). It wraps all subcomponents which are the underlying providers for those functionalities. The source code is in AppendixB, section B.1.1.

6.5 Implementation of Network Element Class Hierarchy

As mentioned in section 6.3, packagesector.elementdefines all network ele-ment classes which compose the network eleele-ment class hierarchy. A simplified class diagram for this package is shown in appendix A.2. Important classes in this package are described below.

6.5.1 Element (class)

This class is the root of the Network Element Class Hierarchy. It represents the most generic NE. It has one field name, which represents the identification of a particular NE. This class defined a method getName()to return the value of name.

2keyword in JAVA to create fields and methods that belong to the class [39].

Figure 6.3: Class Diagram of package sector and its dependent classes

6.5 Implementation of Network Element Class Hierarchy 60

6.5.2 Manager (class)

TheManagerclass extends theElementclass to represent a logic element, which manages or monitors other elements in the network. This class is defined as abstract class so that it can be a super-class of more specific classes(e.g. ZConBTS class) which represent concrete manager elements in Dimetra system.

This class has a field managedObjs declared as java.util.Map to keep track of all NEs which are managed by an instance of that class. Manager class implements methods to manipulate the set of currently managed NEs. It also implements a method isManaging() to determine if it is managing a specified NE or not. Each specific manager element may have the constraint about the elements it can manage. Thus,getManagedObjectClasses()is defined as abstract method, which returns the types of NEs that one actual manager can manage.

6.5.3 ManagedObject (class)

ManagedObjectclass extends theElementclass to represent the managed NEs.

This class is defined as abstract class so that it can be a super-class of more specific classes(e.g. Nodeclass).

This class has three fieldsmanagers,containers andcomponents which store all NEs managing, containing and contained in an instance of ManagedObject class, respectively. This class implements methods to add, remove or retrieve NEs which are stored in its three fields. It also implements methods to eval-uate the management or containment relationship between its instances and other elements. Each specificManagedObjectelement may have the constraint about its management or containment relationship with other elements. Thus, ManagedObjectclass has three unimplemented methods which return the types of elements that can manage, contain or be contained in the ManagedObject element.

6.5.4 Node (class)

Node class represents NEs which can be connected via links. It extends the ManagedObjectclass so that instances of Nodeclass may be managed by some manager elements. This class is defined as abstract class. Classes (e.g. BaseRadio class) which extendNode class are specific to Dimetra domain.

Node class has a field connViaLinks which stores all link elements connected to the instance of this class. This class implements methods to manipulate or retrieve those link elements. It also implements methods to evaluate the con-nectivity relationship between its instances and other elements. Each specific Node element may have the constraint about its management and containment with other elements. Thus,Node class does not implement the abstract meth-ods derived from ManagedObject class. Furthermore, it has another unimple-mented method (getConnViaLinkClasses()) returning the types of link elements via which theNode element can be connected.

6.5.5 Link (class)

Link class represents a network link which is connected to a list of nodes. It extends the ManagedObjectclass so that instances of Linkclass may be man-aged by some manager elements. This class is defined as abstract class. Classes (e.g. RFSiteControlPathclass) which extendLinkclass are specific to Dimetra domain.

This class has a field endPoints which stores twoNode elements as endpoints.

Linkclass implements a method to retrieveNodeelements which are connected via the instance ofLinkclass. Linkclass also implements method to evaluate the connectivity relationship between its instances and other elements. Each specific Link element may have the constraint about its management or containment relationship with other elements. Thus,Linkclass does not implement abstract methods derived fromManagedObjectclass.

6.5.6 Dimetra classes

In addition to the classes introduced so far, the rest of classes in the hierarchy are called Dimetra classes which represent NEs in Dimetra system and therefore are non-abstract classes. These classes implement the abstract methods defined in their super-classes.

As introduced in table 4.1, each Dimetra class has constraints regarding man-agement, containment or connectivity relationships between its instances and other NEs. There are two ways to implement these constraints. One way is to usestatic field3. For example,BaseRadioclass representing the base radio has a static field containerClasses to keep all types of NEs that can contain base

3The value of a static field is shared by any instances of one class