es.upv.dsic.gti_ia.core
Class BridgeAgentInOut

java.lang.Object
  extended by es.upv.dsic.gti_ia.core.BaseAgent
      extended by es.upv.dsic.gti_ia.core.BridgeAgentInOut
All Implemented Interfaces:
Runnable

public class BridgeAgentInOut
extends BaseAgent

This agent routes messages from inside the platform to outside the platform.

Author:
Sergio Pajares

Field Summary
 ACLMessage ACLsms
           
 
Fields inherited from class es.upv.dsic.gti_ia.core.BaseAgent
logger, session, traceSession
 
Constructor Summary
BridgeAgentInOut(AgentID aid)
          Creates the agent.
 
Method Summary
 void execute()
          Waits new package, and redirects packets to another platform
 void finalize()
          The trace system is notified when the agent is about to disappear, in this method.
 void onMessage(ACLMessage msg)
          Function that will be executed when the agent gets a message The user has to write his/her code here
 
Methods inherited from class es.upv.dsic.gti_ia.core.BaseAgent
activateTraceService, changeIdentity, deactivateTraceService, getAid, getName, init, onTraceEvent, run, send, sendTraceEvent, start, terminate
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACLsms

public ACLMessage ACLsms
Constructor Detail

BridgeAgentInOut

public BridgeAgentInOut(AgentID aid)
                 throws Exception
Creates the agent.

Parameters:
aid - The ID
Throws:
Exception - if the AID is already in use.
See Also:
BaseAgent.BaseAgent(AgentID)
Method Detail

execute

public void execute()
Waits new package, and redirects packets to another platform

Overrides:
execute in class BaseAgent

onMessage

public void onMessage(ACLMessage msg)
Description copied from class: BaseAgent
Function that will be executed when the agent gets a message The user has to write his/her code here

Overrides:
onMessage in class BaseAgent
Parameters:
msg - Message received

finalize

public void finalize()
Description copied from class: BaseAgent
The trace system is notified when the agent is about to disappear, in this method.

Overrides:
finalize in class BaseAgent


Copyright © 2012 GTI-IA. All Rights Reserved.