org.hibernate.search.backend.impl.jms
Class JMSBackendQueueProcessorFactory

java.lang.Object
  extended by org.hibernate.search.backend.impl.jms.JMSBackendQueueProcessorFactory
All Implemented Interfaces:
BackendQueueProcessorFactory, UpdatableBackendQueueProcessorFactory

public class JMSBackendQueueProcessorFactory
extends Object
implements UpdatableBackendQueueProcessorFactory

Author:
Emmanuel Bernard, Hardy Ferentschik

Field Summary
static String JMS_CONNECTION_FACTORY
           
static String JMS_QUEUE
           
 
Constructor Summary
JMSBackendQueueProcessorFactory()
           
 
Method Summary
 void close()
          Used to shutdown and eventually release resources.
 javax.jms.QueueConnectionFactory getJMSFactory()
           
 javax.jms.Queue getJmsQueue()
           
 String getJmsQueueName()
           
 Runnable getProcessor(List<LuceneWork> queue)
          Return a runnable implementation responsible for processing the queue to a given backend.
 void initialize(Properties props, WorkerBuildContext context)
          Used at startup, called once as first method.
 void prepareJMSTools()
           
 void updateDirectoryProviders(Set<DirectoryProvider<?>> providers, WorkerBuildContext context)
          Update the list of DirectoryProviders in case the SearchFactory is updated.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JMS_CONNECTION_FACTORY

public static final String JMS_CONNECTION_FACTORY
See Also:
Constant Field Values

JMS_QUEUE

public static final String JMS_QUEUE
See Also:
Constant Field Values
Constructor Detail

JMSBackendQueueProcessorFactory

public JMSBackendQueueProcessorFactory()
Method Detail

initialize

public void initialize(Properties props,
                       WorkerBuildContext context)
Description copied from interface: BackendQueueProcessorFactory
Used at startup, called once as first method.

Specified by:
initialize in interface BackendQueueProcessorFactory
Parameters:
props - all configuration properties
context - context giving access to required meta data

updateDirectoryProviders

public void updateDirectoryProviders(Set<DirectoryProvider<?>> providers,
                                     WorkerBuildContext context)
Description copied from interface: UpdatableBackendQueueProcessorFactory
Update the list of DirectoryProviders in case the SearchFactory is updated. The processor factory should react and update its state accordingly.

Specified by:
updateDirectoryProviders in interface UpdatableBackendQueueProcessorFactory

getProcessor

public Runnable getProcessor(List<LuceneWork> queue)
Description copied from interface: BackendQueueProcessorFactory
Return a runnable implementation responsible for processing the queue to a given backend.

Specified by:
getProcessor in interface BackendQueueProcessorFactory
Parameters:
queue - The work queue to process.
Returns:
Runnable which processes queue when started.

getJMSFactory

public javax.jms.QueueConnectionFactory getJMSFactory()

getJmsQueue

public javax.jms.Queue getJmsQueue()

getJmsQueueName

public String getJmsQueueName()

prepareJMSTools

public void prepareJMSTools()

close

public void close()
Description copied from interface: BackendQueueProcessorFactory
Used to shutdown and eventually release resources. No other method should be used after this one.

Specified by:
close in interface BackendQueueProcessorFactory


Copyright © 2006-2012 Red Hat Middleware, LLC. All Rights Reserved