public abstract class JMSQConnector extends java.lang.Object implements QueueConnector
Modifier and Type | Field and Description |
---|---|
protected int |
batchSize |
protected javax.jms.QueueBrowser |
bBrowser |
protected int |
boundary |
protected javax.jms.QueueReceiver |
bReceiver |
protected javax.jms.QueueSender |
bSender |
protected javax.jms.QueueSession |
bSession |
protected int |
bufferSize |
protected QuickCache |
cache |
protected int |
displayMask |
protected boolean |
enable_exlsnr |
protected long |
endTime |
protected byte[] |
eotBytes |
protected long |
expiry |
protected boolean |
isPhysical |
protected int |
maxIdleTime |
protected int |
maxMsgLength |
protected int |
maxNumberMsg |
protected int |
mode |
protected static int |
MS_EOT |
protected static int |
MS_SOT |
protected java.lang.String |
msField |
protected Msg2Text |
msg2Text |
protected MessageFilter[] |
msgFilters |
protected java.lang.String |
msgID |
protected java.lang.String |
msgSelector |
protected int |
offhead |
protected int |
offtail |
protected java.lang.String |
operation |
protected int |
overwrite |
protected int[] |
partition |
protected java.lang.String |
password |
protected int |
persistence |
protected int |
priority |
protected java.lang.String[] |
propertyName |
protected java.lang.String[] |
propertyValue |
protected javax.jms.QueueBrowser |
qBrowser |
protected javax.jms.QueueConnection |
qConnection |
protected java.lang.String |
qName |
protected javax.jms.QueueReceiver |
qReceiver |
protected javax.jms.QueueSender |
qSender |
protected javax.jms.QueueSession |
qSession |
protected javax.jms.Queue |
queue |
protected java.lang.String |
rcField |
protected int |
receiveTime |
protected java.io.File |
referenceFile |
protected boolean |
resetOption |
protected java.lang.String[] |
respPropertyName |
protected java.lang.String |
resultField |
protected int |
resultType |
protected int |
sequentialSearch |
protected int |
sleepTime |
protected byte[] |
sotBytes |
protected long |
startTime |
protected Template |
template |
protected int |
textMode |
protected int |
timeout |
protected long |
timestamp |
protected java.lang.String |
username |
protected long |
waitTime |
protected boolean |
withFlowControlDisabled |
protected int |
xaMode |
Constructor and Description |
---|
JMSQConnector() |
Modifier and Type | Method and Description |
---|---|
void |
browse(java.lang.Object out)
It browses JMS messages from the JMS queue and sends them into a output
channel that may be a JMS destination, an OutputStream or an XQueue.
|
void |
close()
closes all opened resources
|
protected javax.jms.JMSException |
commit(XQueue xq,
int[] batch,
int size)
commits messages sent in the batch and returns exception upon failure
|
protected void |
connect()
establishes the queue connection to the JMS service
|
javax.jms.Message |
createMessage(int type)
returns a JMS Message with the initialized JMSSession
|
javax.jms.Queue |
createQueue(java.lang.String queueName)
returns the queue created for the given name
|
javax.jms.TemporaryQueue |
createTemporaryQueue()
returns the temporary queue created
|
void |
get(java.lang.Object out)
It gets JMS messages from the JMS queue and sends them into a output
channel that may be a JMS destination, an OutputStream or an XQueue.
|
java.lang.String |
getOperation()
returns the string of the operation
|
javax.jms.QueueBrowser |
getQueueBrowser()
returns an on-demand browser in a separate session
|
javax.jms.QueueReceiver |
getQueueReceiver()
returns an on-demand receiver in a separate session
|
javax.jms.QueueSender |
getQueueSender()
returns an on-demand sender in a separate session
|
protected abstract javax.jms.QueueConnectionFactory |
initialize()
initializes the QueueConnectionFactory and returns it
|
void |
onException(javax.jms.JMSException e)
catches JMSException of Connection asynchronously
|
void |
put(java.io.InputStream in)
It reads bytes from the InputStream and put them into a JMS queue as
JMS messages.
|
void |
put(XQueue xq)
It gets JMS messages from the XQueue and puts them into a JMS queue.
|
void |
qClose()
closes the JMS queue resources
|
void |
qOpen()
opens the queue resources
|
int |
qReopen()
reopens the queue
|
void |
query(XQueue xq)
It listens to an XQueue for incoming JMS messages and extracts the
query statement from each message.
|
java.lang.String |
reconnect()
reconnects to the JMS queue and returns null if success
|
void |
reply(XQueue xq)
It gets JMS messages from the XQueue and sends them to their ReplyTo
queues.
|
void |
request(XQueue xq,
java.lang.String responseQueueName)
It gets JMS messages from the XQueue and puts them into a JMS queue as
requests.
|
protected int |
resetQueueBrowser(java.lang.String name,
java.lang.String mSelector)
closes the current qBrowser and creates a new qBrowser on the queue
with the given physical queue name and the message selector
|
protected void |
rollback(XQueue xq,
int[] batch,
int size)
rolls back the messages sent in the batch
|
protected void |
saveReference()
flushes the current reference info to a given file for tracking the
browser state if the ReferenceFile is defined.
|
protected static java.lang.String |
toKey(java.lang.String[] keys) |
protected javax.jms.QueueConnection qConnection
protected javax.jms.QueueSession qSession
protected javax.jms.QueueSession bSession
protected javax.jms.QueueReceiver qReceiver
protected javax.jms.QueueReceiver bReceiver
protected javax.jms.QueueBrowser qBrowser
protected javax.jms.QueueBrowser bBrowser
protected javax.jms.QueueSender qSender
protected javax.jms.QueueSender bSender
protected javax.jms.Queue queue
protected java.lang.String msgID
protected long timestamp
protected int bufferSize
protected java.lang.String qName
protected java.io.File referenceFile
protected java.lang.String username
protected java.lang.String password
protected int[] partition
protected int displayMask
protected long expiry
protected int persistence
protected int priority
protected int resultType
protected int overwrite
protected int mode
protected int sequentialSearch
protected java.lang.String[] propertyName
protected java.lang.String[] propertyValue
protected java.lang.String[] respPropertyName
protected java.lang.String msgSelector
protected java.lang.String operation
protected java.lang.String msField
protected java.lang.String rcField
protected java.lang.String resultField
protected Template template
protected QuickCache cache
protected Msg2Text msg2Text
protected long startTime
protected long endTime
protected long waitTime
protected int maxIdleTime
protected int maxNumberMsg
protected int maxMsgLength
protected int sleepTime
protected int receiveTime
protected int timeout
protected int textMode
protected int xaMode
protected int batchSize
protected int boundary
protected int offhead
protected int offtail
protected byte[] sotBytes
protected byte[] eotBytes
protected static final int MS_SOT
protected static final int MS_EOT
protected MessageFilter[] msgFilters
protected boolean enable_exlsnr
protected boolean isPhysical
protected boolean resetOption
protected boolean withFlowControlDisabled
protected abstract javax.jms.QueueConnectionFactory initialize() throws javax.jms.JMSException
javax.jms.JMSException
protected void connect() throws javax.jms.JMSException
javax.jms.JMSException
public void qOpen() throws javax.jms.JMSException
qOpen
in interface QueueConnector
javax.jms.JMSException
protected int resetQueueBrowser(java.lang.String name, java.lang.String mSelector)
public int qReopen()
qReopen
in interface QueueConnector
public void qClose() throws javax.jms.JMSException
qClose
in interface QueueConnector
javax.jms.JMSException
public java.lang.String reconnect()
reconnect
in interface QueueConnector
public void browse(java.lang.Object out) throws java.io.IOException, javax.jms.JMSException
browse
in interface QueueConnector
java.io.IOException
javax.jms.JMSException
protected void saveReference() throws java.io.IOException
java.io.IOException
public void query(XQueue xq) throws javax.jms.JMSException, TimeoutException
query
in interface QueueConnector
javax.jms.JMSException
TimeoutException
protected static java.lang.String toKey(java.lang.String[] keys)
public void get(java.lang.Object out) throws java.io.IOException, javax.jms.JMSException
get
in interface QueueConnector
java.io.IOException
javax.jms.JMSException
public void put(java.io.InputStream in) throws java.io.IOException, javax.jms.JMSException
put
in interface QueueConnector
java.io.IOException
javax.jms.JMSException
public void put(XQueue xq) throws TimeoutException, javax.jms.JMSException
put
in interface QueueConnector
TimeoutException
javax.jms.JMSException
public void request(XQueue xq, java.lang.String responseQueueName) throws TimeoutException, javax.jms.JMSException
request
in interface QueueConnector
TimeoutException
javax.jms.JMSException
public void reply(XQueue xq) throws TimeoutException, javax.jms.JMSException
reply
in interface QueueConnector
TimeoutException
javax.jms.JMSException
protected javax.jms.JMSException commit(XQueue xq, int[] batch, int size)
protected void rollback(XQueue xq, int[] batch, int size)
public java.lang.String getOperation()
QueueConnector
getOperation
in interface QueueConnector
public javax.jms.QueueBrowser getQueueBrowser()
getQueueBrowser
in interface QueueConnector
public javax.jms.QueueReceiver getQueueReceiver()
getQueueReceiver
in interface QueueConnector
public javax.jms.QueueSender getQueueSender()
getQueueSender
in interface QueueConnector
public javax.jms.Message createMessage(int type) throws javax.jms.JMSException
QueueConnector
createMessage
in interface QueueConnector
javax.jms.JMSException
public javax.jms.Queue createQueue(java.lang.String queueName) throws javax.jms.JMSException
QueueConnector
createQueue
in interface QueueConnector
javax.jms.JMSException
public javax.jms.TemporaryQueue createTemporaryQueue() throws javax.jms.JMSException
QueueConnector
createTemporaryQueue
in interface QueueConnector
javax.jms.JMSException
public void onException(javax.jms.JMSException e)
QueueConnector
onException
in interface javax.jms.ExceptionListener
onException
in interface QueueConnector
public void close()
QueueConnector
close
in interface QueueConnector