Package org.apache.etch.bindings.java.msg

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


    {
      int timeout = disableTimeout ? 0 : responseType.getTimeout();
      Mailbox.Element mbe = mb.read( timeout);
      if (mbe == null)
        throw new TimeoutException( "timeout waiting for "+responseType );
      Message rmsg = mbe.msg;
      rmsg.checkType( responseType );
      Object r = rmsg.get( responseType.getResponseField() );
      if (r instanceof Exception)
      {
        Exception e = (Exception) r;
        e.fillInStackTrace();
        throw e;
View Full Code Here


    public void sessionPacket( Who sender, FlexBuffer buf ) throws Exception
  {
    // messagize the packet.
   
    Message msg = tdi.readMessage( buf );
//    Log.report( "Messagizer.packet", "who", this, "recv", msg );
    boolean handled = session.sessionMessage( sender, msg );
    if (!handled)
      session.sessionNotify( new UnwantedMessage( sender, msg ) );
  }
View Full Code Here

{
  /** @throws Exception */
  @org.junit.Test
  public void method_nothing() throws Exception
  {
    Message msg = new Message(
      ValueFactoryTest1._mt_org_apache_etch_tests_Test1_nothing,
      vf );
    stub.sessionMessage( null, msg );
    // check the result.
    src.xreply
View Full Code Here

  /** @throws Exception */
  @org.junit.Test
  public void method_incr1() throws Exception
  {
    Message msg = new Message(
      ValueFactoryTest1._mt_org_apache_etch_tests_Test1_incr, vf );
    msg.put( ValueFactoryTest1._mf_x, 3 );
    stub.sessionMessage( null, msg );
    // check the result.
    src.xreply
      .checkType( ValueFactoryTest1._mt_org_apache_etch_tests_Test1__result_incr );
    assertEquals( 1, src.xreply.size() );
View Full Code Here

  /** @throws Exception */
  @org.junit.Test
  public void method_incr2() throws Exception
  {
    Message msg = new Message(
      ValueFactoryTest1._mt_org_apache_etch_tests_Test1_incr, vf );
    // msg.put( ValueFactoryTest1._mf_x, 3 ); -- cause an exception
    stub.sessionMessage( null, msg );
    // check the result.
    src.xreply
View Full Code Here

  /** @throws Exception */
  @org.junit.Test
  public void method_sub() throws Exception
  {
    Message msg = new Message(
      ValueFactoryTest1._mt_org_apache_etch_tests_Test1_sub, vf );
    msg.put( ValueFactoryTest1._mf_x, 7 );
    msg.put( ValueFactoryTest1._mf_y, 3 );
    stub.sessionMessage( null, msg );
    // check the result.
    src.xreply
      .checkType( ValueFactoryTest1._mt_org_apache_etch_tests_Test1__result_sub );
    assertEquals( 1, src.xreply.size() );
View Full Code Here

  /** @throws Exception */
  @org.junit.Test
  public void method_sum() throws Exception
  {
    Message msg = new Message(
      ValueFactoryTest1._mt_org_apache_etch_tests_Test1_sum, vf );
    msg.put( ValueFactoryTest1._mf_x, new int[]
    {
      1, 2, 3, 7, 11
    } );
    stub.sessionMessage( null, msg );
    // check the result.
View Full Code Here

  /** @throws Exception */
  @org.junit.Test
  public void method_trans1() throws Exception
  {
    Message msg = new Message(
      ValueFactoryTest1._mt_org_apache_etch_tests_Test1_trans,
      vf );
    msg.put( ValueFactoryTest1._mf_e, Test1.E1.A );
    msg.put( ValueFactoryTest1._mf_x, 5 );
    stub.sessionMessage( null, msg );
    // check the result.
    src.xreply
      .checkType( ValueFactoryTest1._mt_org_apache_etch_tests_Test1__result_trans );
    assertEquals( 1, src.xreply.size() );
View Full Code Here

  /** @throws Exception */
  @org.junit.Test
  public void method_trans2() throws Exception
  {
    Message msg = new Message(
      ValueFactoryTest1._mt_org_apache_etch_tests_Test1_trans,
      vf );
    msg.put( ValueFactoryTest1._mf_e, Test1.E1.B );
    msg.put( ValueFactoryTest1._mf_x, 5 );
    stub.sessionMessage( null, msg );
    // check the result.
    src.xreply
      .checkType( ValueFactoryTest1._mt_org_apache_etch_tests_Test1__result_trans );
    assertEquals( 1, src.xreply.size() );
View Full Code Here

  /** @throws Exception */
  @org.junit.Test
  public void method_trans3() throws Exception
  {
    Message msg = new Message(
      ValueFactoryTest1._mt_org_apache_etch_tests_Test1_trans,
      vf );
    msg.put( ValueFactoryTest1._mf_e, Test1.E1.C );
    msg.put( ValueFactoryTest1._mf_x, 5 );
    stub.sessionMessage( null, msg );
    // check the result.
    src.xreply
      .checkType( ValueFactoryTest1._mt_org_apache_etch_tests_Test1__result_trans );
    assertEquals( 1, src.xreply.size() );
View Full Code Here

TOP

Related Classes of org.apache.etch.bindings.java.msg.Message

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.