Package ch.qos.logback.access.sift

## Class AccessEventDiscriminator

- java.lang.Object
- - ch.qos.logback.core.spi.ContextAwareBase
  - - ch.qos.logback.core.sift.AbstractDiscriminator<IAccessEvent>
    - - ch.qos.logback.access.sift.AccessEventDiscriminator

All Implemented Interfaces:
  `Discriminator<IAccessEvent>`, `ContextAware`, `LifeCycle`

    public class AccessEventDiscriminator
    extends AbstractDiscriminator<IAccessEvent>

AccessEventDiscriminator's job is to return the value of a designated field in an `IAccessEvent` instance.

The field is specified via the `AccessEventDiscriminator.FieldName` property.

Author:
  Ceki Gülcü

### Nested Class Summary

Nested Classes
`static class` `AccessEventDiscriminator.FieldName` At present time the followed fields can be designated: COOKIE, REQUEST_ATTRIBUTE, SESSION_ATTRIBUTE, REMOTE_ADDRESS, LOCAL_PORT,REQUEST_URI

### Field Summary

### Fields inherited from class ch.qos.logback.core.sift.AbstractDiscriminator

`started`

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

`context`

### Constructor Summary

Constructors
`AccessEventDiscriminator()`

### Method Summary

All Methods Instance Methods Concrete Methods
`java.lang.String` `getAdditionalKey()`
`java.lang.String` `getDefaultValue()`
`java.lang.String` `getDiscriminatingValue​(IAccessEvent acccessEvent)` Given event 'e' return a discriminating value.
`AccessEventDiscriminator.FieldName` `getFieldName()`
`java.lang.String` `getKey()` The key or variable name under which the discriminating value should be exported into the host environment.
`java.lang.String` `getRawDiscriminatingValue​(IAccessEvent acccessEvent)`
`void` `setAdditionalKey​(java.lang.String additionalKey)`
`void` `setDefaultValue​(java.lang.String defaultValue)` The default value returned by this discriminator in case it cannot compute the discriminating value from the access event.
`void` `setFieldName​(AccessEventDiscriminator.FieldName fieldName)`
`void` `setKey​(java.lang.String key)`
`void` `start()`

### Methods inherited from class ch.qos.logback.core.sift.AbstractDiscriminator

`isStarted, stop`

### 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, toString, wait, wait, wait`

### Constructor Detail

#### AccessEventDiscriminator

    public AccessEventDiscriminator()

### Method Detail

#### getDiscriminatingValue

    public java.lang.String getDiscriminatingValue​(IAccessEvent acccessEvent)

Description copied from interface: `Discriminator`
Given event 'e' return a discriminating value.

Returns:

#### getRawDiscriminatingValue

    public java.lang.String getRawDiscriminatingValue​(IAccessEvent acccessEvent)

#### start

    public void start()

Specified by:
  `start` in interface `LifeCycle`
Overrides:
  `start` in class `AbstractDiscriminator<IAccessEvent>`

#### setFieldName

    public void setFieldName​(AccessEventDiscriminator.FieldName fieldName)

#### getFieldName

    public AccessEventDiscriminator.FieldName getFieldName()

#### getAdditionalKey

    public java.lang.String getAdditionalKey()

#### setAdditionalKey

    public void setAdditionalKey​(java.lang.String additionalKey)

#### getDefaultValue

    public java.lang.String getDefaultValue()

Returns:
See Also:
  `setDefaultValue(String)`

#### setDefaultValue

    public void setDefaultValue​(java.lang.String defaultValue)

The default value returned by this discriminator in case it cannot compute the discriminating value from the access event.

Parameters:
  `defaultValue` -

#### getKey

    public java.lang.String getKey()

Description copied from interface: `Discriminator`
The key or variable name under which the discriminating value should be exported into the host environment.

Returns:

#### setKey

    public void setKey​(java.lang.String key)