public abstract class HornetQItemReaderWriterBase extends ItemReaderWriterBase
HornetQItemReader
and HornetQItemWriter
.HornetQItemReader
,
HornetQItemWriter
Modifier and Type | Field and Description |
---|---|
protected Map |
connectorFactoryParams
Key-value pairs to identify and configure HornetQ
org.hornetq.api.core.TransportConfiguration , which is
used to create HornetQ ServerLocator . |
protected static String |
FACTORY_CLASS_KEY |
protected static String |
NAME_KEY |
protected static String |
QUEUE_ADDRESS_KEY |
protected static String |
QUEUE_DURABLE_KEY |
protected static String |
QUEUE_FILTER_KEY |
protected static String |
QUEUE_NAME_KEY |
protected static String |
QUEUE_SHARED_KEY |
protected static String |
QUEUE_TEMPORARY_KEY |
protected org.hornetq.api.core.SimpleString |
queueAddress |
protected org.hornetq.api.core.SimpleString |
queueName |
protected Map |
queueParams
Key-value pairs to identify and configure the target HornetQ queue.
|
protected Class |
sendAcknowledgementHandler
The fully-qualified name of a class that implements
org.hornetq.api.core.client.SendAcknowledgementHandler . |
protected static String |
SERVER_LOCATOR_HA_KEY |
protected org.hornetq.api.core.client.ServerLocator |
serverLocator |
protected javax.enterprise.inject.Instance<org.hornetq.api.core.client.ServerLocator> |
serverLocatorInstance
This field holds an optional injection of HornetQ
ServerLocator . |
protected Map |
serverLocatorParams
Key-value pairs to configure HornetQ
ServerLocator . |
protected org.hornetq.api.core.client.ClientSession |
session |
protected org.hornetq.api.core.client.ClientSessionFactory |
sessionFactory |
protected javax.enterprise.inject.Instance<org.hornetq.api.core.client.ClientSessionFactory> |
sessionFactoryInstance
This field holds an optional injection of HornetQ
ClientSessionFactory . |
NEW_LINE, resource, skipBeanValidation
Constructor and Description |
---|
HornetQItemReaderWriterBase() |
Modifier and Type | Method and Description |
---|---|
protected static Serializable |
bytesToSerializableObject(byte[] bytes) |
Serializable |
checkpointInfo() |
protected void |
close() |
protected void |
configureServerLocator() |
protected static byte[] |
objectToBytes(Object obj) |
void |
open(Serializable checkpoint) |
getInputStream, getOutputStream, getValidator, validate
protected static final String QUEUE_NAME_KEY
protected static final String QUEUE_ADDRESS_KEY
protected static final String QUEUE_FILTER_KEY
protected static final String QUEUE_DURABLE_KEY
protected static final String QUEUE_SHARED_KEY
protected static final String QUEUE_TEMPORARY_KEY
protected static final String SERVER_LOCATOR_HA_KEY
protected static final String NAME_KEY
protected static final String FACTORY_CLASS_KEY
@Inject protected javax.enterprise.inject.Instance<org.hornetq.api.core.client.ServerLocator> serverLocatorInstance
ServerLocator
. When connectorFactoryParams
is
not specified, and sessionFactoryInstance
is not satisfied, this field will be queried to obtain an
instance of HornetQ ServerLocator
. The application may implement a
javax.enterprise.inject.Produces
method to satisfy this dependency injection.@Inject protected javax.enterprise.inject.Instance<org.hornetq.api.core.client.ClientSessionFactory> sessionFactoryInstance
ClientSessionFactory
. If this injection is satisfied,
serverLocatorInstance
will be ignored. The application may implement a
javax.enterprise.inject.Produces
method to satisfy this dependency injection.@Inject protected Map connectorFactoryParams
org.hornetq.api.core.TransportConfiguration
, which is
used to create HornetQ ServerLocator
. Optional property and defaults to null. When this property is
present, it will be used to create HornetQ ServerLocator
, and the injection fields
serverLocatorInstance
and sessionFactoryInstance
will be ignored. Valid keys and values are:
An example of this property in job xml:
<property name="connectorFactoryParams" value="factory-class=org.hornetq.core.remoting.impl.netty.NettyConnectorFactory, host=localhost, port=5445"/>
@Inject protected Map serverLocatorParams
ServerLocator
. Optional property and defaults to null.
Valid keys are:
ServerLocator
receives topology updates from the cluster
ServerLocator
class that have corresponding setter method, starting with either
upper or lower case character
See the current version of HornetQ ServerLocator
javadoc for supported keys and values, e.g.,
ServerLocator
An example of this property in job xml:
<property name="serverLocatorParams" value="HA=false, AckBatchSize=5, ProducerMaxRate=10, BlockOnAcknowledge=false, ConfirmationWindowSize=5"/>
@Inject protected Map queueParams
The following keys are supported:
An example of queueParams
property in job xml:
<property name="queueParams" value="address=example, durable=false"/>
@Inject protected Class sendAcknowledgementHandler
org.hornetq.api.core.client.SendAcknowledgementHandler
.
A SendAcknowledgementHandler notifies a client when an message sent asynchronously has been received by the server.
See current version of HornetQ documentation for details, e.g.,
SendAcknowledgementHandler
An example sendAcknowledgementHandler
property in job xml:
<property name="sendAcknowledgementHandler" value="org.jberet.support.io.HornetQReaderWriterTest$HornetQSendAcknowledgementHandler"/>
protected org.hornetq.api.core.SimpleString queueAddress
protected org.hornetq.api.core.SimpleString queueName
protected org.hornetq.api.core.client.ServerLocator serverLocator
protected org.hornetq.api.core.client.ClientSessionFactory sessionFactory
protected org.hornetq.api.core.client.ClientSession session
public void open(Serializable checkpoint) throws Exception
Exception
public Serializable checkpointInfo() throws Exception
Exception
protected void close()
protected static byte[] objectToBytes(Object obj) throws IOException
IOException
protected static Serializable bytesToSerializableObject(byte[] bytes) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
Copyright © 2015 JBoss by Red Hat. All rights reserved.