|
Log4j 1.3alpha-8 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.log4j.spi.ComponentBase | +--org.apache.log4j.plugins.PluginSkeleton | +--org.apache.log4j.plugins.Receiver | +--org.apache.log4j.net.JMSReceiver
JMSReceiver receives a remote logging event on a configured JSM topic and "posts" it to a LoggerRepository as if the event was generated locally. This class is designed to receive events from the JMSAppender class (or classes that send compatible events).
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.
Field Summary | |
protected String |
jndiPath
|
protected String |
password
|
protected TopicConnection |
topicConnection
|
protected String |
topicFactoryName
|
protected String |
topicName
|
protected String |
userId
|
Fields inherited from class org.apache.log4j.plugins.Receiver |
thresholdLevel |
Fields inherited from class org.apache.log4j.plugins.PluginSkeleton |
active, name |
Fields inherited from class org.apache.log4j.spi.ComponentBase |
repository |
Constructor Summary | |
JMSReceiver()
|
|
JMSReceiver(String _topicFactoryName,
String _topicName,
String _userId,
String _password,
String _jndiPath)
|
Method Summary | |
void |
activateOptions()
Starts the JMSReceiver with the current options. |
String |
getJndiPath()
Gets the path to a properties file containing the initial context and jndi provider url |
String |
getPassword()
Gets the curernt password property. |
String |
getTopicFactoryName()
Gets the curernt JMS topic factory name property. |
String |
getTopicName()
Gets the curernt JMS topic name property. |
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 Object |
lookup(Context ctx,
String name)
|
void |
onMessage(Message message)
|
protected void |
setActive(boolean _active)
Sets the flag to indicate if receiver is active or not. |
void |
setJndiPath(String _jndiPath)
Sets the path to a properties file containing the initial context and jndi provider url |
void |
setPassword(String _password)
Sets the password to use when creating the JMS connection. |
void |
setTopicFactoryName(String _topicFactoryName)
Sets the JMS topic factory name to use when creating the JMS connection. |
void |
setTopicName(String _topicName)
Sets the JMS topic name to use when creating the JMS connection. |
void |
setUserId(String _userId)
Sets the user id to use when creating the JMS connection. |
void |
shutdown()
Called when the receiver should be stopped. |
Methods inherited from class org.apache.log4j.plugins.Receiver |
doPost, getThreshold, isAsSevereAsThreshold, setThreshold |
Methods inherited from class org.apache.log4j.plugins.PluginSkeleton |
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getLoggerRepository, getName, removePropertyChangeListener, removePropertyChangeListener, setLoggerRepository, setName |
Methods inherited from class org.apache.log4j.spi.ComponentBase |
getLogger, getNonFloodingLogger, resetErrorCount |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected String topicFactoryName
protected String topicName
protected String userId
protected String password
protected TopicConnection topicConnection
protected String jndiPath
Constructor Detail |
public JMSReceiver()
public JMSReceiver(String _topicFactoryName, String _topicName, String _userId, String _password, String _jndiPath)
Method Detail |
public void setJndiPath(String _jndiPath)
public String getJndiPath()
public void setTopicFactoryName(String _topicFactoryName)
public String getTopicFactoryName()
public void setTopicName(String _topicName)
public String getTopicName()
public void setUserId(String _userId)
public String getUserId()
public void setPassword(String _password)
public String getPassword()
public boolean isEquivalent(Plugin testPlugin)
isEquivalent
in class PluginSkeleton
testPlugin
- The plugin to test equivalency against.public boolean isActive()
isActive
in class PluginSkeleton
org.apache.log4j.plugins.PluginSkeleton
protected void setActive(boolean _active)
public void activateOptions()
public void shutdown()
public void onMessage(Message message)
onMessage
in interface MessageListener
protected Object lookup(Context ctx, String name) throws NamingException
|
Log4j 1.3alpha-8 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |