ie.nuigalway.ecrg.jade.jmsagentgateway
Class JmsProxyAgent

java.lang.Object
  |
  +--jade.core.Agent
        |
        +--jade.gui.GuiAgent
              |
              +--ie.nuigalway.ecrg.jade.jmsagentgateway.JmsProxyAgent
All Implemented Interfaces:
java.lang.Runnable, jade.util.leap.Serializable, java.io.Serializable, jade.core.TimerListener

public class JmsProxyAgent
extends jade.gui.GuiAgent

The JmsProxyAgent act as a proxy to JMS providers allowing JADE agents to particapate in JMS interactions

Version:
0.5 12 January 2004
Author:
Edward Curry
See Also:
Serialized Form

Nested Class Summary
(package private)  class JmsProxyAgent.HandlePublishMessage
          Handler for publishing messages
(package private)  class JmsProxyAgent.ReceiveMessages
          Behaviour to listen for incoming messages
(package private)  class JmsProxyAgent.RegisterInDF
          Behaviour to registers the agent in the DF
 
Nested classes inherited from class jade.gui.GuiAgent
 
Nested classes inherited from class jade.core.Agent
 
Field Summary
private  java.lang.String agentOwner
           
private  java.lang.String agentType
           
private  jade.content.lang.Codec codec
           
private  JmsAgentGatewayGui gui
           
private  boolean guiEnabled
           
private  JmsGateway jmsP
           
private static org.apache.log4j.Category log
           
private  JmsSubscriptionManager manager
           
private  jade.content.onto.Ontology ontology
           
static int UNSUBSCRIBE_EVENT
          GUI Event code for unsubscription
 
Fields inherited from class jade.gui.GuiAgent
 
Fields inherited from class jade.core.Agent
AP_ACTIVE, AP_COPY, AP_DELETED, AP_IDLE, AP_INITIATED, AP_MAX, AP_MIN, AP_SUSPENDED, AP_TRANSIT, AP_WAITING, currentBehaviour, currentMessage, D_ACTIVE, D_MAX, D_MIN, D_RETIRED, D_SUSPENDED, D_UNKNOWN
 
Constructor Summary
JmsProxyAgent()
          Constructor for the SubscriptionAgent object
 
Method Summary
protected  void onGuiEvent(jade.gui.GuiEvent ev)
          Agent handler for GUI events
private  void replyDone(jade.lang.acl.ACLMessage msg)
          Method for handling done messages
private  void replyFailure(jade.lang.acl.ACLMessage msg)
          Method for handling failure messages
private  void replyNotUnderstood(jade.lang.acl.ACLMessage msg)
          Method for handling ReplyNotUnderstood messages
private  void setProperties()
          Sets the properties attribute of the JmsProxyAgent object
protected  void setup()
          Setup the Agent
 
Methods inherited from class jade.gui.GuiAgent
postGuiEvent
 
Methods inherited from class jade.core.Agent
addBehaviour, afterClone, afterMove, beforeClone, beforeMove, blockingReceive, blockingReceive, blockingReceive, blockingReceive, doActivate, doClone, doDelete, doMove, doStart, doSuspend, doTimeOut, doWait, doWait, doWake, extractPassword, extractUsername, getAgentState, getAID, getAMS, getArguments, getAuthority, getCertificateFolder, getContainerController, getContentManager, getCurQueueSize, getDefaultDF, getHap, getHelper, getLocalName, getName, getO2AObject, getPrincipal, getProperty, getQueueSize, getState, here, notifyChangeBehaviourState, notifyRestarted, postMessage, putBack, putO2AObject, read, read, receive, receive, removeBehaviour, restartLater, restore, run, send, setArguments, setEnabledO2ACommunication, setGenerateBehaviourEvents, setOwnership, setPrincipal, setQueueSize, takeDown, waitUntilStarted, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static org.apache.log4j.Category log

codec

private jade.content.lang.Codec codec

ontology

private jade.content.onto.Ontology ontology

jmsP

private JmsGateway jmsP

gui

private JmsAgentGatewayGui gui

manager

private JmsSubscriptionManager manager

guiEnabled

private boolean guiEnabled

agentType

private java.lang.String agentType

agentOwner

private java.lang.String agentOwner

UNSUBSCRIBE_EVENT

public static final int UNSUBSCRIBE_EVENT
GUI Event code for unsubscription

See Also:
Constant Field Values
Constructor Detail

JmsProxyAgent

public JmsProxyAgent()
Constructor for the SubscriptionAgent object

Method Detail

setup

protected void setup()
Setup the Agent

Overrides:
setup in class jade.core.Agent

replyNotUnderstood

private void replyNotUnderstood(jade.lang.acl.ACLMessage msg)
Method for handling ReplyNotUnderstood messages

Parameters:
msg - Message to sendreceived

replyFailure

private void replyFailure(jade.lang.acl.ACLMessage msg)
Method for handling failure messages

Parameters:
msg - Message to send

replyDone

private void replyDone(jade.lang.acl.ACLMessage msg)
Method for handling done messages

Parameters:
msg - Message to send

onGuiEvent

protected void onGuiEvent(jade.gui.GuiEvent ev)
Agent handler for GUI events

Specified by:
onGuiEvent in class jade.gui.GuiAgent
Parameters:
ev - Event from GUI

setProperties

private void setProperties()
Sets the properties attribute of the JmsProxyAgent object