public class MasterDBJMSClient extends Client implements MasterMessageServer
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ENV_JMS_MAX_PROCESS_MS
Environment variable to control the max processing time in milliseconds
|
static java.lang.String |
ENV_JMS_MAX_TRANSFER_MS
Environment variable to control the max transfer time in milliseconds
|
static java.lang.String |
SENDER_ID
The sender ID ( we lose this in multiple JMS servers)
|
ATTRIBUTE_RECORD_COUNT, ATTRIBUTE_SENT_MS, ATTRIBUTE_TRANS_MS, ATTRIBUTE_TRANS_NR, DISABLE_JMS, ENV_JMS_MAX_LIVE_MS, ENV_JMS_PENDING_COUNT, ENV_JMS_TIMEOUT, JMS_TIMEOUT, MAX_INACTIVITY_DURATION, PROPERTY_MAX_INACTIVITY_DURATION
MAX_BODY_SIZE
Modifier | Constructor and Description |
---|---|
protected |
MasterDBJMSClient()
Listen for JMS messages to keep the cache in sync with other servers.
|
|
MasterDBJMSClient(MasterDB masterDB)
Listen for JMS messages to keep the cache in sync with other servers.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getContextFactory()
get the context factory
|
protected MessageListener |
getMessageListener()
Get the listener
|
java.lang.String |
getProviderUrl()
get the context factory
|
static void |
logRecievedMessage(java.lang.String message,
long startMS,
long sentMS,
java.lang.String clientID,
java.lang.String messageID)
log a message
|
void |
onException(javax.jms.JMSException jMSException)
Handle a JMS exception
|
void |
onMessage(Message message)
Each XML to process.
|
static void |
processMessage(java.lang.String text,
java.lang.String clientID,
java.lang.String messageID)
Each XML to process.
|
protected void |
refreshContext()
reload the context from the database.
|
void |
send(MutableDataSource mds,
long transNr,
DBObject[] list,
long transMS)
sends a message
|
void |
sendClear()
Send clear Message
|
connect, connectionFailed, getConnectionCount, getConnectionStats, getCurrentClientID, getLastConnected, getTotalSentCount, isConnected, isEnabled, logSentMessage, postPublish, prePublish, reconnectedJMS, send, shutdown, shutdownJMS
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
checkTransHeaderExists, connect, getCurrentClientID, make, makeClear, makeMSG
shutdown
public static final java.lang.String SENDER_ID
public static final java.lang.String ENV_JMS_MAX_PROCESS_MS
public static final java.lang.String ENV_JMS_MAX_TRANSFER_MS
public MasterDBJMSClient(@Nonnull MasterDB masterDB)
masterDB
- The master DBprotected MasterDBJMSClient()
protected MessageListener getMessageListener()
getMessageListener
in class Client
public void sendClear() throws java.lang.Exception
sendClear
in interface MasterMessageServer
java.lang.Exception
public void send(@Nonnull MutableDataSource mds, @Nonnegative long transNr, @Nonnull DBObject[] list, @Nonnegative long transMS) throws java.lang.Exception
send
in interface MasterMessageServer
mds
- the datasourcetransNr
- the transaction numberlist
- the object listtransMS
- transaction time.java.lang.Exception
- a serious problem@CheckReturnValue @Nonnull public java.lang.String getContextFactory()
getContextFactory
in class Client
@CheckReturnValue @Nonnull public java.lang.String getProviderUrl()
getProviderUrl
in class Client
protected void refreshContext() throws java.lang.Exception
refreshContext
in class Client
java.lang.Exception
- A serious problem.public void onException(javax.jms.JMSException jMSException)
onException
in class Client
jMSException
- The exceptionpublic void onMessage(Message message)
message
- The message to be processed.public static void processMessage(java.lang.String text, java.lang.String clientID, java.lang.String messageID) throws java.lang.Exception
clientID
- The client IDmessageID
- the message IDtext
- The message textjava.lang.Exception
- A serious problempublic static void logRecievedMessage(java.lang.String message, long startMS, long sentMS, java.lang.String clientID, java.lang.String messageID)
clientID
- The client IDmessageID
- the message idmessage
- the messagestartMS
- the start timesentMS
- the sent timestSoftware Copyright © 2001-2014 stSoftware All Rights Reserved.