Package etch.bindings.java.msg

Examples of etch.bindings.java.msg.Message


    );
  }
 
  private void testTypeField( Type type, Field field, Object value )
  {
    Message msg = new Message( type, vf );
    msg.put( field, value );
  }
View Full Code Here


  public void messageId() throws Exception
  {
    Type mt_foo = new Type( "foo" );
    mt_foo.putValidator( DefaultValueFactory._mf__messageId, Validator_long.get( 0 ) );
   
    Message msg = new Message( mt_foo, vf );
   
    assertNull( vf.getMessageId( msg ) );
   
    vf.setMessageId( msg, 234L );
   
View Full Code Here

  public void inReplyTo() throws Exception
  {
    Type mt_foo = new Type( "foo" );
    mt_foo.putValidator( DefaultValueFactory._mf__inReplyTo, Validator_long.get( 0 ) );
   
    Message msg = new Message( mt_foo, vf );
   
    assertNull( vf.getInReplyTo( msg ) );
   
    vf.setInReplyTo( msg, 234L );
   
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 */
  @Test
  public void newMessage() throws Exception
  {
    Message msg = remote._newMessage( mt );
    msg.checkType( mt );
    assertSame( vf, msg.vf() );
  }
View Full Code Here

  /** @throws Exception */
  @Test
  public void send() throws Exception
  {
    Message msg = remote._newMessage( mt );
   
    remote._send( msg );
   
    assertSame( What.TRANSPORT_MESSAGE, transport.what );
    assertNull( transport.recipient );
View Full Code Here

  /** @throws Exception */
  @Test
  public void begincall() throws Exception
  {
    Message msg = remote._newMessage( mt );
   
    transport.mb = mb;
   
    Mailbox rmb = remote._begincall( msg );
   
View Full Code Here

   
    lengthBudget = buf.avail();
   
    try
    {
      Message msg = startMessage();
      readKeysAndValues( msg );
      endMessage( msg );
      return msg;
    }
    finally
View Full Code Here

          version, VERSION ) );
   
    Type t = readType();
    int length = readLength();
   
    return new Message( t, vf, length );
  }
View Full Code Here

   * @param type the type of the message.
   * @return a new message
   */
  public final Message _newMessage( Type type )
  {
    return new Message( type, _vf );
  }
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.