Package etch.bindings.java.msg

Examples of etch.bindings.java.msg.Field


   * @param type
   * @param class2type
   */
  public static void init( Type type, Class2TypeMap class2type )
  {
    Field field = type.getField( FIELD_NAME );
    class2type.put( _Etch_RuntimeException.class, type );
    type.setComponentType( _Etch_RuntimeException.class );
    type.setImportExportHelper( new RuntimeExceptionSerializer( type, field ) );
    type.putValidator( field, Validator_string.get( 0 ) );
    type.lock();
View Full Code Here


    mt_response = new Type( "_Etch_PwAuthResp" );
   
    vf.addType( mt_request );
    vf.addType( mt_response );
   
    mf_user = new Field( "user" );
    mf_password = new Field( "password" );
    mf_ok = new Field( "ok" );
    mf_status = new Field( "status" );
   
    mt_request.putValidator( mf_user, Validator_string.get( 0 ) );
    mt_request.putValidator( mf_password, Validator_string.get( 0 ) );
    mt_request.setResult( mt_response );
    mt_request.lock();
View Full Code Here

//    Log.report( "KeepAliveInstalled",
//      "delay", delay, "count", count, "server", server );
   
    vf = (ValueFactory) resources.get( Transport.VALUE_FACTORY );

    mf_delay = new Field( "delay" );
    mf_count = new Field( "count" );
   
    mt_request = new Type( "_Etch_KeepAliveReq" );
    mt_request.putValidator( mf_delay, Validator_int.get( 0 ) );
    mt_request.putValidator( mf_count, Validator_int.get( 0 ) );
    vf.addType( mt_request );
View Full Code Here

  /** Field for result */
  public static Field _mf_result;

  private static void initFields()
  {
    _mf_code = new Field( "code" );
    _mf_msg = new Field( "msg" );
    _mf_req = new Field( "req" );
    _mf_result = new Field( "result" );

    _mt_etch_examples_cuae_CuaeClient__result_doit1.setResponseField( _mf_result );
    _mt_etch_examples_cuae_CuaeServer__result_doit2.setResponseField( _mf_result );
    _mt_etch_examples_cuae_Cuae__result_doit3.setResponseField( _mf_result );
    _mt_etch_examples_cuae_Cuae__result_doit4.setResponseField( _mf_result );
View Full Code Here

    assertEquals( "msg.size", n, svc.xmsg.size() );
//    System.out.println("size = " + svc.xmsg.size());
   
    for (int i = 0; i < n; i++)
    {
      Field f = fields[i];
      assertEquals( "object_"+i, objects[i], svc.xmsg.get( f ) );
    }
   
    assertSame( "resultType", resultType, svc.xresponseType );
    assertSame( "responseField", ValueFactoryTest1._mf_result, svc.xresponseField );
View Full Code Here

    Thread.sleep( 5000 );    
//    System.out.println("Out of sleep");
    assertSame( What.TRANSPORT_MESSAGE, transport.what );
    Message msg = transport.msg;
    assertEquals( "_Etch_KeepAliveReq", msg.type().getName() );
    assertEquals( 4, msg.get( new Field( "count" ) ) );
    assertEquals( 3, msg.get( new Field( "delay" ) ) );
  }
View Full Code Here

    Thread.sleep( 4000 );    
//    System.out.println("Out of sleep");
    assertSame( What.TRANSPORT_MESSAGE, transport.what );
    Message msg = transport.msg;
    assertEquals( "_Etch_KeepAliveReq", msg.type().getName() );
    assertEquals( 4, msg.get( new Field( "count" ) ) );
    assertEquals( 2, msg.get( new Field( "delay" ) ) );
  }
View Full Code Here

    int delay = 15;
    int count = 4;
   
    MyValueFactory vf1 = new MyValueFactory( "tcp:" );
   
    Field mf_delay = new Field( "delay" );
    Field mf_count = new Field( "count" );
   
    Type mt_request = new Type( "_Etch_KeepAliveReq" );
    mt_request.putValidator( mf_delay, Validator_int.get( 0 ) );
    mt_request.putValidator( mf_count, Validator_int.get( 0 ) );
    vf1.addType( mt_request );
View Full Code Here

    assertTrue( session.up );
   
    assertSame( What.TRANSPORT_MESSAGE, transport.what );
    Message msg = transport.msg;
    assertEquals( "_Etch_PwAuthReq", msg.type().getName() );
    assertEquals( "fred", msg.get( new Field( "user" ) ) );
    assertEquals( "1234", msg.get( new Field( "password" ) ) );
  }
View Full Code Here

    assertTrue( session.up );
   
    assertSame( What.TRANSPORT_MESSAGE, transport.what );
    Message msg = transport.msg;
    assertEquals( "_Etch_PwAuthReq", msg.type().getName() );
    assertEquals( "fred", msg.get( new Field( "user" ) ) );
    assertEquals( "2345", msg.get( new Field( "password" ) ) );
  }
View Full Code Here

TOP

Related Classes of etch.bindings.java.msg.Field

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.