Package org.omg.IOP

Examples of org.omg.IOP.ServiceContext


        SASContextBody contextBody = null;
        long client_context_id = 0;
        byte[] contextToken = null;
        try
        {
            ServiceContext ctx =
                ri.get_request_service_context(SASInitializer.SecurityAttributeService);
            Any ctx_any =
                codec.decode_value( ctx.context_data, SASContextBodyHelper.type() );
            contextBody = SASContextBodyHelper.extract(ctx_any);
        }
View Full Code Here


        SASContextBody contextBody = null;
        long client_context_id = 0;
        byte[] contextToken = null;
        try
        {
            ServiceContext ctx =
                ri.get_request_service_context(SASInitializer.SecurityAttributeService);
            Any ctx_any =
                codec.decode_value( ctx.context_data, SASContextBodyHelper.type() );
            contextBody =
                SASContextBodyHelper.extract(ctx_any);
View Full Code Here

        SASContextBodyHelper.insert( any, contextBody );
        if (ri != null)
        {
            try
            {
                ri.add_reply_service_context(new ServiceContext(SASInitializer.SecurityAttributeService, codec.encode_value( any ) ), true);
            }
            catch (Exception e)
            {
                logger.error("Error setting reply service context:" + e);
                throw new org.omg.CORBA.NO_PERMISSION("SAS Error setting reply service context: " + e, MinorCodes.SAS_TSS_FAILURE, CompletionStatus.COMPLETED_MAYBE);
View Full Code Here

        SASContextBodyHelper.insert( any, contextBody );
        if (ri != null)
        {
            try
            {
                ri.add_reply_service_context(new ServiceContext(SASInitializer.SecurityAttributeService, codec.encode_value( any ) ), true);
            }
            catch (Exception e)
            {
                logger.error("Error setting reply service context:" + e);
                throw new org.omg.CORBA.NO_PERMISSION("SAS Error setting reply service context: " + e, MinorCodes.SAS_TSS_FAILURE, CompletionStatus.COMPLETED_MAYBE);
View Full Code Here

        {
            final ReplyInputStream input = (ReplyInputStream)in;

            try
            {
                final ServiceContext context = input.getServiceContext(ExceptionDetailMessage.value);
                if (context != null)
                {
                    final CDRInputStream data = new CDRInputStream(null, context.context_data);

                    try
View Full Code Here

                /* insert the context data into an any and then encode
                   it into the context */
                Any ctx_any = ((ClientRequestInfoImpl) ri).orb.create_any();
                RequestHelper.insert( ctx_any, current_request );
                ServiceContext context =
                    new ServiceContext ( TracingContextID.value,
                                         codec.encode( ctx_any ) );

                timer.start( ri.request_id(), ri.target() );

                ri.add_request_service_context( context, true );
View Full Code Here

        try
        {
            os.beginEncapsulatedArray();
            CodeSetContextHelper.write( os, new CodeSetContext( tcs.getId(), tcsw.getId() ));

            return new ServiceContext( TAG_CODE_SETS.value, os.getBufferCopy() );
        }
        finally
        {
            os.close();
        }
View Full Code Here

    callPattern.append("In");

    checkClientCtx(info);

    // Add one context to reply.
    ServiceContext ce = new ServiceContext();
    ce.context_id = 6002;
    ce.context_data = new byte[ 0 ];

    info.add_reply_service_context(ce, true);
  }
View Full Code Here

  public void receive_request(ServerRequestInfo info) throws ForwardRequest
  {
    callPattern.append("Rq[" + info.operation() + "]");

    // Add one context to reply.
    ServiceContext ce = new ServiceContext();
    ce.context_id = 6001;
    ce.context_data = new byte[ 0 ];

    info.add_reply_service_context(ce, false);
View Full Code Here

  }

  private void checkClientCtx(ServerRequestInfo info)
  {
    // Check if the two client side service contexts are present.
    ServiceContext s = info.get_request_service_context(5000);

    ServiceContext se = info.get_request_service_context(5001);

    if (s.context_id != 5000)
      {
        throw new RuntimeException("S ERROR Returned context 5000 id mismatch");
      }
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.