Package org.omg.IOP

Examples of org.omg.IOP.TaggedComponent


        try
        {
            out.beginEncapsulatedArray();
            out.write_long( ORBConstants.JACORB_ORB_ID );

            return new TaggedComponent
            (
                    TAG_ORB_TYPE.value,
                    out.getBufferCopy()
            );
        }
View Full Code Here


                SSLHelper.write( out, ssl );

                // TAG_SSL_SEC_TRANS must be disambiguated in case OpenORB-generated
                // OMG classes are in the classpath.
                components.addComponent
                (new TaggedComponent( org.omg.SSLIOP.TAG_SSL_SEC_TRANS.value,
                        out.getBufferCopy() )
                );
            }
            finally
            {
View Full Code Here

    destroyed = true;
  }

  public void establish_components(IORInfo info)
  {
    TaggedComponent component = new TaggedComponent();

    component.tag = 0x452572;

    byte[] data = new byte[ 0x20 ];
    for (byte i = 0; i < data.length; i++)
View Full Code Here

        super(codec);
    }

    public void establish_components(IORInfo info) {
        try {
            TaggedComponent mechanism_list = constructMechList(info);

            if (mechanism_list != null) {
                // add this component to all outgoing profiles!
                info.add_ior_component(mechanism_list);
            }
View Full Code Here

                                            | ITTDistinguishedName.value | ITTX509CertChain.value;
        }

        // transport mech is null here, this field is modified by code
        // inside SSL server-side logic, adding SSL-specific information.
        mech.transport_mech = new TaggedComponent(TAG_NULL_TAG.value,
                                                  EMPTY_BARR);
        mech.target_requires = (short) (as_target_requires | sas_target_requires);
        mech.as_context_mech = as;
        mech.sas_context_mech = sas;

        CompoundSecMechList mech_list = new CompoundSecMechList(false,
                                                                new CompoundSecMech[]{mech});

        Any a = getOrb().create_any();
        CompoundSecMechListHelper.insert(a, mech_list);
        byte[] mech_data;
        try {
            mech_data = codec.encode_value(a);
        }
        catch (InvalidTypeForEncoding e) {
            MARSHAL me = new MARSHAL("cannot encode security descriptor", 0,
                                     CompletionStatus.COMPLETED_NO);
            me.initCause(e);
            throw me;
        }
        return new TaggedComponent(TAG_CSI_SEC_MECH_LIST.value, mech_data);
    }
View Full Code Here

        boolean target_requires_gssup = false;

        CompoundSecMech mech = null;

        try {
            TaggedComponent tc = ri
                    .get_effective_component(TAG_CSI_SEC_MECH_LIST.value);

            byte[] data = tc.component_data;

            Any sl_any = codec.decode_value(data, CompoundSecMechListHelper
View Full Code Here

    public void send_request(ClientRequestInfo ri) {

        try {
            if (log.isDebugEnabled()) log.debug("Checking if target " + ri.operation() + " has a security policy");

            TaggedComponent tc = ri.get_effective_component(TAG_CSI_SEC_MECH_LIST.value);
            TSSCompoundSecMechListConfig csml = TSSCompoundSecMechListConfig.decodeIOR(Util.getCodec(), tc);

            if (log.isDebugEnabled()) log.debug("Target has a security policy");

            ClientPolicy clientPolicy = (ClientPolicy) ri.get_request_policy(ClientPolicyFactory.POLICY_TYPE);
View Full Code Here

           
            any.insert_string(codeBase);

            try {
                byte[] data = codec.encode(any);
                TaggedComponent component = new TaggedComponent(
                        TAG_JAVA_CODEBASE.value, data);

                info.add_ior_component(component);
            } catch (InvalidTypeForEncoding e) {
                logger.warning("Failed to add java codebase to IOR" + e);
View Full Code Here

     *
     * @param tc the {@code TaggedComponent} to be copied.
     * @return a reference to the created copy.
     */
    public static TaggedComponent createCopy(TaggedComponent tc) {
        TaggedComponent copy = null;

        if (tc != null) {
            byte[] buf = new byte[tc.component_data.length];
            System.arraycopy(tc.component_data, 0, buf, 0, tc.component_data.length);
            copy = new TaggedComponent(tc.tag, buf);
        }
        return copy;
    }
View Full Code Here

        if (metadata == null) {
            JacORBLogger.ROOT_LOGGER.createSSLTaggedComponentWithNullMetaData();
            return null;
        }

        TaggedComponent tc;
        try {
            int supports = createTargetSupports(metadata.getTransportConfig());
            int requires = createTargetRequires(metadata.getTransportConfig());
            SSL ssl = new SSL((short) supports, (short) requires, (short) sslPort);
            Any any = orb.create_any();
            SSLHelper.insert(any, ssl);
            byte[] componentData = codec.encode_value(any);
            tc = new TaggedComponent(TAG_SSL_SEC_TRANS.value, componentData);
        } catch (InvalidTypeForEncoding e) {
            throw JacORBLogger.ROOT_LOGGER.unexpectedException(e);
        }
        return tc;
    }
View Full Code Here

TOP

Related Classes of org.omg.IOP.TaggedComponent

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.