public class CASAProcess extends Agent
TERM | INITIALIZATION | GETTER | SETTER |
---|---|---|---|
strategy | from env var "CASAStrategy" or default "sc3" |
getStrategy() |
setStrategy(String) |
Modifier and Type | Class and Description |
---|---|
static class |
CASAProcess.ProcessInfo |
TransientAgent.Conversations, TransientAgent.NewAgentLispCommand
AbstractProcess.Subthread
Thread.State, Thread.UncaughtExceptionHandler
Modifier and Type | Field and Description |
---|---|
(package private) static CASAProcess |
instance |
protected static ProcessWindow |
lacWindow |
(package private) String |
strategy |
agentConstructorComplete, properties
cacheKB, CDInvitedTo, CDinvitee, conversationData, defaultOntologyClassName, DEFER_ACTION, DROP_ACTION, kBase, lisp, lispEnvironment, ListOfArgs, methodMap, ontologyEngine, ontologyEngineCreateMethod, ontologyEngineLoadMethod, policies, policiesAlwaysApply, policiesLastResort, primaryUI, proxy, UIs, usingProxy
eventQueue, exitWaitCounter, heartbeat, huntForPort, initParams, ontology, ontologyShared, options, securityFilter, trace, TRACE_MONITOR, TRACE_OFF, TRACE_ON, TRACE_TO_FILE, TRACE_UNDEFINED, transformations, uniqueThreadName, waitingForAgentToStart, waitingForEvent, waitingForSocketServerToStart
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Modifier | Constructor and Description |
---|---|
private |
CASAProcess() |
|
CASAProcess(ParamsMap params,
AgentUI ui) |
Modifier and Type | Method and Description |
---|---|
private static void |
createDirectories(String filePath)
Creates the directory filePath and all sub directories needed.
|
void |
exit()
Tells the process to exit.
|
protected void |
exit2(CASAProcess agent) |
String |
getDefaultBanner()
Adds "CASA: " in front of
TransientAgent.getDefaultBanner() 's banner. |
static CASAProcess |
getInstance() |
private static ParamsMap |
getParamsMap() |
ProcessOptions |
getProcessOptions() |
static String |
getRootDirectoryDefault()
Finds an appropriate root directory (given that we aren't otherwise told)
by looking for the preference "rootDirectory" or using ~/.casa/.
|
String |
getStrategy()
Returns the strategy that this agent uses to interpret messages.
|
Status |
informAgent_GUIOperationRequest(URLDescriptor receiverURL,
String content) |
protected void |
initializeThread(ParamsMap params,
AgentUI ui)
Subclasses may override this method to initialize before the message loop
is called, after the constructor is finished but before control is returned
to the thread that called the constructor.
|
boolean |
isObserveMessages() |
static void |
main(String[] args)
Deprecated.
Use
CASA.main(String[]) instead. |
AgentUI |
makeDefaultGUI(String[] args)
Returns a default AgentUI as a window.
|
void |
putUI(AgentUI ui)
A creating process should call this to let the agent know of any user
interface it has attached to the agent.
|
void |
setStrategy(String strategy) |
static String |
staticPath2file(String path)
Returns a complete file spec string corresponding to an agent path name (that is,
the agent list and agent name (eg.
|
static String |
staticUrl2file(URLDescriptor url)
Returns a complete file spec string corresponding to the URL.
|
destroyDataObject, finalize, getAgentOptions, getBooleanProperty, getCASAFilename, getCreateDate, getDataObject, getDataObjectInputStream, getDataObjectOutputStream, getDoubleProperty, getFloatProperty, getIntegerProperty, getLongProperty, getOptions, getStringProperty, hasProperty, initializeAfterRegistered, isPersistent, makeDefaultInternalFrame, makeOptions, pendingFinishRun, putDataObject, putDataObject, readPersistent, ready, realizeAgentBehaviourFromOptions, removeProperty, setBooleanProperty, setDoubleProperty, setFloatProperty, setIntegerProperty, setLongProperty, setOptions, setPersistent, setStringProperty, updateOptions, writePersistent
abclEval, abclEval, abclEval, accept_deleteCD, accept_exit, accept_forward_message, accept_LAC_closing, accept_new_MenuItem, accept_update, acceptDefault, addConversation, addJoinedCooperationDomain, addMembers, addSubscribeEvents, assembleDefault, assert_, assert_, authorizedByProxy, authorizeMessage, chooseSC, concludeDefault, consider_execute, consider_invite_to_cd, consider_new_MenuItem, consider_ping, consider_query_if, consider_query_ref, considerDefault, createCasaLispOperators, dispatchMsgHandlerMethod, doAddObserver, doAdvertise, doCDGetHistory_sync, doCDGetMembers, doCDPutData, doCDSubscribeMembership, doFindInstances_sync, doGetCooperationDomains, doGetOnology, doInviteToCD, doJoinCD, doPing_sync, doPing, doRegisterAgentInstance, doRegisterAgentInstance, doResolveURL, doSearchYP, doUnadvertise, doUnregisterAgentInstance, doUnregisterAgentType, doWithdrawCD, evaluateDefault, evesdrop, executeCommand, findFileResourcePath, findFileResourcePath, getAgentForThread, getAlwaysApplyPolicies, getBanner, getCachedKnowledgeBase, getChosenCommitment, getCommitmentProcessor, getConversation, getConversations, getConversationsReport, getDefFileSystemLocations, getEventForThread, getField, getInstancesFound, getJoinedCooperationDomain, getJoinedCooperationDomains, getKnowledgeBase, getLACURL, getLastResortPolicies, getMembers, getMsgForThread, getObjectsForThread, getOntology, getOntologyEngine, getOntologyFileSuffix, getPolicies, getPrimaryUI, getProxy, getSCStore, getSerializedOntology, getStrategyGUI, getSubscribeEvents, getSubscribeEvents, getTermsFromContent, getUI, getUIForThread, getUIs, getUnfulfilledSocialCommitments, getUnfulfilledSocialCommitments, handleErrorReplies, handleEvent, handleLACClosing, hasActiveCommitments, hasConversation, hasStrategyGUI, initializePolicies, initJADE, initUI, isEventQueueReady, isRegistered, isRegisteredWithLAC, isStoppable, isTrusted, isTrusted, isUsingProxy, kb_get_value, makeDefaultInterface, makeDefaultTextInterface, monitorDefault, notifySendingMessage, optionsToString, parseJADENode, pendingFinishRun_unregisterAgentInstance, pendingFinishRun_withdrawFromAllCDs, perform_execute, perform_FIPAStyle, perform_get_name, perform_get_ontology, perform_invite_to_cd, perform_method_call, perform_query_if, perform_query_if, perform_query_ref, perform_query_ref, performDefault, processCommitment, processCommitments, processObserverNotification, putExtendedOntology, putPolicy, putPolicyAlwaysApply, putPolicyLastResort, putReplacementOntology, query_ref, query_toString, query, queryIf, queryRef_toIntegerList, queryRef_toString, queryRef_toStringList, queryRef_toTermList, queryRef, queryRef, queryRefAIDs, queryRefURLs, querywithFilter, recursiveParent, recursivePermutations, release_execute, release_FIPAStyle, release_get_agents_registered, release_get_agents_running, release_get_members, release_get_ontology, release_join_cd, release_ping, release_query_if, release_query_ref, release_resolve_url, release_unregister_agentType, release_unregister_instance, release_withdraw_cd, releaseDefault, removeConversation, removeCooperationDomains, removeJoinedCooperationDomain, removeSubscribeEvents, requestInstances, resolveConnectException, retrieveReturnedData, saveReturnedData, searchOntology, searchOntology1, setBanner, setCommitmentProcessor, setField, setInstancesFound, setOntology, shouldDoExecuteRequest, template_handleNewOntologyInfo, update, updateConversationProtocolType, verifyCD, verifyDefault, verifyMessage
addObserver, addObserver, addObserver, addObserver, addTraceTags, addTransformation, bump, clearAllTraceTags, closePort, compareTo, countObservers, defer, defer, deleteObserver, deleteObserver, deleteObservers, dequeueEvent, equals, eventBufferLoopBody, eventBufferLoopPeriodic, eventQueuePeek, existed, finishRun, fixupMessage, getAgent, getAgentName, getEventQueue, getInitParams, getNewMessage, getNewMessage, getPort, getSocketServer, getTrace, getTraceTags, getTransformationFor, getUniqueRequestID, getURL, getUseAckProtocol, getUsePriority, hasChanged, hasOpenPort, in, initializeConstructor, initializeURL, isA, isA, isA, isA, isAAct, isAAct, isAgentThread, isAPerformative, isAPerformative, isExiting, isInitialized, isLoggingTag, isPaused, isThisMyAddress, isTracing, loadClass, makeSubthread, makeSubthread, makeTraceParam, notifyObservers, notifyObservers, notifyObserversWithNoArg, notifyObserversWithTop, out, println, println, println, println, println, queueEvent, queueEventIf, removeTraceTags, resetRuntimeOptionsFromCommandLine, resetSecurityPackage, resetTraceOptions, revTransform, revTransform, run, sendMessage_primitive, sendMessage, sendMessage, sendMessageAndWait, sendQueryAndWait, sendRequestAndWait, sendRequestAndWait, setAllTraceTags, setObserveMessages, setPause, setTraceTags, setTracing, setURL, setUseAckProtocol, setUsePriority, startSocketServer, startTraceMonitor, step, transform, transform, unhandledMessage
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
getClass, hashCode, notify, notifyAll, wait, wait, wait
doAdvertise, doCDGetHistory_sync, doCDGetMembers, doCDPutData, doFindInstances_sync, doGetCooperationDomains, doGetOnology, doInviteToCD, doJoinCD, doPing_sync, doPing, doRegisterAgentInstance, doRegisterAgentInstance, doSearchYP, doUnadvertise, doUnregisterAgentInstance, doUnregisterAgentType, doWithdrawCD, executeCommand, getInstancesFound, getJoinedCooperationDomains, getLACURL, getMembers, getOntology, getSerializedOntology, getStrategyGUI, hasStrategyGUI, isAAct, isInitialized, isRegistered, makeDefaultInterface, putExtendedOntology, putReplacementOntology, release_get_ontology, removeCooperationDomains, requestInstances
addObserver, addObserver, closePort, deleteObserver, deleteObserver, getAgentName, getName, getNewMessage, getPort, getTrace, getUniqueRequestID, getURL, getUseAckProtocol, hasOpenPort, isA, isAPerformative, isExiting, isLoggingTag, isStoppable, isTracing, println, println, println, sendMessage, setTracing, setUseAckProtocol, startTraceMonitor
addObserver, addObserver, countObservers, deleteObservers, hasChanged, notifyObservers, notifyObservers, notifyObserversWithNoArg, notifyObserversWithTop
abclEval, abclEval, abclEval, addTransformation, bump, chooseSC, defer, dequeueEvent, dispatchMsgHandlerMethod, evesdrop, getKnowledgeBase, getName, getSCStore, getSubscribeEvents, getTransformationFor, getUniqueRequestID, getURL, getUseAckProtocol, isA, isA, isA, isA, isAPerformative, isAPerformative, isLoggingTag, notifyObservers, println, println, println, queueEvent, queueEventIf, revTransform, revTransform, sendMessage, transform, transform
static CASAProcess instance
String strategy
protected static ProcessWindow lacWindow
public static void main(String[] args)
CASA.main(String[])
instead.args
- private static ParamsMap getParamsMap()
protected void initializeThread(ParamsMap params, AgentUI ui)
TransientAgent
TransientAgent.initializeProxy(ParamsMap, AgentUI)
TransientAgent.initializePolicies(ParamsMap, AgentUI)
initializeThread
in class TransientAgent
public static CASAProcess getInstance()
private static void createDirectories(String filePath) throws IOException
IOException
- If one of the directories could not be created.public static String getRootDirectoryDefault()
CASA.getPreference(String, String, int)
,
createDirectories(String)
public static String staticUrl2file(URLDescriptor url)
url
- to compute the file spec frompublic static String staticPath2file(String path)
path
- path to compute the file spec frompublic String getStrategy()
AbstractProcess
getStrategy
in interface ProcessInterface
getStrategy
in class TransientAgent
public void setStrategy(String strategy)
public AgentUI makeDefaultGUI(String[] args)
TransientAgent
makeDefaultGUI
in class Agent
args
- The command line argumentspublic void putUI(AgentUI ui)
TransientAgent
TransientAgent.primaryUI
, and call
notifyObservers(ML.EVENT_BANNER_CHANGED,getBanner())
since the interface
could work via the Observer interface and various set*()
and get*() calls on the agent.putUI
in interface TransientAgentInterface
putUI
in class TransientAgent
ui
- the user interface to be attached to the agent.public ProcessOptions getProcessOptions()
public void exit()
AbstractProcess
AbstractProcess.isStoppable()
is true before
it can actually exit (terminate AbstractProcess.eventBufferLoop()
). In the event this
method is called more than once, it will only call AbstractProcess.pendingFinishRun()
the first time.exit
in interface ProcessInterface
exit
in class AbstractProcess
protected void exit2(CASAProcess agent)
public String getDefaultBanner()
TransientAgent.getDefaultBanner()
's banner.getDefaultBanner
in class TransientAgent
TransientAgent.getDefaultBanner()
public Status informAgent_GUIOperationRequest(URLDescriptor receiverURL, String content)
receiverURL
- content
- public boolean isObserveMessages()
isObserveMessages
in class AbstractProcess