KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > corba > se > impl > oa > poa > IdAssignmentPolicyImpl


1 /*
2  * @(#)IdAssignmentPolicyImpl.java 1.15 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.impl.oa.poa;
9
10 import org.omg.CORBA.*;
11 import org.omg.PortableServer.*;
12
13 final class IdAssignmentPolicyImpl
14 extends org.omg.CORBA.LocalObject JavaDoc
15 implements org.omg.PortableServer.IdAssignmentPolicy JavaDoc {
16     
17     public IdAssignmentPolicyImpl(IdAssignmentPolicyValue value) {
18     this.value = value;
19     }
20
21     public IdAssignmentPolicyValue value() {
22     return value;
23     }
24
25     public int policy_type()
26     {
27     return ID_ASSIGNMENT_POLICY_ID.value ;
28     }
29
30     public Policy copy() {
31     return new IdAssignmentPolicyImpl(value);
32     }
33
34     public void destroy() {
35     value = null;
36     }
37
38     private IdAssignmentPolicyValue value;
39
40     public String JavaDoc toString()
41     {
42     return "IdAssignmentPolicy[" +
43         ((value.value() == IdAssignmentPolicyValue._USER_ID) ?
44         "USER_ID" : "SYSTEM_ID" + "]") ;
45     }
46 }
47
Popular Tags