Package org.omg.IOP

Examples of org.omg.IOP.Codec


    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


        try {
            // use CDR encapsulation with GIOP 1.0 encoding.
            Encoding encoding = new Encoding(ENCODING_CDR_ENCAPS.value,
                    (byte) 1, /* GIOP version */
                    (byte) /* GIOP revision*/);
            Codec codec = info.codec_factory().create_codec(encoding);

            // add IOR interceptor for CSIv2.
            info.add_ior_interceptor(new CSIv2IORInterceptor(codec));

            // register CSIv2-related policy factories.
View Full Code Here

        try {
            // Use CDR encapsulation with GIOP 1.0 encoding
            Encoding encoding = new Encoding(ENCODING_CDR_ENCAPS.value,
                    (byte) 1, /* GIOP version */
                    (byte) /* GIOP revision*/);
            Codec codec = info.codec_factory().create_codec(encoding);

            // Get a reference to the PICurrent
            org.omg.CORBA.Object obj =
                    info.resolve_initial_references("PICurrent");
            org.omg.PortableInterceptor.Current piCurrent =
View Full Code Here

        try {
            // Use CDR encapsulation with GIOP 1.0 encoding
            Encoding encoding = new Encoding(ENCODING_CDR_ENCAPS.value,
                    (byte) 1, /* GIOP version */
                    (byte) /* GIOP revision*/);
            Codec codec = info.codec_factory().create_codec(encoding);
            info.add_ior_interceptor(new TxIORInterceptor(codec));
        } catch (Exception e) {
            throw JacORBMessages.MESSAGES.unexpectedException(e);
        }
    }
View Full Code Here

        try {
            // use CDR encapsulations with GIOP 1.0 encoding.
            Encoding encoding = new Encoding(ENCODING_CDR_ENCAPS.value,
                    (byte) 1, /* GIOP version */
                    (byte) /* GIOP revision*/);
            Codec codec = info.codec_factory().create_codec(encoding);

            // create and register client interceptor.
            SASClientIdentityInterceptor clientInterceptor = new SASClientIdentityInterceptor(codec);
            info.add_client_request_interceptor(clientInterceptor);

View Full Code Here

            // Use CDR encapsulations with GIOP 1.0 encoding.
            Encoding encoding = new Encoding(ENCODING_CDR_ENCAPS.value,
                    (byte) 1, /* GIOP version */
                    (byte) /* GIOP revision*/);
            Codec codec = info.codec_factory().create_codec(encoding);

            // Create and register client interceptor.
            obj = info.resolve_initial_references("SASCurrent");
            SASCurrentImpl sasCurrentImpl = (SASCurrentImpl) obj;
            SASClientInterceptor clientInterceptor = new SASClientInterceptor(codec);
View Full Code Here

    GSSUPIORInterceptor ior_interceptor;

    public void pre_init(ORBInitInfo info) {
        log.fine("********  Running PortableCSILoader ******** ");

        Codec codec = null;
        try {
            codec = info.codec_factory()
                    .create_codec(
                            new Encoding(ENCODING_CDR_ENCAPS.value, (byte) 1,
                                         (byte) 2));
View Full Code Here

            //but, it needs an xid!
            TransIdentity transIdentity = new TransIdentity(null, null, NULL_XID);
            int timeout = 0;
            Any implementationSpecificData = Util.getORB().create_any();
            PropagationContext propagationContext = new PropagationContext(timeout, transIdentity, NO_PARENTS, implementationSpecificData);
            Codec codec = Util.getCodec();
            Any any = Util.getORB().create_any();
            PropagationContextHelper.insert(any, propagationContext);
            byte[] encodedPropagationContext;
            try {
                encodedPropagationContext = codec.encode_value(any);
            } catch (InvalidTypeForEncoding invalidTypeForEncoding) {
                throw (INTERNAL)new INTERNAL("Could not encode propagationContext").initCause(invalidTypeForEncoding);
            }
            ServiceContext otsServiceContext = new ServiceContext(TransactionService.value, encodedPropagationContext);
            ri.add_request_service_context(otsServiceContext, true);
View Full Code Here

        try
        {
            Encoding encoding = new Encoding(ENCODING_CDR_ENCAPS.value,
                                             (byte) 1, (byte) 0);
            Codec codec = info.codec_factory().create_codec(encoding);

            info.add_client_request_interceptor( new BiDirConnectionClientInterceptor( orb ));
            info.add_server_request_interceptor( new BiDirConnectionServerInterceptor( orb ));

            info.register_policy_factory( BIDIRECTIONAL_POLICY_TYPE.value,
View Full Code Here

                                       .getLogger("jacorb.tx_service");
            slot_id = info.allocate_slot_id();
           
            Encoding encoding = new Encoding(ENCODING_CDR_ENCAPS.value,
                                             (byte) 1, (byte) 0);
            Codec codec = info.codec_factory().create_codec(encoding);
           
            TransactionCurrentImpl ts_current = new TransactionCurrentImpl(orb, slot_id);
            info.register_initial_reference("TransactionCurrent", ts_current);
           
            info.add_client_request_interceptor(
View Full Code Here

TOP

Related Classes of org.omg.IOP.Codec

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.