org.sharengo.wikitty.jms
Class WikittyExtensionStorageJMS
java.lang.Object
org.sharengo.wikitty.jms.WikittyExtensionStorageJMS
- All Implemented Interfaces:
- WikittyExtensionStorage
public class WikittyExtensionStorageJMS
- extends Object
- implements WikittyExtensionStorage
- Version:
- $Revision: 1 $
Last update: $Date: 2010-04-16 10:29:38 +0200 (ven., 16 avril 2010) $
by : $Author: echatellier $
- Author:
- ruchaud
connectionFactory
protected final javax.jms.XATopicConnectionFactory connectionFactory
topic
protected final javax.jms.Topic topic
topicConnection
protected final javax.jms.XATopicConnection topicConnection
topicSession
protected final javax.jms.XATopicSession topicSession
topicPublisher
protected final javax.jms.TopicPublisher topicPublisher
WikittyExtensionStorageJMS
public WikittyExtensionStorageJMS(Properties properties)
throws NamingException,
javax.jms.JMSException
- Creates a publisher on a topic named
WikittyExtensionStorageTopic.
Methods invoked on this WikittyExtensionStorage are forwarded to the jms broker.
- Parameters:
properties - properties passed to InitialContext,
it must contains at least a value for the Context.PROVIDER_URL
- Throws:
NamingException
javax.jms.JMSException
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
store
public UpdateResponse store(WikittyTransaction transaction,
Collection<WikittyExtension> extensions)
- Forwards the specified
extensions to the jms broker.
The message forwarded is an ObjectMessage.
It is composed of:
- the specified
extensions
- a string property: action=
store
- Specified by:
store in interface WikittyExtensionStorage
- Parameters:
transaction - extensions -
clear
public void clear(WikittyTransaction transaction)
- Forwards a
TextMessage to the jms broker.
The message forwarded is a TextMessage.
It is composed of:
- a string property: action=
clear
- Specified by:
clear in interface WikittyExtensionStorage
- Parameters:
transaction -
exists
public boolean exists(WikittyTransaction transaction,
String id)
- Specified by:
exists in interface WikittyExtensionStorage
getAllExtensionIds
public List<String> getAllExtensionIds(WikittyTransaction transaction)
- Specified by:
getAllExtensionIds in interface WikittyExtensionStorage
getAllExtensionsRequires
public List<String> getAllExtensionsRequires(WikittyTransaction transaction,
String extensionName)
- Specified by:
getAllExtensionsRequires in interface WikittyExtensionStorage
getLastVersion
public String getLastVersion(WikittyTransaction transaction,
String extName)
- Specified by:
getLastVersion in interface WikittyExtensionStorage
restore
public WikittyExtension restore(WikittyTransaction transaction,
String name,
String version)
throws WikittyException
- Specified by:
restore in interface WikittyExtensionStorage
- Throws:
WikittyException
Copyright © 2010 CodeLutin. All Rights Reserved.