org.sharengo.wikitty.jms
Class WikittyExtensionSubscriberJMS
java.lang.Object
org.sharengo.wikitty.jms.WikittyExtensionSubscriberJMS
- All Implemented Interfaces:
- javax.jms.MessageListener
public class WikittyExtensionSubscriberJMS
- extends Object
- implements javax.jms.MessageListener
WikittyExtensionSubscriberJMS.
- Since:
- 11 févr. 2010 17:58:34
- Version:
- $Revision: 1 $ $Date: 2010-04-16 10:29:38 +0200 (ven., 16 avril 2010) $
- Author:
- $Author: echatellier $
connectionFactory
protected final javax.jms.TopicConnectionFactory connectionFactory
topicConnection
protected final javax.jms.TopicConnection topicConnection
topic
protected final javax.jms.Topic topic
topicSession
protected final javax.jms.TopicSession topicSession
topicSubscriber
protected final javax.jms.TopicSubscriber topicSubscriber
delegateExtensionStorage
protected final WikittyExtensionStorage delegateExtensionStorage
WikittyExtensionSubscriberJMS
public WikittyExtensionSubscriberJMS(WikittyExtensionStorage delegateExtensionStorage,
Properties properties)
throws NamingException,
javax.jms.JMSException
- Creates a durable subscriber on a topic named
WikittyExtensionStorageTopic.
All received messages are dispatched to the specified delegateExtensionStorage.
- Parameters:
delegateExtensionStorage - an instance of WikittyExtensionStorageproperties - properties passed to InitialContext,
it must contains at least a value for the Context.PROVIDER_URL
- Throws:
NamingException
javax.jms.JMSException
start
public void start()
throws Exception
- Throws:
Exception
stop
public void stop()
throws Exception
- Throws:
Exception
close
public void close()
throws javax.jms.JMSException
- Throws:
javax.jms.JMSException
finalize
protected void finalize()
throws Throwable
- Overrides:
finalize in class Object
- Throws:
Throwable
onMessage
public void onMessage(javax.jms.Message message)
- Forwards the message to the
delegateExtensionStorage according
to its type (TextMessage or ObjectMessage) and its client properties.
More precisely, the action client property determines the
delegateExtensionStorage's method which will be invoked.
- Specified by:
onMessage in interface javax.jms.MessageListener
- Parameters:
message - the incoming message
onActionMessage
protected void onActionMessage(WikittyTransaction transaction,
WikittyActionMessage message)
actionStore
protected void actionStore(WikittyTransaction transaction,
WikittyActionMessage message)
throws javax.jms.JMSException
- Throws:
javax.jms.JMSException
actionClear
protected void actionClear(WikittyTransaction transaction,
WikittyActionMessage message)
Copyright © 2010 CodeLutin. All Rights Reserved.