ie.nuigalway.ecrg.jade.jmsagentgateway
Class JmsSubscriptionManager

java.lang.Object
  |
  +--ie.nuigalway.ecrg.jade.jmsagentgateway.JmsSubscriptionManager
All Implemented Interfaces:
jade.proto.SubscriptionResponder.SubscriptionManager

public class JmsSubscriptionManager
extends java.lang.Object
implements jade.proto.SubscriptionResponder.SubscriptionManager

Implementation of the Subscription Manager for the JMS Pub Sub Agent

Version:
0.5 12 January 2004
Author:
Edward Curry

Field Summary
private  jade.content.ContentManager cm
           
private  JmsAgentGatewayGui gui
           
private  java.util.HashMap listenerMap
           
private static org.apache.log4j.Category log
           
 
Constructor Summary
JmsSubscriptionManager()
          Constructor for the JmsSubscriptionManager object
 
Method Summary
 boolean deregister(jade.proto.SubscriptionResponder.Subscription sub)
          Deregister a subscription from the manager
 boolean register(jade.proto.SubscriptionResponder.Subscription sub)
          Register a new subscription request with the manager
 void setContentManager(jade.content.ContentManager cm)
          Sets the contentManager attribute of the JmsSubscriptionManager object
 void setGUI(JmsAgentGatewayGui gui)
          Sets the gUI attribute of the JmsSubscriptionManager object
 
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

listenerMap

private java.util.HashMap listenerMap

cm

private jade.content.ContentManager cm

gui

private JmsAgentGatewayGui gui
Constructor Detail

JmsSubscriptionManager

public JmsSubscriptionManager()
Constructor for the JmsSubscriptionManager object

Method Detail

setContentManager

public void setContentManager(jade.content.ContentManager cm)
Sets the contentManager attribute of the JmsSubscriptionManager object

Parameters:
cm - The new contentManager value

setGUI

public void setGUI(JmsAgentGatewayGui gui)
Sets the gUI attribute of the JmsSubscriptionManager object

Parameters:
gui - The new gUI value

register

public boolean register(jade.proto.SubscriptionResponder.Subscription sub)
                 throws jade.domain.FIPAAgentManagement.RefuseException,
                        jade.domain.FIPAAgentManagement.NotUnderstoodException
Register a new subscription request with the manager

Specified by:
register in interface jade.proto.SubscriptionResponder.SubscriptionManager
Parameters:
sub - Subscription information
Returns:
Result of registration
Throws:
jade.domain.FIPAAgentManagement.RefuseException - Refuse subscription
jade.domain.FIPAAgentManagement.NotUnderstoodException - Not understood

deregister

public boolean deregister(jade.proto.SubscriptionResponder.Subscription sub)
                   throws jade.domain.FIPAAgentManagement.FailureException
Deregister a subscription from the manager

Specified by:
deregister in interface jade.proto.SubscriptionResponder.SubscriptionManager
Parameters:
sub - Subscription to deregister
Returns:
Result of the deregistration
Throws:
jade.domain.FIPAAgentManagement.FailureException - Failure result