01: /*
02: * JacORB - a free Java ORB
03: *
04: * Copyright (C) 1999-2004 Gerald Brose
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Library General Public
08: * License as published by the Free Software Foundation; either
09: * 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;
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.11 2006/07/07 10:55:57 alphonse.bendt Exp $
37: */
38:
39: public class CodecFactoryImpl extends org.omg.CORBA.LocalObject
40: implements CodecFactory {
41: private final ORB orb;
42:
43: public CodecFactoryImpl(ORB orb) {
44: this .orb = orb;
45: }
46:
47: /**
48: * implementation of org.omg.IOP.CodecFactoryOperations interface
49: */
50:
51: public Codec create_codec(Encoding enc) throws UnknownEncoding {
52: return new CodecImpl(orb, enc);
53: }
54: } // CodecFactoryImpl
|