Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: org/mobicents/slee/container/management/ProfileCMPMethod.java


1   
2   /*
3   *
4   * The Open SLEE Project.
5   *
6   * The source code contained in this file is in in the public domain.          
7   * It can be used in any project or product without prior permission,         
8   * license or royalty payments. There is no claim of correctness and
9   * NO WARRANTY OF ANY KIND provided with this code.
10  *
11  */
12  
13  package org.mobicents.slee.container.management;
14  
15  /**
16   * Declares the presence of the get Profile CMP method and associates the method
17   * with a Profile Specification. This SBB Developer specifies the following aspects
18   * of the get Profile CMP method using the get-profile-cmp-method element: \u00B7
19   *  - The method name of the get Profile CMP method. \u00B7
20   *  - The Profile Specification of the get Profile CMP method.
21   *
22   * @author Emil Ivov
23   */
24  
25  public class ProfileCMPMethod implements Comparable{
26  
27  
28  
29      private ComponentKey profileSpecKey = null;
30      private String profileCMPMethod = null;
31      private String cmpInterface = null;
32  
33      public ProfileCMPMethod(ComponentKey profileSpecKey, String profileCMPMethod)
34      {
35          this.profileSpecKey = profileSpecKey;
36          this.profileCMPMethod = profileCMPMethod;
37      }
38  
39      /**
40       * Returns a key to a Profile Specification that is specified in a profile-spec
41       * element within the same sbb element.
42       * @return ComponentKey a key to a Profile Specification specified
43       * within the same sbb element.
44       */
45      public ComponentKey getProfileSpecKey()
46      {
47          return profileSpecKey;
48      }
49  
50      /**
51       * Returns the name of the method used to get an object that implements a
52       * Profile CMP interface from a Profile identifier. The Profile CMP interface
53       * is specified by the Profile Specification identified by this.profileSpecKey
54       *
55       * @return String
56       */
57      public String getProfileCMPMethod()
58      {
59          return profileCMPMethod;
60      }
61      
62      public boolean equals (Object obj) {
63  
64         if (obj == this)
65             return true;
66         if (!(obj instanceof ProfileCMPMethod))
67             return false;
68         else {
69             ProfileCMPMethod that = (ProfileCMPMethod) obj;
70             return this.profileSpecKey.equals(that.profileSpecKey) &&
71                    this.profileCMPMethod.equals(that.profileCMPMethod);
72         }
73  
74      }
75      
76      public int compareTo (Object obj) {
77        ProfileCMPMethod that = (ProfileCMPMethod) obj;
78        return this.profileSpecKey.compareTo(that.profileSpecKey);
79        
80      } 
81  
82  
83  }