Main Page | Packages | Class Hierarchy | Class List | Directories | File List | Class Members

agents.mobileproxy.mobileproxyagent.MobileProxyAgent Class Reference

List of all members.

Public Member Functions

void addThreadedBehaviour (Behaviour b)
synchronized void sendRequest (ContentElement content)
synchronized Object sendRequest (Behaviour behaviour, ContentElement content)
boolean sendResponse (Socket client, SocketMessage sm)
synchronized void log (String str, Color color)
AsctR getAsctR ()
synchronized void addRemoteExecution (String appMainRequestId, String deviceId, String appName, Integer numberCopies)
synchronized String getAppName (String appId)
synchronized String getAppDevice (String appId)
synchronized void removeRemoteExecution (String appMainRequestId)
void acceptedExecutionRequest (OfferSpecs offSpecs)
void refusedExecutionRequest (AsctRequestId asctRequestId)
void appFinished (AsctRequestId asctRequestId)
void addRegisteredApp (String arg0, String arg1, String arg2)

Static Public Attributes

static final int DEFAULT_PORT = 7000
static final String MOBILE_PROXY_AGENT_NAME = "mpa"

Protected Member Functions

void setup ()
void takeDown ()

Private Attributes

boolean debuggingMode = true
ThreadedBehaviourFactory tbf = new ThreadedBehaviourFactory()
AsctR asctR
HashMap remoteExecutions
HashMap executionNames
HashMap executionCopyNumbers
ContentManager manager = getContentManager()
Codec codec = new LEAPCodec()
Ontology ontology = MobileProxyOntology.getInstance()

Detailed Description

Responsible for receive mobile devices requests and, repass these requests to Grid, receive the answer from the Grid and then answer to mobile devices

Author:
Estevão Freitas


Member Function Documentation

void agents.mobileproxy.mobileproxyagent.MobileProxyAgent.acceptedExecutionRequest OfferSpecs  offSpecs  ) 
 

void agents.mobileproxy.mobileproxyagent.MobileProxyAgent.addRegisteredApp String  arg0,
String  arg1,
String  arg2
 

synchronized void agents.mobileproxy.mobileproxyagent.MobileProxyAgent.addRemoteExecution String  appMainRequestId,
String  deviceId,
String  appName,
Integer  numberCopies
 

(non-Javadoc) Associate the appMainRequestId of submmited applications with the device ID and with your appName, to send correctly the Grid responses later

Parameters:
appMainRequestId received from ASCTR "remoteExecution" call
deviceId mobile device ID that made "remoteExecution" request
appName application name

void agents.mobileproxy.mobileproxyagent.MobileProxyAgent.addThreadedBehaviour Behaviour  b  ) 
 

Create a diferente thread when adding behaviour to agent

Parameters:
b is the behaviour to add to agent

void agents.mobileproxy.mobileproxyagent.MobileProxyAgent.appFinished AsctRequestId  asctRequestId  ) 
 

synchronized String agents.mobileproxy.mobileproxyagent.MobileProxyAgent.getAppDevice String  appId  ) 
 

synchronized String agents.mobileproxy.mobileproxyagent.MobileProxyAgent.getAppName String  appId  ) 
 

AsctR agents.mobileproxy.mobileproxyagent.MobileProxyAgent.getAsctR  ) 
 

Get the instance of the ASCTR

Returns:
the ASCTR started from the MobileProxyAgent

synchronized void agents.mobileproxy.mobileproxyagent.MobileProxyAgent.log String  str,
Color  color
 

Prints in the MobileProxyControlCenter window the strings passed

Parameters:
str text to be printed
color text color

void agents.mobileproxy.mobileproxyagent.MobileProxyAgent.refusedExecutionRequest AsctRequestId  asctRequestId  ) 
 

synchronized void agents.mobileproxy.mobileproxyagent.MobileProxyAgent.removeRemoteExecution String  appMainRequestId  ) 
 

Remove the association made with addRemoteExecution

Parameters:
appMainRequestId is the assocation's key

synchronized Object agents.mobileproxy.mobileproxyagent.MobileProxyAgent.sendRequest Behaviour  behaviour,
ContentElement  content
 

Create the ACL message and send to DatabaseAgent

Parameters:
performative is the message performative
content is the message content

synchronized void agents.mobileproxy.mobileproxyagent.MobileProxyAgent.sendRequest ContentElement  content  ) 
 

Create the ACL message and send to DatabaseAgent

Parameters:
performative is the message performative
content is the message content

boolean agents.mobileproxy.mobileproxyagent.MobileProxyAgent.sendResponse Socket  client,
SocketMessage  sm
 

Send the response to mobile devices

Parameters:
client the socket that will be used to get the output stream and send the message
sm contents the response content
Returns:
true whenever the message was correctly sended, otherwise false

void agents.mobileproxy.mobileproxyagent.MobileProxyAgent.setup  )  [protected]
 

First method invoked by the mobile agent plataform on an agent when it is instantiated

Exceptions:
StaleProxyException 

void agents.mobileproxy.mobileproxyagent.MobileProxyAgent.takeDown  )  [protected]
 

Invoked before the agent's death


Member Data Documentation

AsctR agents.mobileproxy.mobileproxyagent.MobileProxyAgent.asctR [private]
 

Codec agents.mobileproxy.mobileproxyagent.MobileProxyAgent.codec = new LEAPCodec() [private]
 

boolean agents.mobileproxy.mobileproxyagent.MobileProxyAgent.debuggingMode = true [private]
 

final int agents.mobileproxy.mobileproxyagent.MobileProxyAgent.DEFAULT_PORT = 7000 [static]
 

Default MobileproxyAgent server socket port

HashMap agents.mobileproxy.mobileproxyagent.MobileProxyAgent.executionCopyNumbers [private]
 

HashMap agents.mobileproxy.mobileproxyagent.MobileProxyAgent.executionNames [private]
 

ContentManager agents.mobileproxy.mobileproxyagent.MobileProxyAgent.manager = getContentManager() [private]
 

final String agents.mobileproxy.mobileproxyagent.MobileProxyAgent.MOBILE_PROXY_AGENT_NAME = "mpa" [static]
 

MobileproxyAgent default name

Ontology agents.mobileproxy.mobileproxyagent.MobileProxyAgent.ontology = MobileProxyOntology.getInstance() [private]
 

HashMap agents.mobileproxy.mobileproxyagent.MobileProxyAgent.remoteExecutions [private]
 

ThreadedBehaviourFactory agents.mobileproxy.mobileproxyagent.MobileProxyAgent.tbf = new ThreadedBehaviourFactory() [private]
 


The documentation for this class was generated from the following file:
Generated on Fri Feb 17 09:37:54 2006 for MAG by  doxygen 1.4.4