org.sharengo.wikitty.jms
Class WikittyStorageJMS

java.lang.Object
  extended by org.sharengo.wikitty.jms.WikittyStorageJMS
All Implemented Interfaces:
WikittyStorage

public class WikittyStorageJMS
extends Object
implements WikittyStorage

Version:
$Revision: 1 $ Last update: $Date: 2010-04-16 10:29:38 +0200 (ven., 16 avril 2010) $ by : $Author: echatellier $
Author:
ruchaud

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.sharengo.wikitty.WikittyStorage
WikittyStorage.Scanner
 
Field Summary
protected  javax.jms.XATopicConnectionFactory connectionFactory
           
protected  javax.jms.Topic topic
           
protected  javax.jms.XATopicConnection topicConnection
           
protected  javax.jms.TopicPublisher topicPublisher
           
protected  javax.jms.XATopicSession topicSession
           
 
Constructor Summary
WikittyStorageJMS(Properties properties)
          Creates a publisher on a topic named WikittyStorageTopic.
 
Method Summary
 void clear(WikittyTransaction transaction)
          Forwards a TextMessage to the jms broker.
 void close()
           
 UpdateResponse delete(WikittyTransaction transaction, Collection<String> ids)
          Forwards the specified ids to the jms broker.
 boolean exists(WikittyTransaction transaction, String id)
           
protected  void finalize()
           
 boolean isDeleted(WikittyTransaction transaction, String id)
           
 Wikitty restore(WikittyTransaction transaction, String id, String... fqFieldName)
           
 void scanWikitties(WikittyTransaction transaction, WikittyStorage.Scanner scanner)
           
 UpdateResponse store(WikittyTransaction transaction, Collection<Wikitty> wikitties, boolean disableAutoVersionIncrement)
          Forwards the specified wikitties to the jms broker.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

WikittyStorageJMS

public WikittyStorageJMS(Properties properties)
                  throws NamingException,
                         javax.jms.JMSException
Creates a publisher on a topic named WikittyStorageTopic. Methods invoked on this WikittyStorage 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
Method Detail

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<Wikitty> wikitties,
                            boolean disableAutoVersionIncrement)
Forwards the specified wikitties to the jms broker. The message forwarded is an ObjectMessage. It is composed of:

Specified by:
store in interface WikittyStorage
Parameters:
transaction -
extensions -

delete

public UpdateResponse delete(WikittyTransaction transaction,
                             Collection<String> ids)
                      throws WikittyException
Forwards the specified ids to the jms broker. The message forwarded is a TextMessage. It is composed of:

Specified by:
delete in interface WikittyStorage
Parameters:
transaction -
ids -
Throws:
WikittyException

clear

public void clear(WikittyTransaction transaction)
Forwards a TextMessage to the jms broker. The message forwarded is a TextMessage. It is composed of:

Specified by:
clear in interface WikittyStorage
Parameters:
transaction -

exists

public boolean exists(WikittyTransaction transaction,
                      String id)
Specified by:
exists in interface WikittyStorage

isDeleted

public boolean isDeleted(WikittyTransaction transaction,
                         String id)
Specified by:
isDeleted in interface WikittyStorage

restore

public Wikitty restore(WikittyTransaction transaction,
                       String id,
                       String... fqFieldName)
                throws WikittyException
Specified by:
restore in interface WikittyStorage
Throws:
WikittyException

scanWikitties

public void scanWikitties(WikittyTransaction transaction,
                          WikittyStorage.Scanner scanner)
Specified by:
scanWikitties in interface WikittyStorage


Copyright © 2010 CodeLutin. All Rights Reserved.