kaos.policy.history
Class LoginSimulationAgent

java.lang.Object
  extended by kaos.core.csi.KAoSActorImpl
      extended by kaos.policy.history.LoginSimulationAgent
All Implemented Interfaces:
KAoSActor, KAoSObservable

public class LoginSimulationAgent
extends KAoSActorImpl
implements KAoSObservable

$Revision: 1.4 $


Field Summary
protected  KAoSServiceRoot _ksr
           
protected  MessageTransportService _mts
           
protected  java.lang.String _name
           
protected  java.util.Vector _observers
           
protected  java.util.Random _random
           
protected  java.util.HashMap _updateCond
           
 
Fields inherited from class kaos.core.csi.KAoSActorImpl
_autoCommit, _lctr, _propertiesToModify, _registered, _registration, _transports, _transportSupport
 
Constructor Summary
LoginSimulationAgent(java.lang.String guid, java.lang.String name, java.util.Vector domainNames, Transport transport)
           
 
Method Summary
 void deregisterObserver(java.lang.String updateType, java.lang.Object updateCondition, KAoSObserver observer)
          Deregister the given KAoSObserver for the given update type from the registry of observers associated with this KAoSObservable.
 void generateVals()
          This method generates an AID for a certain action result, with its status parameter randomly chosen as either failed or succeeded.
 java.util.List getHumanActors()
           
static void main(java.lang.String[] args)
           
 void notify(java.lang.String updateType, java.lang.Object updateCondition, java.lang.Object update)
          Notify observers interested in the given updateType wiht the given update object.
 void receiveMessage(TransportMessage tmsg)
          Implements the receiveMessage method mandated by the MessageListener interface.
 void registerObserver(java.lang.String updateType, java.lang.Object updateCondition, KAoSObserver observer)
          Register the given KAoSObserver with this KAoSObservable for updates described by the updateType and updateConstraints.
 
Methods inherited from class kaos.core.csi.KAoSActorImpl
addCapability, addOntologicalType, addProperty, addPropertyValue, addTransport, commitPropertyValues, equals, getAgentDescription, getCapabilities, getConceptMappingName, getDomainNames, getEntityOntologicalTypeNames, getEntityOntologicalTypes, getGUID, getName, getProperties, getProperty, getPropertyValue, getTransport, getTransports, hashCode, isAutoPropertyValueCommit, isGuarded, isRegistered, logMessage, logMessage, printTransportMessage, receiveMessage, removeCapability, removeOntologicalType, removeProperty, removePropertyValue, removeTransport, sendMessage, setAutoPropertyValueCommit, setCapabilities, setConceptMappingName, setGUID, setName, setOntologicalTypes, setProperties, setPropertyValue, setRegistered
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_observers

protected java.util.Vector _observers

_ksr

protected KAoSServiceRoot _ksr

_mts

protected MessageTransportService _mts

_name

protected java.lang.String _name

_random

protected java.util.Random _random

_updateCond

protected java.util.HashMap _updateCond
Constructor Detail

LoginSimulationAgent

public LoginSimulationAgent(java.lang.String guid,
                            java.lang.String name,
                            java.util.Vector domainNames,
                            Transport transport)
                     throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

receiveMessage

public void receiveMessage(TransportMessage tmsg)
Description copied from class: KAoSActorImpl
Implements the receiveMessage method mandated by the MessageListener interface. This method prints the incoming TransportMessage to System.out.

Overrides:
receiveMessage in class KAoSActorImpl
See Also:
MessageListener, TransportMessage, "JAS Specification, Section(s) 3.4.2, 4.7.2"

getHumanActors

public java.util.List getHumanActors()
                              throws NoSuchActorException
Throws:
NoSuchActorException

registerObserver

public void registerObserver(java.lang.String updateType,
                             java.lang.Object updateCondition,
                             KAoSObserver observer)
Register the given KAoSObserver with this KAoSObservable for updates described by the updateType and updateConstraints.

Specified by:
registerObserver in interface KAoSObservable
Parameters:
updateType - String indicating type of update the KAoSObserver is interested in.
updateCondition - Object describing the conditions under which to send the update. For now this object is ignored.
observer - KAoSObserver registering with for updates.

deregisterObserver

public void deregisterObserver(java.lang.String updateType,
                               java.lang.Object updateCondition,
                               KAoSObserver observer)
Deregister the given KAoSObserver for the given update type from the registry of observers associated with this KAoSObservable.

Specified by:
deregisterObserver in interface KAoSObservable
Parameters:
updateType - String indicating type of update the KAoSObserver is no longer interested in.
updateCondition - Object describing the conditions under which to send the update. For now this object is ignored.
observer - KAoSObserver deregistering.

notify

public void notify(java.lang.String updateType,
                   java.lang.Object updateCondition,
                   java.lang.Object update)
Notify observers interested in the given updateType wiht the given update object.

Specified by:
notify in interface KAoSObservable
Parameters:
updateType - String describing the type of update to perform.
updateCondition - Object describing the conditions under which to send the update. For now this object is ignored.
update - Object containing the update.

generateVals

public void generateVals()
This method generates an AID for a certain action result, with its status parameter randomly chosen as either failed or succeeded.

Parameters:
none. -

main

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