This example will show Router functionality on the RouterLayer level - register, connect, message routing , message queuing, list agents, ANS , reserve message, disconnect and unregister.

There are two agents for you. Click 'Left' button and 'Right' button to start up two Router Client Agent Frame.



Steps

  1. Register to router :

    Go to 'Register' panel and fill in your own agent name and Password. AgentName and Password are case sensitive and there should be no white space. Click 'Register' button. Go to 'Request' panel and make sure that 'register success' message is received in the text area.

  2. Connect to router :

    In 'Request' panel, click 'Connect' button to connect to router. If connection is successful, you will see 'Connection established' message in the text area.

  3. Do the same step above(1 to 2) for AgentB. AgentName should be different from that of previous step.

  4. Send message :

    From Left agent, go to 'Compose' panel and fill in 'Receiver' as Right agent name you fill in step . Fill in content text area as KQML syntax string(unmatched parenthesis and double quotes will not be allowed). Click 'Send' button. Go to Right applet. If the message is received, double click from the list box(upper right conner) of the message and content will be shown in the bottom text area. Do the same step for Right agent. Go to Right agent's 'Compose' panel and set 'Receiver' as Left agent name. Fill in content field and click 'Send' button.

  5. List agents :

    Go to 'Request' panel and click 'List Agents' button. After received a response from router, select the received message and click 'Act' button at the bottom.

  6. ANS(Request address) :

    From Left agent, fill in AgentName in 'Request' panel as Right agent name and click 'Address' button. After received a response from router, double click the message in the list box to see address of Right agent.

  7. Reserve message :

    Select one or some of messages in the message list box. Go to 'Reserve' panel and click 'SetTime' button. Modify 'Minute' field as two or three more minutes from the current displayed minutes. Fill in address information for Left agent or Right agent(fill in MessageMethod as MessageRouter. Password information should be correct. If the receiver is Left agent, Left agent's password should be typed in). Click 'OK' button. After the minutes you have set, receiver agent will receive the reserved message.

  8. Disconnect :

    From Left agent, select all the messages from the message list box(at the right upper corner) and click delete button. Go to 'Request' panel and click 'Disconnect' button. AgentName and Password slot will be cleared.

  9. Message queuing :

    From Right agent, compose and send message to Left agent as in step 4. You can send several messages for testing purpose. Go to Left agent -> 'Request' panel. Type in Left agent's name and password. Click 'Connect' button. You will receive the messages from Right agent have sent and queued by router. Messages will not be lost even if an agent is not connected.

  10. Unregister :

    From Right agent, go to 'Register' panel. Click 'Unregister' button. This means that you will not use router service any more. Left agent will be automatically disconnected. Go to Right agent and do the same step as 6. You will notice that Left agent is not in the list.


©1996,1997 CDR,Stanford University. All Right Reserved.
Heecheol Jeon