KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > server > ResourceDeployer


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  * @(#) ResourceDeployer.java
26  *
27  * Copyright 2000-2001 by iPlanet/Sun Microsystems, Inc.,
28  * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
29  * All rights reserved.
30  *
31  * This software is the confidential and proprietary information
32  * of iPlanet/Sun Microsystems, Inc. ("Confidential Information").
33  * You shall not disclose such Confidential Information and shall
34  * use it only in accordance with the terms of the license
35  * agreement you entered into with iPlanet/Sun Microsystems.
36  */

37 package com.sun.enterprise.server;
38
39 import com.sun.enterprise.config.serverbeans.Resources;
40
41 /**
42  * Interface to be implemented by different resource types (eg. jms-resource)
43  * to deploy/undeploy a resource to the server's runtime naming context.
44  *
45  * The methods can potentially be called concurrently, therefore implementation
46  * need to do synchronization if necessary.
47  */

48 public interface ResourceDeployer {
49
50     /**
51      * Deploy the resource into the server's runtime naming context
52      *
53      * @param resoure a resource object (eg. JmsResource)
54      * @exception Exception thrown if fail
55      */

56     void deployResource(Object JavaDoc resoure) throws Exception JavaDoc;
57
58     /**
59      * Undeploy the resource from the server's runtime naming context
60      *
61      * @param resoure a resource object (eg. JmsResource)
62      * @exception Exception thrown if fail
63      */

64     void undeployResource(Object JavaDoc resoure) throws Exception JavaDoc;
65
66     /**
67      * Redeploy the resource into the server's runtime naming context
68      *
69      * @param resoure a resource object (eg. JmsResource)
70      * @exception Exception thrown if fail
71      */

72     void redeployResource(Object JavaDoc resoure) throws Exception JavaDoc;
73
74     /**
75      * Enable the resource in the server's runtime naming context
76      *
77      * @param resoure a resource object (eg. JmsResource)
78      * @exception Exception thrown if fail
79      */

80     void enableResource(Object JavaDoc resoure) throws Exception JavaDoc;
81
82     /**
83      * Disable the resource in the server's runtime naming context
84      *
85      * @param resoure a resource object (eg. JmsResource)
86      * @exception Exception thrown if fail
87      */

88     void disableResource(Object JavaDoc resoure) throws Exception JavaDoc;
89
90
91     /**
92      * utility method to find a resource from Resources beans and converte
93      * it to a resource object to be used by the implemented ResourceDeployer
94      *
95      * @param name resource name (normally the jndi-name)
96      * @param rbeans Resources config-beans
97      * @exception Exception thrown if fail
98      */

99     Object JavaDoc getResource(String JavaDoc name, Resources rbeans) throws Exception JavaDoc;
100 }
101
Popular Tags