KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jacorb > orb > portableInterceptor > CodecFactoryImpl


1 /*
2  * JacORB - a free Java ORB
3  *
4  * Copyright (C) 1999-2004 Gerald Brose
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) 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  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public
17  * License along with this library; if not, write to the Free
18  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19  *
20  */

21 package org.jacorb.orb.portableInterceptor;
22
23 import org.omg.IOP.*;
24 import org.omg.IOP.CodecFactoryPackage.*;
25 import org.omg.CORBA.ORB JavaDoc;
26
27 /**
28  * This class represents a CodecFactory. The factory
29  * has currently only one Codec, for ENCODING_CDR_ENCAPS 1.0. <br>
30  * If users like to add their own codec, they have to modify
31  * create_codec().
32  *
33  * See PI Spec p.10-80
34  *
35  * @author Nicolas Noffke
36  * @version $Id: CodecFactoryImpl.java,v 1.10 2004/05/06 12:40:00 nicolas Exp $
37  */

38
39 public class CodecFactoryImpl
40     extends org.omg.CORBA.LocalObject JavaDoc
41     implements CodecFactory
42 {
43     private ORB JavaDoc orb = null;
44   
45     public CodecFactoryImpl(ORB JavaDoc orb)
46     {
47         this.orb = orb;
48     }
49
50     /**
51      * implementation of org.omg.IOP.CodecFactoryOperations interface
52      */

53
54     public Codec create_codec(Encoding enc)
55         throws UnknownEncoding
56     {
57         return new CodecImpl( orb, enc );
58     }
59 } // CodecFactoryImpl
60

61
62
63
64
65
66
Popular Tags