Logback API
Version 0.9.8

ch.qos.logback.classic.net
Class JMSTopicAppender

java.lang.Object
  extended by ch.qos.logback.core.spi.ContextAwareBase
      extended by ch.qos.logback.core.AppenderBase<E>
          extended by ch.qos.logback.core.net.JMSAppenderBase<LoggingEvent>
              extended by ch.qos.logback.classic.net.JMSTopicAppender
All Implemented Interfaces:
Appender<LoggingEvent>, ContextAware, FilterAttachable, LifeCycle

public class JMSTopicAppender
extends JMSAppenderBase<LoggingEvent>

A simple appender that publishes events to a JMS Topic. The events are serialized and transmitted as JMS message type ObjectMessage. For more information about this appender, please refer to http://logback.qos.ch/manual/appenders.html#JMSTopicAppender

Author:
Ceki Gülcü

Field Summary
 
Fields inherited from class ch.qos.logback.core.net.JMSAppenderBase
initialContextFactoryName, password, providerURL, securityCredentials, securityPrincipalName, urlPkgPrefixes, userName
 
Fields inherited from class ch.qos.logback.core.AppenderBase
name, started
 
Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context
 
Constructor Summary
JMSTopicAppender()
           
 
Method Summary
 void append(LoggingEvent event)
          This method called by AppenderBase.doAppend(E) method to do most of the real appending work.
 String getTopicBindingName()
          Returns the value of the TopicBindingName option.
protected  javax.jms.TopicConnection getTopicConnection()
          Returns the TopicConnection used for this appender.
 String getTopicConnectionFactoryBindingName()
          Returns the value of the TopicConnectionFactoryBindingName option.
protected  javax.jms.TopicPublisher getTopicPublisher()
          Returns the TopicPublisher used for this appender.
protected  javax.jms.TopicSession getTopicSession()
          Returns the TopicSession used for this appender.
 void setTopicBindingName(String topicBindingName)
          The TopicBindingName option takes a string value.
 void setTopicConnectionFactoryBindingName(String tcfBindingName)
          The TopicConnectionFactoryBindingName option takes a string value.
 void start()
          Options are activated and become effective only after calling this method.
 void stop()
          Close this JMSAppender.
 
Methods inherited from class ch.qos.logback.core.net.JMSAppenderBase
buildEnvProperties, buildJNDIContext, getInitialContextFactoryName, getPassword, getProviderURL, getSecurityCredentials, getSecurityPrincipalName, getURLPkgPrefixes, getUserName, lookup, setInitialContextFactoryName, setPassword, setProviderURL, setSecurityCredentials, setSecurityPrincipalName, setURLPkgPrefixes, setUserName
 
Methods inherited from class ch.qos.logback.core.AppenderBase
addFilter, clearAllFilters, doAppend, getFilterChainDecision, getFirstFilter, getLayout, getName, isStarted, setLayout, setName, toString
 
Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getStatusManager, setContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface ch.qos.logback.core.spi.ContextAware
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, setContext
 

Constructor Detail

JMSTopicAppender

public JMSTopicAppender()
Method Detail

setTopicConnectionFactoryBindingName

public void setTopicConnectionFactoryBindingName(String tcfBindingName)
The TopicConnectionFactoryBindingName option takes a string value. Its value will be used to lookup the appropriate TopicConnectionFactory from the JNDI context.


getTopicConnectionFactoryBindingName

public String getTopicConnectionFactoryBindingName()
Returns the value of the TopicConnectionFactoryBindingName option.


setTopicBindingName

public void setTopicBindingName(String topicBindingName)
The TopicBindingName option takes a string value. Its value will be used to lookup the appropriate Topic from the JNDI context.


getTopicBindingName

public String getTopicBindingName()
Returns the value of the TopicBindingName option.


start

public void start()
Options are activated and become effective only after calling this method.

Specified by:
start in interface LifeCycle
Overrides:
start in class AppenderBase<LoggingEvent>

stop

public void stop()
Close this JMSAppender. Closing releases all resources used by the appender. A closed appender cannot be re-opened.

Specified by:
stop in interface LifeCycle
Overrides:
stop in class AppenderBase<LoggingEvent>

append

public void append(LoggingEvent event)
This method called by AppenderBase.doAppend(E) method to do most of the real appending work.

Specified by:
append in class AppenderBase<LoggingEvent>

getTopicConnection

protected javax.jms.TopicConnection getTopicConnection()
Returns the TopicConnection used for this appender. Only valid after start() method has been invoked.


getTopicSession

protected javax.jms.TopicSession getTopicSession()
Returns the TopicSession used for this appender. Only valid after start() method has been invoked.


getTopicPublisher

protected javax.jms.TopicPublisher getTopicPublisher()
Returns the TopicPublisher used for this appender. Only valid after start() method has been invoked.


Logback API
Version 0.9.8

Copyright © 2005-2008 QOS.ch. All Rights Reserved.