|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ie.nuigalway.ecrg.jade.jmsagentgateway.JmsListener
Listener for destinations in the subscription manager
Field Summary | |
private jade.content.ContentManager |
cm
|
private jade.content.lang.Codec |
codec
|
private javax.jms.Connection |
conn
|
private JmsAgentGatewayGui |
gui
|
private Subscription |
jmsSub
|
private static org.apache.log4j.Category |
log
|
private jade.content.onto.Ontology |
ontology
|
private ProviderInfo |
proInfo
|
private javax.jms.Session |
session
|
private jade.proto.SubscriptionResponder.Subscription |
sub
|
private SubscriptionModel |
subModel
|
Constructor Summary | |
JmsListener(jade.proto.SubscriptionResponder.Subscription sub,
jade.content.ContentManager cm,
JmsAgentGatewayGui gui,
SubscriptionModel subModel)
Constructor for the JmsListener object |
Method Summary | |
SubscriptionModel |
getSubscriptionModel()
Gets the subscriptionModel attribute of the JmsListener object |
private void |
incMsgCounter()
Increment message counter tracking the number of messages sent to this subscription |
void |
onException(javax.jms.JMSException jmse)
Method is executed when an execption is thrown by the JMS Provider Attempts to reconnect to the provider |
void |
onMessage(javax.jms.Message msg)
Method is executed when a message is receivd from the agents queue |
private void |
setupConnection()
Method is executed in order to create a connection to a JMS server and listen to the specified destination |
void |
stop()
Method is executed to disconnect from a JMS server |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static org.apache.log4j.Category log
private javax.jms.Connection conn
private javax.jms.Session session
private jade.proto.SubscriptionResponder.Subscription sub
private jade.content.ContentManager cm
private jade.content.lang.Codec codec
private jade.content.onto.Ontology ontology
private Subscription jmsSub
private ProviderInfo proInfo
private JmsAgentGatewayGui gui
private SubscriptionModel subModel
Constructor Detail |
public JmsListener(jade.proto.SubscriptionResponder.Subscription sub, jade.content.ContentManager cm, JmsAgentGatewayGui gui, SubscriptionModel subModel) throws java.lang.Exception
sub
- Subscription for listenercm
- Content manager for message ontologiesgui
- GUI associated with the agentsubModel
- GUI Model of this subscription
java.lang.Exception
- Error during listener startupMethod Detail |
private void setupConnection() throws java.lang.Exception
java.lang.Exception
- Description of the Exceptionpublic void onMessage(javax.jms.Message msg)
onMessage
in interface javax.jms.MessageListener
msg
- JMS Message receivedpublic void onException(javax.jms.JMSException jmse)
onException
in interface javax.jms.ExceptionListener
jmse
- JMS Exception thrownpublic void stop() throws java.lang.Exception
java.lang.Exception
- Error in closeing JMS Connectionprivate void incMsgCounter()
public SubscriptionModel getSubscriptionModel()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |