ch.qos.logback.core.net

## Class JMSAppenderBase<E>

- java.lang.Object
- - ch.qos.logback.core.spi.ContextAwareBase
  - - ch.qos.logback.core.AppenderBase<E>
    - - ch.qos.logback.core.net.JMSAppenderBase<E>

All Implemented Interfaces:
  Appender<E>, ContextAware, FilterAttachable<E>, LifeCycle

Direct Known Subclasses:
  JMSQueueAppender, JMSTopicAppender

    public abstract class JMSAppenderBase<E>
    extends AppenderBase<E>

This class serves as a base class for JMSTopicAppender and JMSQueueAppender For more information about this appender, please refer to: http://logback.qos.ch/manual/appenders.html#JMSAppenderBase

Author:
  Ceki Gülcü, Sébastien Pennec

### Field Summary

Fields
`protected java.lang.String` `initialContextFactoryName`
`protected java.lang.String` `password`
`protected java.lang.String` `providerURL`
`protected java.lang.String` `securityCredentials`
`protected java.lang.String` `securityPrincipalName`
`protected java.lang.String` `urlPkgPrefixes`
`protected java.lang.String` `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

Constructors
Constructor and Description
`JMSAppenderBase()`

### Method Summary

Methods
`java.util.Properties` `buildEnvProperties()`
`javax.naming.Context` `buildJNDIContext()`
`java.lang.String` `getInitialContextFactoryName()` Returns the value of the InitialContextFactoryName option.
`java.lang.String` `getPassword()`
`java.lang.String` `getProviderURL()`
`java.lang.String` `getSecurityCredentials()`
`java.lang.String` `getSecurityPrincipalName()`
`java.lang.String` `getURLPkgPrefixes()`
`java.lang.String` `getUserName()`
`protected java.lang.Object` `lookup(javax.naming.Context ctx, java.lang.String name)`
`void` `setInitialContextFactoryName(java.lang.String initialContextFactoryName)` Setting the InitialContextFactoryName method will cause this `JMSAppender` instance to use the `InitialContext.InitialContext(Hashtable)` method instead of the no-argument constructor.
`void` `setPassword(java.lang.String password)` The password to use when creating a topic session.
`void` `setProviderURL(java.lang.String providerURL)`
`void` `setSecurityCredentials(java.lang.String securityCredentials)`
`void` `setSecurityPrincipalName(java.lang.String securityPrincipalName)`
`void` `setURLPkgPrefixes(java.lang.String urlPkgPrefixes)`
`void` `setUserName(java.lang.String userName)` The user name to use when `TopicConnectionFactory.createTopicConnection(String, String)` creating a topic session}.

### Methods inherited from class ch.qos.logback.core.AppenderBase

`addFilter, append, clearAllFilters, doAppend, getCopyOfAttachedFiltersList, getFilterChainDecision, getName, isStarted, setName, start, stop, toString`

### Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase

`addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, 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`

### Field Detail

#### securityPrincipalName

    protected java.lang.String securityPrincipalName

#### securityCredentials

    protected java.lang.String securityCredentials

#### initialContextFactoryName

    protected java.lang.String initialContextFactoryName

#### urlPkgPrefixes

    protected java.lang.String urlPkgPrefixes

#### providerURL

    protected java.lang.String providerURL

#### userName

    protected java.lang.String userName

#### password

    protected java.lang.String password

### Constructor Detail

#### JMSAppenderBase

    public JMSAppenderBase()

### Method Detail

#### lookup

    protected java.lang.Object lookup(javax.naming.Context ctx,
                          java.lang.String name)
                               throws javax.naming.NamingException

Throws:
  `javax.naming.NamingException`

#### buildJNDIContext

    public javax.naming.Context buildJNDIContext()
                                          throws javax.naming.NamingException

Throws:
  `javax.naming.NamingException`

#### buildEnvProperties

    public java.util.Properties buildEnvProperties()

#### getInitialContextFactoryName

    public java.lang.String getInitialContextFactoryName()

Returns the value of the InitialContextFactoryName option. See `setInitialContextFactoryName(java.lang.String)` for more details on the meaning of this option.

#### setInitialContextFactoryName

    public void setInitialContextFactoryName(java.lang.String initialContextFactoryName)

Setting the InitialContextFactoryName method will cause this `JMSAppender` instance to use the `InitialContext.InitialContext(Hashtable)` method instead of the no-argument constructor. If you set this option, you should also at least set the ProviderURL option.

See also `setProviderURL(String)`.

#### getProviderURL

    public java.lang.String getProviderURL()

#### setProviderURL

    public void setProviderURL(java.lang.String providerURL)

#### getURLPkgPrefixes

    public java.lang.String getURLPkgPrefixes()

#### setURLPkgPrefixes

    public void setURLPkgPrefixes(java.lang.String urlPkgPrefixes)

#### getSecurityCredentials

    public java.lang.String getSecurityCredentials()

#### setSecurityCredentials

    public void setSecurityCredentials(java.lang.String securityCredentials)

#### getSecurityPrincipalName

    public java.lang.String getSecurityPrincipalName()

#### setSecurityPrincipalName

    public void setSecurityPrincipalName(java.lang.String securityPrincipalName)

#### getUserName

    public java.lang.String getUserName()

#### setUserName

    public void setUserName(java.lang.String userName)

The user name to use when `TopicConnectionFactory.createTopicConnection(String, String)` creating a topic session}. If you set this option, you should also set the Password option. See `setPassword(String)`.

#### getPassword

    public java.lang.String getPassword()

#### setPassword

    public void setPassword(java.lang.String password)

The password to use when creating a topic session.