Examples of StructValue


Examples of etch.bindings.java.msg.StructValue

    List<Object> list = (List<Object>) value;
   
    Object[] values = new Object[list.size()];
    list.toArray( values );
   
    StructValue struct = new StructValue( type, vf );
    struct.put( field, values );
    return struct;
  }
View Full Code Here

Examples of etch.bindings.java.msg.StructValue

    Set<Object> set = (Set<Object>) value;
   
    Object[] keys = new Object[set.size()];
    set.toArray( keys );
   
    StructValue struct = new StructValue( type, vf );
    struct.put( field, keys );
    return struct;
  }
View Full Code Here

Examples of etch.bindings.java.msg.StructValue

    return new URL( (String) struct.get( field ) );
  }

  public StructValue exportValue( ValueFactory vf, Object value )
  {
    StructValue struct = new StructValue( type, vf );
    struct.put( field, ((URL) value).toString() );
    return struct;
  }
View Full Code Here

Examples of etch.bindings.java.msg.StructValue

    {
      keysAndValues[index++] = me.getKey();
      keysAndValues[index++] = me.getValue();
    }
   
    StructValue struct = new StructValue( type, vf );
    struct.put( field, keysAndValues );
    return struct;
  }
View Full Code Here

Examples of etch.bindings.java.msg.StructValue

 
  private final Field field;
 
  public StructValue exportValue( ValueFactory vf, Object value )
  {
    StructValue sv = new StructValue( type, vf );
    sv.put( field, value.toString() );
    return sv;
  }
View Full Code Here

Examples of org.apache.axis2.corba.idl.values.StructValue

            AbstractValue value;
            if (compositeType instanceof ValueType)
                value = new ObjectByValue((ValueType) compositeType);
            else if (compositeType instanceof Struct)
                value = new StructValue((Struct) compositeType);
            else
                throw new CorbaInvocationException("Parameter type not supported");

            value.setMemberValues(compositeValues);
            return value;
View Full Code Here

Examples of org.apache.etch.bindings.java.msg.StructValue

 
  private final Field field;
 
  public StructValue exportValue( ValueFactory vf, Object value )
  {
    StructValue sv = new StructValue( type, vf );
    sv.put( field, value.toString() );
    return sv;
  }
View Full Code Here

Examples of org.apache.etch.bindings.java.msg.StructValue

 
  private final Field field;

  public StructValue exportValue( ValueFactory vf, Object value )
  {
    StructValue sv = new StructValue( type, vf );
    sv.put( field, value.toString() );
    return sv;
  }
View Full Code Here

Examples of org.apache.etch.bindings.java.msg.StructValue

   
    Type type = getCustomStructType( clss );
   
    if (type == null && clss == StructValue.class)
    {
      StructValue struct = (StructValue) value;
      type = struct.type();
    }
   
    if (type == null)
    {
      if (Throwable.class.isAssignableFrom( clss ))
View Full Code Here

Examples of org.apache.etch.bindings.java.msg.StructValue

    public void dispatch( Who sender, Message msg ) throws Exception
    {
      System.out.println( "msg = "+msg );
      if (msg.isType( MyValueFactoryCuae._mt_etch_examples_cuae_CuaeServer_doit1 ))
      {
        StructValue req = (StructValue) msg.get( MyValueFactoryCuae._mf_req );
        MyValueFactoryCuae._mt_etch_examples_cuae_Cuae_Request.checkIsAssignableFrom( req.type() );
        int code = (Integer) req.get( MyValueFactoryCuae._mf_code );
       
        StructValue resp;
        switch (code)
        {
          case 23:
            resp = new StructValue( MyValueFactoryCuae._mt_etch_examples_cuae_Cuae_Response, vf );
            resp.put( MyValueFactoryCuae._mf_msg, "foo" );
            delayDoit2a( 7 );
            break;
         
          case 19:
            resp = new StructValue( MyValueFactoryCuae._mt_etch_examples_cuae_Cuae_RespWithCode, vf );
            resp.put( MyValueFactoryCuae._mf_msg, "bar" );
            resp.put( MyValueFactoryCuae._mf_code, 54 );
            delayDoit2b( 11, "heaven" );
            break;
         
          case 13:
            resp = new StructValue( MyValueFactoryCuae._mt_etch_examples_cuae_Cuae_Response, vf );
            resp.put( MyValueFactoryCuae._mf_msg, "baz" );
            delayDoit2a( 99 );
            break;
         
          default:
            resp = new StructValue( MyValueFactoryCuae._mt_etch_examples_cuae_Cuae_RespWithCode, vf );
            resp.put( MyValueFactoryCuae._mf_msg, "unknown code " + code );
            resp.put( MyValueFactoryCuae._mf_code, 63 );
            delayDoit2b( 23, "killer bee" );
            break;
        }
       
       
        Message rmsg = msg.reply();
        System.out.println( "rmsg = "+rmsg );
        System.out.println( "resp = "+resp );
        rmsg.put( MyValueFactoryCuae._mf_result, resp );
        svc.transportMessage( sender, rmsg );
        return;
      }
     
      if (msg.isType( MyValueFactoryCuae._mt_etch_examples_cuae_Cuae_doit3 ))
      {
        StructValue[] reqs = (StructValue[]) msg.get( MyValueFactoryCuae._mf_req );
        StructValue req = reqs[0];
        MyValueFactoryCuae._mt_etch_examples_cuae_Cuae_Request.checkIsAssignableFrom( req.type() );
        int code = (Integer) req.get( MyValueFactoryCuae._mf_code );
       
        StructValue resp;
        switch (code)
        {
          case 23:
            resp = new StructValue( MyValueFactoryCuae._mt_etch_examples_cuae_Cuae_Response, vf );
            resp.put( MyValueFactoryCuae._mf_msg, "foo" );
            delayDoit2a( 7 );
            break;
         
          case 19:
            resp = new StructValue( MyValueFactoryCuae._mt_etch_examples_cuae_Cuae_RespWithCode, vf );
            resp.put( MyValueFactoryCuae._mf_msg, "bar" );
            resp.put( MyValueFactoryCuae._mf_code, 54 );
            delayDoit2b( 11, "heaven" );
            break;
         
          case 13:
            resp = new StructValue( MyValueFactoryCuae._mt_etch_examples_cuae_Cuae_Response, vf );
            resp.put( MyValueFactoryCuae._mf_msg, "baz" );
            delayDoit2a( 99 );
            break;
         
          default:
            resp = new StructValue( MyValueFactoryCuae._mt_etch_examples_cuae_Cuae_RespWithCode, vf );
            resp.put( MyValueFactoryCuae._mf_msg, "unknown code " + code );
            resp.put( MyValueFactoryCuae._mf_code, 63 );
            delayDoit2b( 23, "killer bee" );
            break;
        }
       
       
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.