| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectkaos.core.example.KAoSUsecase1
public class KAoSUsecase1
$Revision: 1.2 $
| Field Summary | |
|---|---|
| protected  java.lang.String | _agentNickname | 
| protected  AgentDirectoryService | ads | 
| protected  AgentNamingService | ans | 
| protected static java.lang.String | CONVERSATION_FLAG | 
| protected  Locator | lctr | 
| protected static java.io.PrintStream | LOGGER | 
| protected  MessageTransportService | mts | 
| protected  AgentName | name | 
| protected  ServiceRoot | sr | 
| protected static java.lang.String[] | STATEMENT | 
| Constructor Summary | |
|---|---|
| protected  | KAoSUsecase1(ServiceRoot sr,
             java.lang.String nickname)Instantiates a new Usecase with the provided ServiceRoot. | 
| Method Summary | |
|---|---|
|  AgentDirectoryService | acquireAgentDirectoryService()Acquires the AgentDirectoryService from the ServiceRoot. | 
|  AgentName | acquireAgentName()Acquires a unique AgentName from the AgentNamingService. | 
|  AgentNamingService | acquireAgentNamingService()Acquires the AgentNamingService from the ServiceRoot. | 
|  MessageTransportService | acquireMessageTransportService()Acquires a MessageTransportService. | 
| protected  void | assertFalse(boolean exp,
            java.lang.String msg)Utility method: if exp is not false, then an Exception is generated using the provided message (msg) and then thrown. | 
| protected  void | assertTrue(boolean exp,
           java.lang.String msg)Utility method: if exp is not true, then an Exception is generated using the provided message (msg) and then thrown. | 
|  Locator | bindToMessageTransportService()Returns a new local locator that has been bound with the MessageTransportService. | 
|  boolean | equals(java.lang.Object obj)Two use-cases are equal if their respective hash codes are equal. | 
|  AgentDescription | getAgentDescription()Creates a new AgentDescription for this Usecase. | 
|  int | hashCode()Determines the hash code for the use-case. | 
| protected  void | initialize()Initialize the Usecase (i.e. | 
| static void | main(java.lang.String[] args) | 
|  void | receiveMessage(TransportMessage tmsg)Implements the receiveMessage method mandated by the MessageListener interface. | 
| protected  boolean | verifyRegistration()Utility method that verifies agent registration by searching the AgentDirectoryService for its AgentDescription. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
protected ServiceRoot sr
protected AgentName name
protected Locator lctr
protected AgentNamingService ans
protected AgentDirectoryService ads
protected MessageTransportService mts
protected static final java.io.PrintStream LOGGER
protected static final java.lang.String CONVERSATION_FLAG
protected static final java.lang.String[] STATEMENT
protected java.lang.String _agentNickname
| Constructor Detail | 
|---|
protected KAoSUsecase1(ServiceRoot sr,
                       java.lang.String nickname)
sr - the instantiating ServiceRoot (a reference is kept).ServiceRoot, 
"JAS Specification, Section(s) 2.2.2.1, 3.3"| Method Detail | 
|---|
public void receiveMessage(TransportMessage tmsg)
MessageListener, 
TransportMessage, 
"JAS Specification, Section(s) 3.4.2, 4.7.2"public boolean equals(java.lang.Object obj)
equals in class java.lang.ObjecthashCode(), 
"JAS Specification, Section(s) 4.7.2"public int hashCode()
super.hashCode()
 .
hashCode in class java.lang.ObjectAgentName#hashCode, 
Object.hashCode(), 
"JAS Specification, Section(s) 4.7.2"
public AgentNamingService acquireAgentNamingService()
                                             throws java.lang.Exception
java.lang.Exception - if the AgentNamingService is not null.ServiceRoot#getAgentNamingService, 
"JAS Specification, Section(s) 2.2.2.2, 4.6.1"
public AgentDirectoryService acquireAgentDirectoryService()
                                                   throws java.lang.Exception
java.lang.Exception - if the AgentDirectoryService is not null.ServiceRoot#getAgentDirectoryService, 
"JAS Specification, Section(s) 2.2.2.5, 4.5.1"
public MessageTransportService acquireMessageTransportService()
                                                       throws java.lang.Exception
java.lang.Exception - if the MessageTransportService is not null.ServiceRoot#getTransportSystem, 
TransportSystem#getMessageTransportServices, 
"JAS Specification, Section(s) 2.2.2.3, 4.7.5, 4.7.6"
public Locator bindToMessageTransportService()
                                      throws java.lang.Exception
java.lang.ExceptionMessageTransportService#newLocalLocator, 
Locator, 
MessageTransportService#newMessageReceiver, 
MessageReceiver, 
MessageListener, 
MessageReceiver#addMessageListener(MessageListener), 
MessageReceiver#bindToLocalLocator(Locator), 
"JAS Specification, Section(s) 2.2.2.4, 2.2.2.7, 4.7.3"
public AgentName acquireAgentName()
                           throws java.lang.Exception
java.lang.ExceptionAgentName, 
AgentNamingService#createAgentName, 
"JAS Specification, Section(s) 2.2.2.2, 4.6.1"public AgentDescription getAgentDescription()
AgentDescription, 
AgentDirectoryService#createAgentDescription, 
"JAS Specification, Section(s) 2.2.2.6, 4.5.1"
protected void assertTrue(boolean exp,
                          java.lang.String msg)
                   throws java.lang.Exception
java.lang.Exception - if exp is false.
protected void assertFalse(boolean exp,
                           java.lang.String msg)
                    throws java.lang.Exception
java.lang.Exception - if exp is true.protected boolean verifyRegistration()
protected void initialize()
                   throws java.lang.Exception
java.lang.ExceptionacquireAgentNamingService(), 
acquireAgentName(), 
acquireMessageTransportService(), 
bindToMessageTransportService(), 
acquireAgentDirectoryService(), 
acquireAgentDirectoryService(), 
getAgentDescription(), 
AgentDirectoryService#register(AgentDescription), 
"JAS Specification, Section(s) 2.2.2.1 through 2.2.2.7"
public static void main(java.lang.String[] args)
                 throws java.lang.Exception
java.lang.Exception| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||