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

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


    }
  }
 
  private void sendKeepAliveReq()
  {
    Message msg = new Message( mt_request, vf );
    msg.put( mf_delay, delay );
    msg.put( mf_count, count );
    try
    {
//      Log.report( "SendKeepAliveReq", "msg", msg );
      transport.transportMessage( null, msg );
    }
View Full Code Here


    }
  }
 
  private void sendKeepAliveResp( Message msg )
  {
    Message rmsg = msg.reply();
    try
    {
//      Log.report( "SendKeepAliveResp", "rmsg", rmsg );
      transport.transportMessage( null, rmsg );
    }
View Full Code Here

      password = (String) session.sessionQuery( PASSWORD );
      if (password == null)
        throw new IllegalStateException( "PwAuth: password == null" );
    }
   
    Message msg = new Message( mt_request, vf );
    msg.put( mf_user, user );
    msg.put( mf_password, password );
    transport.transportMessage( null, msg );
  }
View Full Code Here

  }
 
  private void sendPwAuthResp( Who recipient, Message msg, boolean result, String status )
    throws Exception
  {
    Message rmsg = msg.reply();
    rmsg.put( mf_ok, result );
    rmsg.put( mf_status, status );
    transport.transportMessage( recipient, rmsg );
  }
View Full Code Here

            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;
        }
       
       
        Message rmsg = msg.reply();
        System.out.println( "rmsg = "+rmsg );
        System.out.println( "resp = "+resp );
        rmsg.put( MyValueFactoryCuae._mf_result, new StructValue[] { resp } );
        svc.transportMessage( sender, rmsg );
        return;
      }
     
      throw new IllegalArgumentException( "unknown msg type "+msg );
View Full Code Here

          public void doit( TodoManager mgr ) throws Exception
          {
            StructValue req = new StructValue( MyValueFactoryCuae._mt_etch_examples_cuae_Cuae_Request, vf );
            req.put( MyValueFactoryCuae._mf_code, code );
           
            Message msg = new Message( MyValueFactoryCuae._mt_etch_examples_cuae_CuaeClient_doit2, vf );
            msg.put( MyValueFactoryCuae._mf_req, req );
           
            Mailbox mb = svc.begincall( msg );
            Object value = svc.endcall( mb, MyValueFactoryCuae._mt_etch_examples_cuae_CuaeServer__result_doit2 );
           
            if (value instanceof Exception)
View Full Code Here

          {
            StructValue req = new StructValue( MyValueFactoryCuae._mt_etch_examples_cuae_Cuae_ReqWithMessage, vf );
            req.put( MyValueFactoryCuae._mf_code, code );
            req.put( MyValueFactoryCuae._mf_msg, message );
           
            Message msg = new Message( MyValueFactoryCuae._mt_etch_examples_cuae_CuaeClient_doit2, vf );
            msg.put( MyValueFactoryCuae._mf_req, req );
           
            Mailbox mb = svc.begincall( msg );
            Object value = svc.endcall( mb, MyValueFactoryCuae._mt_etch_examples_cuae_CuaeServer__result_doit2 );
           
            if (value instanceof Exception)
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

    stack.push( te );
    elementList.push( te.getChildren() );
   
    Integer id = te.getIntAttr( null, STRUCT_TYPE_ATTR );
    Type type = vf.getType( id );
    return new Message( type, vf );
  }
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.