KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > slide > common > SlideMBean


1 /*
2  * $Header: /home/cvs/jakarta-slide/src/share/org/apache/slide/common/SlideMBean.java,v 1.6 2004/07/28 09:38:11 ib Exp $
3  * $Revision: 1.6 $
4  * $Date: 2004/07/28 09:38:11 $
5  *
6  * ====================================================================
7  *
8  * Copyright 1999-2002 The Apache Software Foundation
9  *
10  * Licensed under the Apache License, Version 2.0 (the "License");
11  * you may not use this file except in compliance with the License.
12  * You may obtain a copy of the License at
13  *
14  * http://www.apache.org/licenses/LICENSE-2.0
15  *
16  * Unless required by applicable law or agreed to in writing, software
17  * distributed under the License is distributed on an "AS IS" BASIS,
18  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19  * See the License for the specific language governing permissions and
20  * limitations under the License.
21  *
22  */

23
24 package org.apache.slide.common;
25
26 import org.apache.slide.authenticate.SecurityToken;
27
28 /**
29  * Slide MBean interface.
30  *
31  * @version $Revision: 1.6 $
32  */

33 public interface SlideMBean {
34     
35     
36     // -------------------------------------------------------------- Constants
37

38     
39     /**
40      * Status constants.
41      */

42     public static final String JavaDoc[] states =
43     {"Stopped", "Stopping", "Starting", "Started"};
44     
45     
46     public static final int STOPPED = 0;
47     public static final int STOPPING = 1;
48     public static final int STARTING = 2;
49     public static final int STARTED = 3;
50     
51     
52     /**
53      * Component name.
54      */

55     public static final String JavaDoc NAME = "Slide content management server";
56     
57     
58     /**
59      * Object name.
60      */

61     public static final String JavaDoc OBJECT_NAME = ":service=Slide";
62     
63     
64     // ------------------------------------------------------ Interface Methods
65

66     
67     /**
68      * Retruns the Slide component name.
69      */

70     public String JavaDoc getName();
71     
72     
73     /**
74      * Returns the state of the Slide domain.
75      */

76     public int getState();
77     
78     
79     /**
80      * Returns a String representation of the domain's state.
81      */

82     public String JavaDoc getStateString();
83     
84     
85     /**
86      * Auto initializes domain.
87      */

88     public void init()
89         throws Exception JavaDoc;
90     
91     
92     /**
93      * Initializes domain, and specify a configuration file to use.
94      */

95     public void init(String JavaDoc configFile)
96         throws Exception JavaDoc;
97     
98     
99     /**
100      * Start the domain.
101      */

102     public void start()
103         throws Exception JavaDoc;
104     
105     
106     /**
107      * Close all access tokens to the domain.
108      */

109     public void stop();
110     
111     
112     /**
113      * Destroy domain.
114      */

115     public void destroy();
116     
117     
118     /**
119      * Access a Namespace.
120      *
121      * @param token Entity which wants access
122      * @param namespaceName Name of the namespace on which access is requested
123      * @return NamespaceAccessToken Access token to the namespace
124      */

125     public NamespaceAccessToken accessNamespace(SecurityToken token,
126                                                 String JavaDoc namespaceName);
127     
128     
129     /**
130      * Close a namespace.
131      *
132      * @param token Namespace access token
133      */

134     public void closeNamespace(NamespaceAccessToken token);
135     
136     
137     /**
138      * Clsose a namespace.
139      *
140      * @param token Entity which wants to close the namespace
141      * @param namespaceName Name of the namespace
142      */

143     public void closeNamespace(SecurityToken token, String JavaDoc namespaceName);
144     
145     
146     /**
147      * Access a Domain.
148      *
149      * @param token Service who wants access
150      * @return DomainAccessToken Access token to the domain
151      */

152     public DomainAccessToken accessDomain(SecurityToken token);
153     
154     
155 }
156
Popular Tags