kaos.core.service.boot
Class KAoSAgent

java.lang.Object
  extended by kaos.core.service.boot.KAoSAgent
All Implemented Interfaces:
KAoSAgentHelper
Direct Known Subclasses:
CommSpeedTestReceiver, Kaa, KAoSAgentMsgForwarder, KAoSUsecase10New, TestClassifier, TestIntelDocAccess, TestRobot

public class KAoSAgent
extends java.lang.Object
implements KAoSAgentHelper

$Revision: 1.12 $


Field Summary
protected  KAoSAgentDescription _agentDescription
           
protected  AgentDirectoryService _agentDirectoryService
           
protected  AgentNamingService _agentNamingService
           
protected  java.lang.String _agentNickname
           
protected  Locator _lctr
           
protected  Logger _logger
           
protected  MessageTransportService _messageTransportService
           
protected  AgentName _name
           
protected  KAoSServiceRoot _serviceRoot
           
 
Constructor Summary
KAoSAgent()
           
 
Method Summary
 AgentDirectoryService acquireAgentDirectoryService()
           
 AgentName acquireAgentName(boolean useNicknameAsGuid)
           
 AgentNamingService acquireAgentNamingService()
           
 MessageTransportService acquireMessageTransportService()
           
protected  void assertFalse(boolean exp, java.lang.String msg)
           
protected  void assertTrue(boolean exp, java.lang.String msg)
           
 Locator bindToMessageTransportService(JasBean env)
           
 TransportMessage createTransportMessage()
           
 boolean equals(java.lang.Object obj)
           
protected  KAoSAgentDescription establishAgentDescription(java.util.Vector<java.lang.String> domainNames)
           
 KAoSAgentDescription findAgentDescriptionForID(java.lang.String agentID)
           
 KAoSAgentDescription findAgentDescriptionForNickname(java.lang.String nickname)
           
 java.lang.String getAgentID()
           
 KAoSAgentDescription getKAoSAgentDescription()
           
 int hashCode()
           
 void initialize(KAoSServiceRoot sr, JasBean agentInitInfo, java.util.Vector<java.lang.String> domainNames, java.lang.String nickname, boolean guarded, boolean useNicknameAsGuid)
           
protected  void logMessage(java.lang.String msg, java.lang.Exception e, int logLevel)
           
protected  void logMessage(java.lang.String msg, int logLevel)
           
static void main(java.lang.String[] args)
           
protected  void printTransportMessage(TransportMessage tmsg)
           
 void receiveMessage(TransportMessage tmsg)
           
 void sendMessage(TransportMessage message)
           
protected  boolean verifyRegistration()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_name

protected AgentName _name

_lctr

protected Locator _lctr

_agentNamingService

protected AgentNamingService _agentNamingService

_agentDirectoryService

protected AgentDirectoryService _agentDirectoryService

_messageTransportService

protected MessageTransportService _messageTransportService

_serviceRoot

protected KAoSServiceRoot _serviceRoot

_agentNickname

protected java.lang.String _agentNickname

_agentDescription

protected KAoSAgentDescription _agentDescription

_logger

protected Logger _logger
Constructor Detail

KAoSAgent

public KAoSAgent()
Method Detail

receiveMessage

public void receiveMessage(TransportMessage tmsg)

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

acquireAgentNamingService

public AgentNamingService acquireAgentNamingService()
                                             throws java.lang.Exception
Throws:
java.lang.Exception

acquireAgentDirectoryService

public AgentDirectoryService acquireAgentDirectoryService()
                                                   throws java.lang.Exception
Throws:
java.lang.Exception

acquireMessageTransportService

public MessageTransportService acquireMessageTransportService()
                                                       throws java.lang.Exception
Throws:
java.lang.Exception

bindToMessageTransportService

public Locator bindToMessageTransportService(JasBean env)
                                      throws java.lang.Exception
Throws:
java.lang.Exception

acquireAgentName

public AgentName acquireAgentName(boolean useNicknameAsGuid)
                           throws java.lang.Exception
Throws:
java.lang.Exception

establishAgentDescription

protected KAoSAgentDescription establishAgentDescription(java.util.Vector<java.lang.String> domainNames)

initialize

public void initialize(KAoSServiceRoot sr,
                       JasBean agentInitInfo,
                       java.util.Vector<java.lang.String> domainNames,
                       java.lang.String nickname,
                       boolean guarded,
                       boolean useNicknameAsGuid)
                throws java.lang.Exception
Throws:
java.lang.Exception

createTransportMessage

public TransportMessage createTransportMessage()
Specified by:
createTransportMessage in interface KAoSAgentHelper

getAgentID

public java.lang.String getAgentID()
Specified by:
getAgentID in interface KAoSAgentHelper

findAgentDescriptionForNickname

public KAoSAgentDescription findAgentDescriptionForNickname(java.lang.String nickname)
Specified by:
findAgentDescriptionForNickname in interface KAoSAgentHelper

findAgentDescriptionForID

public KAoSAgentDescription findAgentDescriptionForID(java.lang.String agentID)
Specified by:
findAgentDescriptionForID in interface KAoSAgentHelper

getKAoSAgentDescription

public KAoSAgentDescription getKAoSAgentDescription()
Specified by:
getKAoSAgentDescription in interface KAoSAgentHelper

sendMessage

public void sendMessage(TransportMessage message)
                 throws NotLocatableException,
                        TransportFailure
Specified by:
sendMessage in interface KAoSAgentHelper
Throws:
NotLocatableException
TransportFailure

assertTrue

protected void assertTrue(boolean exp,
                          java.lang.String msg)
                   throws java.lang.Exception
Throws:
java.lang.Exception

assertFalse

protected void assertFalse(boolean exp,
                           java.lang.String msg)
                    throws java.lang.Exception
Throws:
java.lang.Exception

verifyRegistration

protected boolean verifyRegistration()

printTransportMessage

protected void printTransportMessage(TransportMessage tmsg)

logMessage

protected void logMessage(java.lang.String msg,
                          int logLevel)

logMessage

protected void logMessage(java.lang.String msg,
                          java.lang.Exception e,
                          int logLevel)

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception