Package etch.bindings.java.msg

Examples of etch.bindings.java.msg.Message


  /** @throws Exception */
  @Test
  public void message1() throws Exception
  {
    Message msg = new Message( MyValueFactory.mt_add, vf );
    transport.header_size = 0;
   
    assertNull( transport.what );
   
    m.transportMessage( who, msg );
View Full Code Here


  /** @throws Exception */
  @Test
  public void message2() throws Exception
  {
    Message msg = new Message( MyValueFactory.mt_add_result, vf );
    transport.header_size = 8;
   
    assertNull( transport.what );
   
    m.transportMessage( who, msg );
View Full Code Here

    Logger.testFlag = true;
    Logger logger = newLogger(uri);
    logger.setSession( session );
    assertSame(transport.getSession(),logger);
    assertSame(logger.getSession(),session);
    Message m = constructMessage();
    logger.transportMessage( null, m );
    assertEquals(m.toString(),transport.msg.toString());
  }
View Full Code Here

    Logger.testFlag = true;
    Logger logger = newLogger(uri);
    logger.setSession( session );
    assertSame(transport.getSession(),logger);
    assertSame(logger.getSession(),session);
    Message m = constructMessage();
    logger.sessionMessage( null, m );
    assertEquals(m.toString(),session.msg.toString());
  }
View Full Code Here

     
    mt_request.setResult( mt_response );
   
    vf.addType( mt_request);
   
    Message msg = new Message( mt_request, vf );
 
    return msg;
  }
View Full Code Here

  @Test
  public void sessionMessage1() throws Exception
  {
    howdy.setAsyncMode( AsyncMode.NONE );
   
    Message msg = new Message( howdy, vf );
    boolean msg_handled = stub.sessionMessage( who, msg );
    assertTrue( msg_handled );
   
    assertSame( What.HOWDY, session.what );
    assertSame( transport, session.svc );
View Full Code Here

  @Test
  public void sessionMessage2() throws Exception
  {
    howdy.setAsyncMode( AsyncMode.QUEUED );
   
    Message msg = new Message( howdy, vf );
    boolean msg_handled = stub.sessionMessage( who, msg );
    assertTrue( msg_handled );
   
    assertSame( What.HOWDY, session.what );
    assertSame( transport, session.svc );
View Full Code Here

  @Test
  public void sessionMessage3() throws Exception
  {
    howdy.setAsyncMode( AsyncMode.FREE );
   
    Message msg = new Message( howdy, vf );
    boolean msg_handled = stub.sessionMessage( who, msg );
    assertTrue( msg_handled );
   
    assertSame( What.HOWDY, session.what );
    assertSame( transport, session.svc );
View Full Code Here

  @Test
  public void sessionMessage4() throws Exception
  {
    howdy.setAsyncMode( AsyncMode.NONE );
   
    Message msg = new Message( nogood, vf );
    boolean msg_handled = stub.sessionMessage( who, msg );
    assertFalse( msg_handled );
   
    assertNull( session.what );
    assertNull( session.svc );
View Full Code Here

    {
      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

TOP

Related Classes of 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.