Package org.omg.IOP

Examples of org.omg.IOP.CodecFactory


    static final Logger logger = Logger.getLogger(RMIInitializer.class
            .getName());

    public void pre_init(ORBInitInfo info) {
        Encoding encoding = new Encoding(ENCODING_CDR_ENCAPS.value, (byte)1,(byte) 0);
        CodecFactory codecFactory = info.codec_factory();
        try {
            Codec codec = codecFactory.create_codec(encoding);
            RMIInterceptor rmiInterceptor = new RMIInterceptor(codec);
            info.add_ior_interceptor(rmiInterceptor);
        } catch (UserException e) {
            logger.warning("cannot register RMI Interceptor" + e);
        }
View Full Code Here


 

    public static void setORB(ORB orb) throws UserException {
        if (Java2IDLUtil.orb == null) {
            Java2IDLUtil.orb = orb;
            CodecFactory factory = (CodecFactory) Java2IDLUtil.orb.resolve_initial_references("CodecFactory");
            codec = factory.create_codec(new Encoding(ENCODING_CDR_ENCAPS.value, (byte) 1, (byte) 2));
        }
    }
View Full Code Here

 

    public static void setORB(ORB orb) throws UserException {
        if (Java2IDLUtil.orb == null) {
            Java2IDLUtil.orb = orb;
            CodecFactory factory = (CodecFactory) Java2IDLUtil.orb.resolve_initial_references("CodecFactory");
            codec = factory.create_codec(new Encoding(ENCODING_CDR_ENCAPS.value, (byte) 1, (byte) 2));
        }
    }
View Full Code Here

        try
        {
            Encoding encoding =
                new Encoding(ENCODING_CDR_ENCAPS.value, (byte) 1, (byte) 0);

            CodecFactory codec_factory =
                (CodecFactory)orb.resolve_initial_references("CodecFactory");

            codec = codec_factory.create_codec(encoding);
        }
        catch (Exception e)
        {
            logger.error("Error initing SASComponentInterceptor: ",e);
        }
View Full Code Here

   

    public static void setORB(ORB orb) throws UserException {
        if (Util.orb == null) {
            Util.orb = orb;
            CodecFactory factory = (CodecFactory) Util.orb.resolve_initial_references("CodecFactory");
            codec = factory.create_codec(new Encoding(ENCODING_CDR_ENCAPS.value, (byte) 1, (byte) 2));
        }
    }
View Full Code Here

   

    public static void setORB(ORB orb) throws UserException {
        if (Util.orb == null) {
            Util.orb = orb;
            CodecFactory factory = (CodecFactory) Util.orb.resolve_initial_references("CodecFactory");
            codec = factory.create_codec(new Encoding(ENCODING_CDR_ENCAPS.value, (byte) 1, (byte) 2));
        }
    }
View Full Code Here

    static final Logger logger = Logger.getLogger(RMIInitializer.class
            .getName());

    public void pre_init(ORBInitInfo info) {
        Encoding encoding = new Encoding(ENCODING_CDR_ENCAPS.value, (byte)1,(byte) 0);
        CodecFactory codecFactory = info.codec_factory();
        try {
            Codec codec = codecFactory.create_codec(encoding);
            RMIInterceptor rmiInterceptor = new RMIInterceptor(codec);
            info.add_ior_interceptor(rmiInterceptor);
        } catch (UserException e) {
            logger.warning("cannot register RMI Interceptor" + e);
        }
View Full Code Here

     * @param info provides initialization attributes and
     *    operations by which Interceptors can be registered.
     */
    public void post_init(org.omg.PortableInterceptor.ORBInitInfo info) {
        Codec codec = null;
        CodecFactory cf = info.codec_factory();
 
        byte major_version = 1;
        byte minor_version = 2;
        Encoding encoding = new Encoding(ENCODING_CDR_ENCAPS.value,
                                         major_version, minor_version);
        try {
            codec = cf.create_codec(encoding);
        } catch (org.omg.IOP.CodecFactoryPackage.UnknownEncoding e) {
            _logger.log(Level.WARNING,"UnknownEncoding from " + baseMsg,e);
      }
        try {
            info.add_ior_interceptor(new IORAddrAnyInterceptor(codec));
View Full Code Here

    static Codec getCodec(ORB orb)
    {
  Codec result = null;
  try {
      CodecFactory codecFactory =
    CodecFactoryHelper.narrow(
                    orb.resolve_initial_references("CodecFactory"));
      result = codecFactory.create_codec(
                new Encoding((short)ENCODING_CDR_ENCAPS.value,
           (byte)1, (byte)2));
  } catch (Throwable e) {
            _logger.log(Level.WARNING,
      "Problem in " + baseMsg + ".getCodec",
View Full Code Here

    _logger.log(Level.FINE,"J2EE Initializer post_init");
    // Create a Codec that can be passed to interceptors.
    _logger.log(Level.FINE,"Creating Codec for CDR encoding");
  }

        CodecFactory cf = info.codec_factory();
 
        byte major_version = 1;
        byte minor_version = 2;
        Encoding encoding = new Encoding(ENCODING_CDR_ENCAPS.value,
                                         major_version, minor_version);
        try {
            codec = cf.create_codec(encoding);

      // register CSIv2 interceptors.
       ClientConnectionInterceptor cci =
                 new ClientConnectionInterceptor("ClientConnInterceptor",1);
            info.add_client_request_interceptor(cci);
View Full Code Here

TOP

Related Classes of org.omg.IOP.CodecFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.