KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2  * @(#)RequestProcessingPolicyImpl.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 public class RequestProcessingPolicyImpl
14     extends org.omg.CORBA.LocalObject JavaDoc implements RequestProcessingPolicy {
15
16     public RequestProcessingPolicyImpl(RequestProcessingPolicyValue
17                        value) {
18     this.value = value;
19     }
20
21     public RequestProcessingPolicyValue value() {
22     return value;
23     }
24
25     public int policy_type()
26     {
27     return REQUEST_PROCESSING_POLICY_ID.value ;
28     }
29
30     public Policy copy() {
31     return new RequestProcessingPolicyImpl(value);
32     }
33
34     public void destroy() {
35     value = null;
36     }
37
38     private RequestProcessingPolicyValue value;
39
40     public String JavaDoc toString()
41     {
42     String JavaDoc type = null ;
43     switch (value.value()) {
44         case RequestProcessingPolicyValue._USE_ACTIVE_OBJECT_MAP_ONLY :
45         type = "USE_ACTIVE_OBJECT_MAP_ONLY" ;
46         break ;
47         case RequestProcessingPolicyValue._USE_DEFAULT_SERVANT :
48         type = "USE_DEFAULT_SERVANT" ;
49         break ;
50         case RequestProcessingPolicyValue._USE_SERVANT_MANAGER :
51         type = "USE_SERVANT_MANAGER" ;
52         break ;
53     }
54
55     return "RequestProcessingPolicy[" + type + "]" ;
56     }
57 }
58
Popular Tags