KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > corba > se > spi > protocol > RequestDispatcherDefault


1 /*
2  * @(#)RequestDispatcherDefault.java 1.18 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.protocol ;
9
10 import com.sun.corba.se.pept.protocol.ClientRequestDispatcher;
11
12 import com.sun.corba.se.spi.protocol.LocalClientRequestDispatcherFactory ;
13 import com.sun.corba.se.spi.protocol.CorbaServerRequestDispatcher ;
14
15 import com.sun.corba.se.spi.orb.ORB ;
16
17 // Used only in the implementation: no client of this class ever needs these
18
import com.sun.corba.se.spi.ior.IOR ;
19
20 import com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl ;
21 import com.sun.corba.se.impl.protocol.CorbaServerRequestDispatcherImpl ;
22 import com.sun.corba.se.impl.protocol.MinimalServantCacheLocalCRDImpl ;
23 import com.sun.corba.se.impl.protocol.InfoOnlyServantCacheLocalCRDImpl ;
24 import com.sun.corba.se.impl.protocol.FullServantCacheLocalCRDImpl ;
25 import com.sun.corba.se.impl.protocol.JIDLLocalCRDImpl ;
26 import com.sun.corba.se.impl.protocol.POALocalCRDImpl ;
27 import com.sun.corba.se.impl.protocol.INSServerRequestDispatcher ;
28 import com.sun.corba.se.impl.protocol.BootstrapServerRequestDispatcher ;
29
30 public final class RequestDispatcherDefault {
31     private RequestDispatcherDefault() {}
32
33     public static ClientRequestDispatcher makeClientRequestDispatcher()
34     {
35     return new CorbaClientRequestDispatcherImpl() ;
36     }
37
38     public static CorbaServerRequestDispatcher makeServerRequestDispatcher( ORB orb )
39     {
40     return new CorbaServerRequestDispatcherImpl( (com.sun.corba.se.spi.orb.ORB)orb ) ;
41     }
42
43     public static CorbaServerRequestDispatcher makeBootstrapServerRequestDispatcher( ORB orb )
44     {
45     return new BootstrapServerRequestDispatcher( orb ) ;
46     }
47
48     public static CorbaServerRequestDispatcher makeINSServerRequestDispatcher( ORB orb )
49     {
50     return new INSServerRequestDispatcher( orb ) ;
51     }
52
53     public static LocalClientRequestDispatcherFactory makeMinimalServantCacheLocalClientRequestDispatcherFactory( final ORB orb )
54     {
55     return new LocalClientRequestDispatcherFactory() {
56         public LocalClientRequestDispatcher create( int id, IOR ior ) {
57         return new MinimalServantCacheLocalCRDImpl( orb, id, ior ) ;
58         }
59     } ;
60     }
61
62     public static LocalClientRequestDispatcherFactory makeInfoOnlyServantCacheLocalClientRequestDispatcherFactory( final ORB orb )
63     {
64     return new LocalClientRequestDispatcherFactory() {
65         public LocalClientRequestDispatcher create( int id, IOR ior ) {
66         return new InfoOnlyServantCacheLocalCRDImpl( orb, id, ior ) ;
67         }
68     } ;
69     }
70
71     public static LocalClientRequestDispatcherFactory makeFullServantCacheLocalClientRequestDispatcherFactory( final ORB orb )
72     {
73     return new LocalClientRequestDispatcherFactory() {
74         public LocalClientRequestDispatcher create( int id, IOR ior ) {
75         return new FullServantCacheLocalCRDImpl( orb, id, ior ) ;
76         }
77     } ;
78     }
79
80     public static LocalClientRequestDispatcherFactory makeJIDLLocalClientRequestDispatcherFactory( final ORB orb )
81     {
82     return new LocalClientRequestDispatcherFactory() {
83         public LocalClientRequestDispatcher create( int id, IOR ior ) {
84         return new JIDLLocalCRDImpl( orb, id, ior ) ;
85         }
86     } ;
87     }
88
89     public static LocalClientRequestDispatcherFactory makePOALocalClientRequestDispatcherFactory( final ORB orb )
90     {
91     return new LocalClientRequestDispatcherFactory() {
92         public LocalClientRequestDispatcher create( int id, IOR ior ) {
93         return new POALocalCRDImpl( orb, id, ior ) ;
94         }
95     } ;
96     }
97 }
98
Popular Tags