KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > carol > util > csiv2 > SasPolicy


1 /**
2  * JOnAS: Java(TM) Open Application Server
3  * Copyright (C) 2004 Bull S.A.
4  * Contact: jonas-team@objectweb.org
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19  * USA
20  *
21  * --------------------------------------------------------------------------
22  * $Id: SasPolicy.java,v 1.1 2004/12/13 16:24:13 benoitf Exp $
23  * --------------------------------------------------------------------------
24  */

25 package org.objectweb.carol.util.csiv2;
26
27 import org.omg.CORBA.Policy JavaDoc;
28
29 /**
30  * Csiv2 Policy for binding object
31  * @author Florent Benoit
32  */

33 public class SasPolicy extends org.omg.CORBA.LocalObject JavaDoc implements org.omg.CORBA.Policy JavaDoc {
34
35     /**
36      * Type
37      */

38     public static final int POLICY_TYPE = 0xFB79;
39
40     /**
41      * Sas component
42      */

43     private SasComponent sasComponent = null;
44
45     /**
46      * Build a csiv2 policy with the given configuration
47      * @param sasComponent configuration for CsiV2
48      */

49     public SasPolicy(SasComponent sasComponent) {
50         this.sasComponent = sasComponent;
51     }
52
53     /**
54      * Returns the constant value that corresponds to the type of the policy
55      * object.
56      * @return the constant value that corresponds to the type of the policy
57      * object
58      */

59     public int policy_type() {
60         return POLICY_TYPE;
61     }
62
63     /**
64      * Destroys the <code>Policy</code> object.
65      */

66     public void destroy() {
67
68     }
69
70     /**
71      * Returns a copy of the <code>Policy</code> object.
72      * @return a copy of the <code>Policy</code> object
73      */

74     public Policy JavaDoc copy() {
75         return new SasPolicy(sasComponent);
76     }
77
78     /**
79      * @return the sasComponent.
80      */

81     public SasComponent getSasComponent() {
82         return sasComponent;
83     }
84 }
Popular Tags