Package com.sun.star.lib.uno.typedesc

Examples of com.sun.star.lib.uno.typedesc.MethodDescription


    boolean synchron = (requestHeader.response_flags != 0); // if != 0, then it should be 3
   
    TypeDescription typeDescription = TypeDescription.getTypeDescription(objectKey.sType.theString);
    ThreadID threadId = new ThreadID(logicalThreadID.IDs[0].threadID);

    MethodDescription methodDescription = typeDescription.getMethodDescription(requestHeader.operation.theString);

    Object params[] = new Object[methodDescription.getInSignature().length];

    if(synchron) // if the request is synchron, it is pending
      putPendingReply(threadId, new Object[]{params, methodDescription.getOutSignature(), methodDescription.getReturnSig(), new Integer(requestHeader.request_id)});
   
    IMessage iMessage = new Message(objectKey.sOid.theString,
                    null,
                    typeDescription,
                    methodDescription,
View Full Code Here


    if(DEBUG) System.err.println("##### " + getClass().getName() + ".writeRequest:" + oid + " " + typeDescription + " " + operation);

    ++ _requestsSend;


    MethodDescription methodDescription = typeDescription.getMethodDescription(operation);

    Marshal marshal = new Marshal(false, _iBridge);

    TargetAddress targetAddress = new TargetAddress(-7,
                            (short)0,
                            marshalObjectKey(oid, typeDescription.getTypeName()),
                            new TaggedProfile(2, new byte[]{(byte)7, (byte)6, (byte)5}),
                            new IORAddressingInfo(3,
                                        new IOR(new CorbaString8(""),
                                            new TaggedProfile[0])
                                          )
                              );

    LogicalThreadID logicalThreadID = new LogicalThreadID(new OneThreadID[]{new OneThreadID(0, threadId.getBytes())});
    ServiceContext serviceContexts[] = new ServiceContext[]{new ServiceContext(4, marshalLogicalThreadID(logicalThreadID))};


    // if the type of request is not provided, use methodDescription if available, otherwise fall back to synchron
    if(synchron[0] == null) {
      if(methodDescription == null)
        synchron[0] = new Boolean(true);
      else
        synchron[0] = new Boolean(!methodDescription.isOneway());
    }


    int messageType = MsgType_1_1.Request_value;
    marshal.writeObject(__RequestHeader_1_2TypeDescription,
              new RequestHeader_1_2(++ _requestId,
                          (byte)(synchron[0].booleanValue() ? 3 : 0),
                          (byte)0, (byte)0, (byte)0,
                          targetAddress,
                          new CorbaString8(operation),
                          serviceContexts)
                );

    // write the in parameters
    for(int i = 0; i < methodDescription.getInSignature().length; ++ i) {
      if(methodDescription.getInSignature()[i] != null) { // is it an in parameter
        if(methodDescription.getOutSignature()[i] != null// is it also an out parameter
          marshal.writeObject(methodDescription.getOutSignature()[i].getComponentType(), ((Object [])params[i])[0]);
        else // in only
          marshal.writeObject(methodDescription.getInSignature()[i], params[i]);
      }
    }

    // add the marshal to the flush list
    _flushList.addElement(new Object[]{MsgType_1_1.Request, marshal});
View Full Code Here

TOP

Related Classes of com.sun.star.lib.uno.typedesc.MethodDescription

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.