Examples of CDROutputObject


Examples of com.sun.corba.ee.impl.encoding.CDROutputObject

    }

    private org.omg.IOP.TaggedComponent createCompoundSecMechListComponent(
  CompoundSecMech[] mechList) {

   CDROutputObject out = (CDROutputObject) orb.create_output_stream();
  out.putEndian();

  boolean stateful = false;
  CompoundSecMechList list = new CompoundSecMechList(
      stateful, mechList);
  CompoundSecMechListHelper.write(out, list);
  byte[] buf = out.toByteArray();
  org.omg.IOP.TaggedComponent tc = new org.omg.IOP.TaggedComponent(
      TAG_CSI_SEC_MECH_LIST.value, buf ) ;
  return tc;
    }
View Full Code Here

Examples of com.sun.corba.ee.impl.encoding.CDROutputObject

  int targetSupports, int targetRequires, TransportAddress[] listTa ) {

  TLS_SEC_TRANS tls_sec = new TLS_SEC_TRANS(
      (short)targetSupports, (short)targetRequires, listTa);

   CDROutputObject out = (CDROutputObject) orb.create_output_stream();
   out.putEndian() ;
   TLS_SEC_TRANSHelper.write((org.omg.CORBA.portable.OutputStream)out, tls_sec);

  byte[] buf = out.toByteArray() ;
 
  // create new Tagged Component for SSL
  org.omg.IOP.TaggedComponent tc = new org.omg.IOP.TaggedComponent(
      TAG_TLS_SEC_TRANS.value, buf ) ;
  return tc;
View Full Code Here

Examples of com.sun.corba.ee.impl.encoding.CDROutputObject

    }

    private org.omg.IOP.TaggedComponent createCompoundSecMechListComponent(
  CompoundSecMech[] mechList) {

   CDROutputObject out = (CDROutputObject) orb.create_output_stream();
  out.putEndian();

  boolean stateful = false;
  CompoundSecMechList list = new CompoundSecMechList(
      stateful, mechList);
  CompoundSecMechListHelper.write(out, list);
  byte[] buf = out.toByteArray();
  org.omg.IOP.TaggedComponent tc = new org.omg.IOP.TaggedComponent(
      TAG_CSI_SEC_MECH_LIST.value, buf ) ;
  return tc;
    }
View Full Code Here

Examples of com.sun.corba.ee.impl.encoding.CDROutputObject

  int targetSupports, int targetRequires, TransportAddress[] listTa ) {

  TLS_SEC_TRANS tls_sec = new TLS_SEC_TRANS(
      (short)targetSupports, (short)targetRequires, listTa);

   CDROutputObject out = (CDROutputObject) orb.create_output_stream();
   out.putEndian() ;
   TLS_SEC_TRANSHelper.write((org.omg.CORBA.portable.OutputStream)out, tls_sec);

  byte[] buf = out.toByteArray() ;
 
  // create new Tagged Component for SSL
  org.omg.IOP.TaggedComponent tc = new org.omg.IOP.TaggedComponent(
      TAG_TLS_SEC_TRANS.value, buf ) ;
  return tc;
View Full Code Here

Examples of com.sun.corba.se.impl.encoding.CDROutputObject

        if (orb.subcontractDebugFlag) {
            dprint(".handleRequest: " + opAndId(messageMediator)
                   + ": sending response");
        }
        // REVISIT - type and location
        CDROutputObject outputObject = (CDROutputObject)
            messageMediator.getOutputObject();
        if (outputObject != null) {
            // REVISIT - can be null for TRANSIENT below.
            outputObject.finishSendingMessage();
        }
    }
View Full Code Here

Examples of com.sun.corba.se.impl.encoding.CDROutputObject

                        msg.getEncodingVersion(),
                        msg.getRequestId(),
                        LocateReplyMessage.UNKNOWN_OBJECT, null);
        }

        CDROutputObject outputObject =
            createAppropriateOutputObject(messageMediator,
                                          msg, reply);
        messageMediator.setOutputObject(outputObject);
        outputObject.setMessageMediator(messageMediator);

        reply.write(outputObject);
        // outputObject.setMessage(reply); // REVISIT - not necessary
        if (ior != null) {
            ior.write(outputObject);
View Full Code Here

Examples of com.sun.corba.se.impl.encoding.CDROutputObject

    private CDROutputObject createAppropriateOutputObject(
        CorbaMessageMediator messageMediator,
        Message msg, LocateReplyMessage reply)
    {
        CDROutputObject outputObject;

        if (msg.getGIOPVersion().lessThan(GIOPVersion.V1_2)) {
            // locate msgs 1.0 & 1.1 :=> grow,
            outputObject = sun.corba.OutputStreamFactory.newCDROutputObject(
                             (ORB) messageMediator.getBroker(),
View Full Code Here

Examples of com.sun.corba.se.impl.encoding.CDROutputObject

                          messageMediator.getEncodingVersion(),
                          messageMediator.getRequestId(),
                          ReplyMessage.NEEDS_ADDRESSING_MODE,
                          null, null);
            // REVISIT: via acceptor factory.
            CDROutputObject outputObject =
                sun.corba.OutputStreamFactory.newCDROutputObject(
                (ORB)messageMediator.getBroker(),
                this,
                messageMediator.getGIOPVersion(),
                (CorbaConnection)messageMediator.getConnection(),
                replyHeader,
                ORBConstants.STREAM_FORMAT_VERSION_1);
            messageMediator.setOutputObject(outputObject);
            outputObject.setMessageMediator(messageMediator);
            replyHeader.write(outputObject);
            AddressingDispositionHelper.write(outputObject,
                                              ex.expectedAddrDisp());
            return;

        case Message.GIOPLocateRequest :
            LocateReplyMessage locateReplyHeader = MessageBase.createLocateReply(
                (ORB)messageMediator.getBroker(),
                messageMediator.getGIOPVersion(),
                messageMediator.getEncodingVersion(),
                messageMediator.getRequestId(),
                LocateReplyMessage.LOC_NEEDS_ADDRESSING_MODE,
                null);

            addrDisp = ex.expectedAddrDisp();

            // REVISIT: via acceptor factory.
            outputObject =
                createAppropriateOutputObject(messageMediator,
                                              messageMediator.getRequestHeader(),
                                              locateReplyHeader);
            messageMediator.setOutputObject(outputObject);
            outputObject.setMessageMediator(messageMediator);
            locateReplyHeader.write(outputObject);
            IOR ior = null;
            if (ior != null) {
                ior.write(outputObject);
            }
View Full Code Here

Examples of com.sun.corba.se.impl.encoding.CDROutputObject

        if (orb.subcontractDebugFlag) {
            dprint(".marshalingComplete->: " + opAndId(messageMediator));
        }

        CDROutputObject cdrOutputObject = (CDROutputObject) outputObject;

        //
        // Create server-side input object.
        //

        ByteBufferWithInfo bbwi = cdrOutputObject.getByteBufferWithInfo();
        cdrOutputObject.getMessageHeader().setSize(bbwi.byteBuffer, bbwi.getSize());
        final ORB inOrb = orb;
        final ByteBuffer inBuffer = bbwi.byteBuffer;
        final Message inMsg = cdrOutputObject.getMessageHeader();
        CDRInputObject cdrInputObject = AccessController
                .doPrivileged(new PrivilegedAction<CDRInputObject>() {
                    @Override
                    public CDRInputObject run() {
                        return new CDRInputObject(inOrb, null, inBuffer,
                                inMsg);
                    }
                });
        messageMediator.setInputObject(cdrInputObject);
        cdrInputObject.setMessageMediator(messageMediator);

        //
        // Dispatch
        //

        // REVISIT: Impl cast.
        ((CorbaMessageMediatorImpl)messageMediator).handleRequestRequest(
            messageMediator);

        // InputStream must be closed on the InputObject so that its
        // ByteBuffer can be released to the ByteBufferPool. We must do
        // this before we re-assign the cdrInputObject reference below.
        try { cdrInputObject.close(); }
        catch (IOException ex) {
            // No need to do anything since we're done with the input stream
            // and cdrInputObject will be re-assigned a new client-side input
            // object, (i.e. won't result in a corba error).

            if (orb.transportDebugFlag) {
               dprint(".marshalingComplete: ignoring IOException - " + ex.toString());
            }
        }

        //
        // Create client-side input object
        //

        cdrOutputObject = (CDROutputObject) messageMediator.getOutputObject();
        bbwi = cdrOutputObject.getByteBufferWithInfo();
        cdrOutputObject.getMessageHeader().setSize(bbwi.byteBuffer, bbwi.getSize());
        final ORB inOrb2 = orb;
        final ByteBuffer inBuffer2 = bbwi.byteBuffer;
        final Message inMsg2 = cdrOutputObject.getMessageHeader();
        cdrInputObject = AccessController
                .doPrivileged(new PrivilegedAction<CDRInputObject>() {
                    @Override
                    public CDRInputObject run() {
                        return new CDRInputObject(inOrb2, null, inBuffer2,
View Full Code Here

Examples of com.sun.corba.se.impl.encoding.CDROutputObject

        if (bbwi != null && getByteBuffer() != null)
        {
            MessageMediator messageMediator = parent.getMessageMediator();
            if (messageMediator != null)
            {
                CDROutputObject outputObj =
                             (CDROutputObject)messageMediator.getOutputObject();
                if (outputObj != null)
                {
                    if (outputObj.isSharing(getByteBuffer()))
                    {
                        // Set OutputStream's ByteBuffer and bbwi to null
                        // so its ByteBuffer cannot be released to the pool
                        outputObj.setByteBuffer(null);
                        outputObj.setByteBufferWithInfo(null);
                    }
                }
            }

            // release this stream's ByteBuffer to the pool
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.