/[classpath]/classpath/gnu/CORBA/gnuCodecFactory.java
ViewVC logotype

Diff of /classpath/gnu/CORBA/gnuCodecFactory.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2.2.1 by gnu_andrew, Tue Aug 2 20:12:08 2005 UTC revision 1.2.2.2 by gnu_andrew, Sat Sep 10 15:31:35 2005 UTC
# Line 38  exception statement from your version. * Line 38  exception statement from your version. *
38    
39  package gnu.CORBA;  package gnu.CORBA;
40    
 import org.omg.CORBA.*;  
41  import org.omg.CORBA.LocalObject;  import org.omg.CORBA.LocalObject;
42  import org.omg.IOP.*;  import org.omg.CORBA.ORB;
43  import org.omg.IOP.Codec;  import org.omg.IOP.Codec;
44  import org.omg.IOP.CodecFactory;  import org.omg.IOP.CodecFactory;
45  import org.omg.IOP.CodecFactoryPackage.UnknownEncoding;  import org.omg.IOP.CodecFactoryPackage.UnknownEncoding;
46    import org.omg.IOP.ENCODING_CDR_ENCAPS;
47  import org.omg.IOP.Encoding;  import org.omg.IOP.Encoding;
48    
49  /**  /**
# Line 52  import org.omg.IOP.Encoding; Line 52  import org.omg.IOP.Encoding;
52   *   *
53   * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)   * @author Audrius Meskauskas, Lithuania (AudriusA@Bioinformatics.org)
54   */   */
55  public class gnuCodecFactory  public class gnuCodecFactory extends LocalObject implements CodecFactory
   extends LocalObject  
   implements CodecFactory  
56  {  {
57    /**    /**
58     * The associated ORB.     * The associated ORB.
# Line 78  public class gnuCodecFactory Line 76  public class gnuCodecFactory
76     *     *
77     * @throws UnknownEncoding if the encoding is not a ENCODING_CDR_ENCAPS.     * @throws UnknownEncoding if the encoding is not a ENCODING_CDR_ENCAPS.
78     */     */
79    public Codec create_codec(Encoding for_encoding)    public Codec create_codec(Encoding for_encoding) throws UnknownEncoding
                      throws UnknownEncoding  
80    {    {
81      if (for_encoding.format != ENCODING_CDR_ENCAPS.value)      if (for_encoding.format != ENCODING_CDR_ENCAPS.value)
82        throw new UnknownEncoding("Only ENCODING_CDR_ENCAPS is " +        throw new UnknownEncoding("Only ENCODING_CDR_ENCAPS is " +
83                                  "supported by this factory."          "supported by this factory."
84                                 );        );
85    
86      return new cdrEncapsCodec(orb,      return new cdrEncapsCodec(orb,
87                                new Version(for_encoding.major_version,        new Version(for_encoding.major_version, for_encoding.minor_version)
88                                            for_encoding.minor_version      );
                                          )  
                              );  
89    }    }
90  }  }

Legend:
Removed from v.1.2.2.1  
changed lines
  Added in v.1.2.2.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26