KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jac > aspects > distribution > DeploymentConf


1 /*
2   Copyright (C) 2001-2003 Renaud Pawlak
3
4   This program is free software; you can redistribute it and/or modify
5   it under the terms of the GNU Lesser General Public License as
6   published by the Free Software Foundation; either version 2 of the
7   License, or (at your option) any later version.
8
9   This program is distributed in the hope that it will be useful,
10   but WITHOUT ANY WARRANTY; without even the implied warranty of
11   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12   GNU Lesser General Public License for more details.
13
14   You should have received a copy of the GNU Lesser General Public
15   License along with this program; if not, write to the Free Software
16   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
17   USA */

18
19 package org.objectweb.jac.aspects.distribution;
20
21 import org.objectweb.jac.core.rtti.ClassItem;
22 import org.objectweb.jac.core.rtti.MethodItem;
23
24 /**
25  * This aspect is configuration interface of the Deployment aspect.
26  *
27  * @author <a HREF="http://cedric.cnam.fr/~pawlak/index-english.html">Renaud Pawlak</a>
28  *
29  * @see DeploymentAC
30  * @see DeploymentRule */

31
32 public interface DeploymentConf {
33
34    /**
35     * This configuration method creates a deployment rule that tells
36     * that the objects that match are deployed on a given remote
37     * container.<p>
38     *
39     * @param deploymentHost the host from where the objects are
40     * deployed
41     * @param nameRegexp all the objects for which the name will
42     * match this pattern will be deployed with this rule
43     * @param containerName the container that will hold the objects */

44
45    void deploy( String JavaDoc deploymentHost, String JavaDoc nameRegexp, String JavaDoc containerName );
46
47    /**
48     * This configuration method creates a deployment rule that replicates
49     * an original object on a set of containers.
50     *
51     * @param deploymentHost the host from where the objects are
52     * deployed
53     * @param nameRegexp all the objects for which the name will match
54     * this regular expression will be replicated
55     * @param contRegexp identifies the containers that will hold the
56     * replication group (one replica per container) */

57
58    void replicate ( String JavaDoc deploymentHost, String JavaDoc nameRegexp, String JavaDoc contRegexp );
59
60    /**
61     * This configuration method creates remote-access stubs for the
62     * object called name on all the client-hosts defined by the hosts
63     * expression.
64     *
65     * @param name the name of the object the stubs are created for
66     * @param serverHost the name of the container the server is located
67     * @param hosts an expression telling where the stubs are deployed
68     * @param stubType the type of the stub (a StubWrapper subclass)
69     */

70
71    void createTypedStubsFor( String JavaDoc name, String JavaDoc serverHost,
72                              String JavaDoc hosts, String JavaDoc stubType );
73
74    /**
75     * This configuration method creates the stubs with the default
76     * type (org.objectweb.jac.core.dist.StubWrapper).
77     *
78     * @param name the name of the object the stubs are created for
79     * @param serverHost the name of the container the server is located
80     * @param hosts an expression telling where the stubs are deployed
81     */

82
83    void createStubsFor( String JavaDoc name, String JavaDoc serverHost, String JavaDoc hosts );
84
85    /**
86     * This configuration method creates the stubs with an asynchronous
87     * type (org.objectweb.jac.core.dist.NonBlockingStubWrapper).
88     *
89     * @param name the name of the object the stubs are created for
90     * @param serverHost the name of the container the server is located
91     * @param hosts an expression telling where the stubs are deployed
92     */

93
94    void createAsynchronousStubsFor( String JavaDoc name, String JavaDoc serverHost, String JavaDoc hosts );
95
96    /**
97     * This configuration method sets a field to be transient.
98     *
99     * @param classItem the class item of the field
100     * @param fieldName the field name */

101
102    void setTransient(ClassItem classItem, String JavaDoc fieldName);
103
104     /**
105      * Defines the passing mode of the parameters for a given method.
106      *
107      * <p>When a method is fowarded to a remote host by a stub
108      * (wrapper), the parameters of this method can be passed by value
109      * (then the whole object is serialized on the local host and
110      * deserialized on the remote host) or by reference (then the
111      * object's state is not serialized and it is bounded to a remote
112      * object on the remote host).
113      *
114      * @param method the method that holds the parameters
115      * @param refs TRUE or FALSE for each parameter... by default, the
116      * parameters are passed by value */

117   void setParametersPassingMode(MethodItem method, Boolean JavaDoc[] refs);
118
119 }
120
121
122
Popular Tags