KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > continuent > sequoia > common > jmx > JMXPrincipalWithPassword


1 /**
2  * Sequoia: Database clustering technology.
3  * Copyright (C) 2006 Continuent, Inc.
4  * Contact: sequoia@continuent.org
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *
18  * Initial developer(s): Jeff Mesnil
19  * Contributor(s): ______________________.
20  */

21
22 package org.continuent.sequoia.common.jmx;
23
24 import javax.management.remote.JMXPrincipal JavaDoc;
25
26 /**
27  * A <code>JMXPrincipalWithPassword</code> extends <code>JMXPrincipal</code>
28  * by adding a (<code>Serializable</code>) <code>password</code> to it.
29  */

30 public class JMXPrincipalWithPassword extends JMXPrincipal JavaDoc
31 {
32   private static final long serialVersionUID = 2398461471450955078L;
33   private String JavaDoc password;
34
35   /**
36    * Creates a new <code>JMXPrincipalWithPassword</code> object based on the
37    * <code>name</code> and <code>password</code>.<br />
38    * <code>name</code> and <code>password</code> must not be
39    * <code>null</code>.
40    *
41    * @param name name of the principal
42    * @param password password of the principal to use for authentication
43    * @see JMXPrincipal#JMXPrincipal(String)
44    */

45   public JMXPrincipalWithPassword(String JavaDoc name, String JavaDoc password)
46   {
47     super(name);
48     this.password = password;
49   }
50
51   /**
52    * Returns the password associated to this Principal
53    *
54    * @return Principal password
55    */

56   public String JavaDoc getPassword()
57   {
58     return password;
59   }
60 }
61
Popular Tags