public class JMSReceiver extends Receiver implements javax.jms.MessageListener
Once the event has been "posted", it will be handled by the appenders currently configured in the LoggerRespository.
This implementation borrows heavily from the JMSSink implementation.
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
jndiPath |
protected java.lang.String |
password |
protected javax.jms.TopicConnection |
topicConnection |
protected java.lang.String |
topicFactoryName |
protected java.lang.String |
topicName |
protected java.lang.String |
userId |
thresholdLevel
name
repository
Constructor and Description |
---|
JMSReceiver() |
JMSReceiver(java.lang.String _topicFactoryName,
java.lang.String _topicName,
java.lang.String _userId,
java.lang.String _password,
java.lang.String _jndiPath) |
Modifier and Type | Method and Description |
---|---|
void |
activateOptions()
Starts the JMSReceiver with the current options.
|
java.lang.String |
getJndiPath()
Gets the path to a properties file containing
the initial context and jndi provider url
|
java.lang.String |
getPassword()
Gets the curernt password property.
|
java.lang.String |
getTopicFactoryName()
Gets the curernt JMS topic factory name property.
|
java.lang.String |
getTopicName()
Gets the curernt JMS topic name property.
|
java.lang.String |
getUserId()
Gets the current user id property.
|
boolean |
isActive()
Returns true if this receiver is active.
|
boolean |
isEquivalent(Plugin testPlugin)
Returns true if the receiver is the same class and they are
configured for the same properties, and super class also considers
them to be equivalent.
|
protected java.lang.Object |
lookup(javax.naming.Context ctx,
java.lang.String name) |
void |
onMessage(javax.jms.Message message) |
protected void |
setActive(boolean _active)
Sets the flag to indicate if receiver is active or not.
|
void |
setJndiPath(java.lang.String _jndiPath)
Sets the path to a properties file containing
the initial context and jndi provider url
|
void |
setPassword(java.lang.String _password)
Sets the password to use when creating the
JMS connection.
|
void |
setTopicFactoryName(java.lang.String _topicFactoryName)
Sets the JMS topic factory name to use when creating the
JMS connection.
|
void |
setTopicName(java.lang.String _topicName)
Sets the JMS topic name to use when creating the
JMS connection.
|
void |
setUserId(java.lang.String _userId)
Sets the user id to use when creating the
JMS connection.
|
void |
shutdown()
Called when the receiver should be stopped.
|
doPost, getThreshold, isAsSevereAsThreshold, setThreshold
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getLoggerRepository, getName, removePropertyChangeListener, removePropertyChangeListener, setLoggerRepository, setName
getLogger, getNonFloodingLogger, resetErrorCount
protected java.lang.String topicFactoryName
protected java.lang.String topicName
protected java.lang.String userId
protected java.lang.String password
protected javax.jms.TopicConnection topicConnection
protected java.lang.String jndiPath
public JMSReceiver()
public JMSReceiver(java.lang.String _topicFactoryName, java.lang.String _topicName, java.lang.String _userId, java.lang.String _password, java.lang.String _jndiPath)
public void setJndiPath(java.lang.String _jndiPath)
public java.lang.String getJndiPath()
public void setTopicFactoryName(java.lang.String _topicFactoryName)
public java.lang.String getTopicFactoryName()
public void setTopicName(java.lang.String _topicName)
public java.lang.String getTopicName()
public void setUserId(java.lang.String _userId)
public java.lang.String getUserId()
public void setPassword(java.lang.String _password)
public java.lang.String getPassword()
public boolean isEquivalent(Plugin testPlugin)
isEquivalent
in interface Plugin
isEquivalent
in class PluginSkeleton
testPlugin
- The plugin to test equivalency against.public boolean isActive()
isActive
in interface Plugin
isActive
in class PluginSkeleton
protected void setActive(boolean _active)
public void activateOptions()
activateOptions
in interface OptionHandler
public void shutdown()
public void onMessage(javax.jms.Message message)
onMessage
in interface javax.jms.MessageListener
protected java.lang.Object lookup(javax.naming.Context ctx, java.lang.String name) throws javax.naming.NamingException
javax.naming.NamingException
Copyright © 2006-2019 OPS4J - Open Participation Software for Java. All Rights Reserved.