Package com.sun.star.corba

Examples of com.sun.star.corba.CorbaString8


  }

  private void write_objref(Object obj, TypeDescription typeDescription) throws Exception {
    String sType = typeDescription.getTypeName();

    IOR ior = new IOR(new CorbaString8(sType), null);

    if(obj != null) {
      String oId = (String)bridge.mapInterfaceTo(obj, new Type(typeDescription));
     
      if(DEBUG) System.err.println("##### Marshal.write_objref:" + obj + " " + typeDescription + " oId:" + oId + " stype:" + sType);
     
      ObjectKey objectKey = new ObjectKey(new CorbaString8(oId), new CorbaString8(sType));
      Marshal tmpMarshal = new Marshal(littleEndian, bridge);
      tmpMarshal.writeObject(Unmarshal.__ObjectKeyTypeDescription, objectKey);
     
      ProfileBody_1_1 profileBody = new ProfileBody_1_1(new com.sun.star.corba.iiop.Version((byte)1, (byte)2),
                                new CorbaString8("unknown"),
                                (short)0,
                                tmpMarshal.reset(),
                                new com.sun.star.corba.iop.TaggedComponent[0]);

      Marshal marshal = new Marshal(littleEndian, bridge);
View Full Code Here


    Object object = null;

    if(typeDescription.getZClass() == CorbaString8.class) { // special treatement for CorbaString8
      String string = read_asciistring();
      if(DEBUG) System.err.println("##### Unmarshal.read_struct - CorbaString8:" + string);
      object = new CorbaString8(string);
    }
    else {
      object = typeDescription.getZClass().newInstance();

      readStruct(typeDescription, object);
View Full Code Here

    _flushList = new Vector();
  }

  static private byte[] marshalObjectKey(String oId, String sType) throws Exception {
    Marshal marshal = new Marshal(false, null);
    marshal.writeObject(__ObjectKeyTypeDescription, new ObjectKey(new CorbaString8(oId), new CorbaString8(sType)));
    byte bytes[] = marshal.reset();

    return bytes;
  }
View Full Code Here

    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) {
View Full Code Here

TOP

Related Classes of com.sun.star.corba.CorbaString8

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.