Package org.omg.IOP

Examples of org.omg.IOP.ServiceContext


    }

    @Override
    public void receive_reply(ClientRequestInfo ri) {
        try {
            ServiceContext sc = ri.get_reply_service_context(sasContextId);
            Any msg = codec.decode_value(sc.context_data, SASContextBodyHelper.type());
            SASContextBody contextBody = SASContextBodyHelper.extract(msg);

            // At this point contextBody should contain a CompleteEstablishContext message, which does not require any
            // treatment. ContextError messages should arrive via receive_exception().
View Full Code Here


    }

    @Override
    public void receive_exception(ClientRequestInfo ri) {
        try {
            ServiceContext sc = ri.get_reply_service_context(sasContextId);
            Any msg = codec.decode_value(sc.context_data, SASContextBodyHelper.type());
            SASContextBody contextBody = SASContextBodyHelper.extract(msg);

            // At this point contextBody may contain a either a CompleteEstablishContext message or a ContextError message.
            // Neither message requires any treatment. We decoded the context body just to check that it contains
View Full Code Here

            CodeSetContextHelper.write
            (
                os,
                new CodeSetContext(conn.getTCS(), conn.getTCSW())
            );
            addServiceContext(new ServiceContext
            (
                org.omg.IOP.CodeSets.value,
                os.getBufferCopy()
            ));
            conn.markTCSNegotiated();
View Full Code Here

    private ServiceContext createInvocationPolicies()
    {
        CDROutputStream out = new CDROutputStream();
        out.beginEncapsulatedArray();
        PolicyValueSeqHelper.write(out, getTimingPolicyValues());
        return new ServiceContext (INVOCATION_POLICIES.value,
                                   out.getBufferCopy());
    }
View Full Code Here

    private ServiceContext createExceptionDetailMessage (String message)
    {
        CDROutputStream out = new CDROutputStream();
        out.beginEncapsulatedArray();
        out.write_wstring(message);
        return new ServiceContext (org.omg.IOP.ExceptionDetailMessage.value,
                                   out.getBufferCopy());
    }
View Full Code Here

     * this method decodes them and puts them into the corresponding
     * instance variables (requestStartTime, requestEndTime, replyEndTime).
     */
    private void getTimingPolicies()
    {
        ServiceContext ctx = in.getServiceContext(INVOCATION_POLICIES.value);
        if (ctx != null)
        {
            CDRInputStream input = new CDRInputStream (null, ctx.context_data);
            input.openEncapsulatedArray();
            PolicyValue[] p = PolicyValueSeqHelper.read (input);
View Full Code Here

        {
            org.omg.CORBA.Any any = ri.get_slot( slot_id );
     
            if( any.type().kind().value() != org.omg.CORBA.TCKind._tk_null )
            {
                ServiceContext ctx =
                    new ServiceContext(4711, codec.encode( any ));

                ri.add_request_service_context( ctx, false );
            }
        }
        catch (Exception e)
View Full Code Here

    {
        System.out.println("ServerInterceptor: receive_request_service_contexts()");
       
        try
        {
            ServiceContext ctx =
                ri.get_request_service_context( 4711 );

            ri.set_slot( slot_id, codec.decode( ctx.context_data ));
        }
        catch (Exception e)
View Full Code Here

            }
            else
            {
                msg = makeMessageInContext(orb, client_context_id, false);
            }
            ri.add_request_service_context(new ServiceContext(SecurityAttributeService, codec.encode_value( msg ) ), true);
        }
        catch (Exception e)
        {
            if (logger.isWarnEnabled())
                logger.warn("Could not set security service context: " + e);
View Full Code Here

    public void receive_reply(org.omg.PortableInterceptor.ClientRequestInfo ri)
    {
        // get SAS message
        SASContextBody contextBody = null;
        ServiceContext ctx = null;
        try
        {
            ctx = ri.get_reply_service_context(SecurityAttributeService);
        }
        catch (BAD_PARAM e)
View Full Code Here

TOP

Related Classes of org.omg.IOP.ServiceContext

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.