Package spade :: Module Unit :: Class Unit
[hide private]
[frames] | no frames]

Class Unit

source code


Nested Classes [hide private]
  TestRoomNameBehaviour
  CreateRoomBehaviour
  MyJoinRoomBehaviour
  SetGoalBehaviour
  GetGoalBehaviour
  GetInfoBehaviour
  GetMemberListBehaviour
  GetMaxAgentsBehaviour
  GetMinAgentsBehaviour
  SetMaxAgentsBehaviour
  SetMinAgentsBehaviour
  GetNumberOfAgentsBehaviour
  GetOwnerListBehaviour
  AddAdminBehaviour
  RemoveAdminBehaviour
  GetAdminListBehaviour
  AddOwnerBehaviour
  RemoveOwnerBehaviour
  AddModeratorBehaviour
  RemoveModeratorBehaviour
  GetModeratorListBehaviour
  DestroyBehaviour
  PresenceBehaviour
  KickAgentBehaviour
  AddBanAgentBehaviour
  RemoveBanAgentBehaviour
  GetBanAgentListBehaviour
  GiveVoiceBehaviour
  RevokeVoiceBehaviour
  SendMessageBehaviour
  SendPrivateMessageBehaviour
Instance Methods [hide private]
 
__init__(self, agent, nick, name, type='Team', goalList=[], agentList=[], contentLanguage='sl', password=None, create=True)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
setup(self) source code
 
myCreate(self) source code
 
myJoin(self) source code
 
testRoomName(self) source code
 
createRoom(self) source code
 
myJoinRoom(self) source code
 
checkGoal(self, goalList) source code
 
checkType(self) source code
 
testUnitName(self) source code
 
invite(self, agentList) source code
 
setGoal(self, goalList)
Updates organization goals
source code
 
getGoal(self)
Retruns a list of goals
source code
 
getInfo(self) source code
 
getMemberList(self)
Returns a List with Agents' names belonging to the organization
source code
 
getMaxAgents(self)
Returns Maximum agents allowed to enter inside the Organization
source code
 
getMinAgents(self)
Returns Minimum agents needed to allow conversations inside
source code
 
setMaxAgents(self, maxUsers)
Updates Maximum agents allowed to enter inside the Organization
source code
 
setMinAgents(self, minUsers)
Updates Minimum agents needed to allow conversations inside
source code
 
getNumberOfAgents(self)
Returns current number od agents that are inside
source code
 
getOwnerList(self) source code
 
addAdmin(self, newAdminJID) source code
 
removeAdmin(self, AdminJID) source code
 
getAdminList(self) source code
 
addOwner(self, newOwnerJID) source code
 
removeOwner(self, OwnerJID) source code
 
addModerator(self, newModeratorJID) source code
 
removeModerator(self, moderatorJID) source code
 
getModeratorList(self) source code
 
leave(self)
Agent leaves and it is removed from the member list
source code
 
destroy(self)
Unit owner destroys the unit
source code
 
kickAgent(self, agentNick) source code
 
addBanAgent(self, agentJID) source code
 
removeBanAgent(self, agentJID) source code
 
getBanAgentList(self) source code
 
giveVoice(self, nickname) source code
 
revokeVoice(self, nickname) source code
 
sendMessage(self, message) source code
 
sendPrivateMessage(self, recName, message) source code
 
setRegistrationForm(self, dataForm) source code
 
addUnit(self, unit)
Creates a new unit inside an organization
source code
 
checkTypes(self, orgType, unitType) source code
 
checkSupervisor(self, myAgentJID) source code
 
getSupervisorList(self) source code
 
run(self) source code
 
_process(self)
main loop must be overridden
source code

Inherited from Behaviour.OneShotBehaviour: done

Inherited from Behaviour.Behaviour: exitCode, getAgent, getParent, kill, managePresence, onEnd, onStart, registerPresenceHandler, root, setAgent, setParent, setTemplate

Inherited from MessageReceiver.MessageReceiver: postMessage

Inherited from MessageReceiver.MessageReceiver (private): _receive

Inherited from threading.Thread: __repr__, getName, isAlive, isDaemon, is_alive, join, setDaemon, setName, start

Inherited from threading.Thread (private): _reset_internal_locks, _set_daemon, _set_ident

Inherited from threading._Verbose (private): _note

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Instance Variables [hide private]

Inherited from Behaviour.Behaviour (private): _exitcode

Properties [hide private]

Inherited from threading.Thread: daemon, ident, name

Inherited from threading.Thread (private): _block

Inherited from object: __class__

Method Details [hide private]

__init__(self, agent, nick, name, type='Team', goalList=[], agentList=[], contentLanguage='sl', password=None, create=True)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

run(self)

source code 
Overrides: threading.Thread.run

_process(self)

source code 

main loop must be overridden

Overrides: Behaviour.Behaviour._process
(inherited documentation)