KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > corba > se > spi > extension > CopyObjectPolicy


1 /*
2  * @(#)CopyObjectPolicy.java 1.4 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package com.sun.corba.se.spi.extension ;
9
10 import org.omg.CORBA.Policy JavaDoc ;
11 import org.omg.CORBA.LocalObject JavaDoc ;
12 import com.sun.corba.se.impl.orbutil.ORBConstants ;
13
14 /** Policy used to specify the copyObject implementation to use.
15 */

16 public class CopyObjectPolicy extends LocalObject JavaDoc implements Policy JavaDoc
17 {
18     private final int value ;
19
20     public CopyObjectPolicy( int value )
21     {
22     this.value = value ;
23     }
24
25     public int getValue()
26     {
27     return value ;
28     }
29
30     public int policy_type ()
31     {
32     return ORBConstants.COPY_OBJECT_POLICY ;
33     }
34
35     public org.omg.CORBA.Policy JavaDoc copy ()
36     {
37     return this ;
38     }
39
40     public void destroy ()
41     {
42     // NO-OP
43
}
44
45     public String JavaDoc toString()
46     {
47     return "CopyObjectPolicy[" + value + "]" ;
48     }
49 }
50
Popular Tags