View Javadoc

1   /*
2   * The contents of this file are subject to the BT "ZEUS" Open Source 
3   * Licence (L77741), Version 1.0 (the "Licence"); you may not use this file 
4   * except in compliance with the Licence. You may obtain a copy of the Licence
5   * from $ZEUS_INSTALL/licence.html or alternatively from
6   * http://www.labs.bt.com/projects/agents/zeus/licence.htm
7   * 
8   * Except as stated in Clause 7 of the Licence, software distributed under the
9   * Licence is distributed WITHOUT WARRANTY OF ANY KIND, either express or 
10  * implied. See the Licence for the specific language governing rights and 
11  * limitations under the Licence.
12  * 
13  * The Original Code is within the package zeus.*.
14  * The Initial Developer of the Original Code is British Telecommunications
15  * public limited company, whose registered office is at 81 Newgate Street, 
16  * London, EC1A 7AJ, England. Portions created by British Telecommunications 
17  * public limited company are Copyright 1996-9. All Rights Reserved.
18  * 
19  * THIS NOTICE MUST BE INCLUDED ON ANY COPY OF THIS FILE
20  */
21  
22  package zeus.actors.intrays;
23  import javax.rmi.*;
24  import java.rmi.*;
25  import zeus.util.*;
26  import fipa97._FIPA_Agent_97ImplBase;
27  /***
28      {@author Simon Thompson} FIPA_message is a concreat implementation of the 
29      FIPA_Agent_97 interface that is designed to talk to zeus.actors.fipa.FIPA_Server.
30      It runs in its own thread, when it recieves a message it calls the server and
31      puts that message on a Queue. The server then dequeues the messages and deals with them 
32      as it sees fit.
33      */
34  public class FIPA_message extends _FIPA_Agent_97ImplBase implements Runnable 
35  
36  {
37   
38      protected Queue queue;         
39       
40      public void run () { 
41   /*       while (true) { 
42              Thread.yield(); 
43          }*/
44          }
45  
46       
47      public void register(Queue q)  { 
48          this.queue = q;
49      }
50          
51           
52          
53  	public void message( String acl_message ) {
54  	    queue.enqueue(acl_message);
55  	}
56  	
57  	
58  
59  	public FIPA_message () throws RemoteException {
60  	}
61  }