KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > admin > target > DASTarget


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23
24 /*
25  * $Id: DASTarget.java,v 1.3 2005/12/25 04:14:38 tcfujii Exp $
26  */

27
28 package com.sun.enterprise.admin.target;
29
30 //jdk imports
31
import java.io.Serializable JavaDoc;
32
33 //jmx imports
34
import javax.management.ObjectName JavaDoc;
35 import javax.management.MalformedObjectNameException JavaDoc;
36
37 //config imports
38
import com.sun.enterprise.config.ConfigContext;
39 import com.sun.enterprise.config.ConfigException;
40
41 import com.sun.enterprise.util.i18n.StringManager;
42
43 import com.sun.enterprise.config.serverbeans.ServerHelper;
44 import com.sun.enterprise.config.serverbeans.Server;
45 import com.sun.enterprise.config.serverbeans.Cluster;
46 import com.sun.enterprise.config.serverbeans.NodeAgent;
47
48 public class DASTarget extends ServerTarget
49 {
50     /**
51      * i18n strings manager object
52      */

53     private static final StringManager strMgr =
54         StringManager.getManager(DASTarget.class);
55     
56     protected DASTarget(String JavaDoc name, ConfigContext cc)
57     {
58         super(name, cc);
59     }
60
61     public TargetType getType()
62     {
63         return TargetType.DAS;
64     }
65
66     /**
67      * Return all the cluster associated with this server
68      */

69     public Cluster[] getClusters() throws ConfigException
70     {
71        throw new ConfigException(strMgr.getString("target.not_supported",
72             "getClusters", getType().getName()));
73     }
74     
75     /**
76      * Return the node agent associated with this server.
77      */

78     public NodeAgent[] getNodeAgents() throws ConfigException
79     {
80         throw new ConfigException(strMgr.getString("target.not_supported",
81             "getNodeAgents", getType().getName()));
82     }
83 }
84
Popular Tags