org.keycloak.audit.mongo

## Class MongoAuditProvider

- java.lang.Object
- - org.keycloak.audit.mongo.MongoAuditProvider

- All Implemented Interfaces:
    AuditListener, AuditProvider, Provider

      public class MongoAuditProvider
      extends Object
      implements AuditProvider

  Author:
    Stian Thorgersen

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MongoAuditProvider(com.mongodb.DBCollection audit, Set<EventType> includedEvents)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clear()`
    `void` | `clear(String realmId)`
    `void` | `clear(String realmId, long olderThan)`
    `void` | `close()`
    `EventQuery` | `createQuery()`
    `void` | `onEvent(Event event)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### MongoAuditProvider

          public MongoAuditProvider(com.mongodb.DBCollection audit,
                            Set<EventType> includedEvents)

  - ### Method Detail

    - #### createQuery

          public EventQuery createQuery()

      Specified by:
        `createQuery` in interface `AuditProvider`

    - #### clear

          public void clear()

      Specified by:
        `clear` in interface `AuditProvider`

    - #### clear

          public void clear(String realmId)

      Specified by:
        `clear` in interface `AuditProvider`

    - #### clear

          public void clear(String realmId,
                   long olderThan)

      Specified by:
        `clear` in interface `AuditProvider`

    - #### onEvent

          public void onEvent(Event event)

      Specified by:
        `onEvent` in interface `AuditListener`

    - #### close

          public void close()

      Specified by:
        `close` in interface `Provider`

Copyright © 2014. All Rights Reserved.