[EMAIL PROTECTED] wrote:
*** I am using the "agent" routing key.
The spec states that the routing key must be agent.<bank#>. When sending requests to the broker itself, a key of "agent.0" should work correctly.


In addition, I dont know how to send arguments in the method request (AM1M)... So I take an example of a method request for a method which has arguments such as "echo" method of "broker" class so I assume we send the method request something like this..

PLEASE correct me if this is the wrong way???


SAMPLE CODE BEGINS
----------
....
....

case: 5
        mgtclient.opcode="AM1M";
        mgtclient.sequenceNo=999;
        mgtclient.methodName="echo";
        // int wht we receive in the schema
        mgtclient.argSequence=123;
        // string wht we receive in the schema
        mgtclient.argBody = "anything";

        try {
        message.put(mgtclient.opcode.getBytes("UTF-8"));
       message.putInt(mgtclient.sequenceNo);
        message.putLong(mgtclient.objectID);
        encoder.writeStr8(mgtclient.methodName);
        // passing arguments
        encoder.writeUnit32(mgtclient.argSequence);
        encoder.writeStr8(mgtclient.argBody);

  } catch (UnsupportedEncodingException e) {
        e.printStackTrace();
        }

------

SAMPLE CODE ENDS

I am not sure we send the method request with the arguments like this. Please advice ???
Your encoding of the arguments is correct.


One more Question, how to map the setAttribute() method to the method request so that when the remore management application make change in the attributes then the changes get reflected inside the BROKER?
There will be an implied "set" method implemented for objects that have writable properties. This is not currently implemented in the code.



Thanks in advance.

BR,
Rahul
-Ted

Reply via email to