Overview | Package | Class | Tree | Deprecated | Index | Help
| Openfire 3.4.3 Javadoc
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jivesoftware.openfire.audit.spi
Class AuditManagerImpl

    java.lang.Object
      org.jivesoftware.openfire.container.BasicModule
          org.jivesoftware.openfire.audit.spi.AuditManagerImpl

All Implemented Interfaces:
  AuditManager, Module

    public class AuditManagerImpl

extends BasicModule
implements AuditManager

Implementation of the AuditManager interface.

Field Summary

Fields inherited from interface org.jivesoftware.openfire.audit.AuditManager
`PRESENCE_AVAILABLE_AVAILABLE, PRESENCE_AVAILABLE_UNAVAILABLE, PRESENCE_UNAVAILABLE_AVAILABLE, PRESENCE_UNAVAILABLE_UNAVAILABLE`

Constructor Summary
`AuditManagerImpl()`

Method Summary
`void` | `addXPath(String xpathExpression)` Adds an XPath expression to be used for filtering packets to be audited.
`Auditor` | `getAuditor()` Factory method for creating auditors that are configured by this audit manager.
`Collection<String>` | `getIgnoreList()` Returns the list of usernames that won't be audited.
`String` | `getLogDir()` Returns the absolute path to the directory where the audit log files will be saved.
`int` | `getLogTimeout()` Returns the time in milliseconds between successive executions of the task that will save the queued audited packets to a permanent store.
`int` | `getMaxDays()` Returns the maximum number of days to keep audit information.
`int` | `getMaxFileSize()` Obtain the maximum size of audit log files in megabytes.
`int` | `getMaxTotalSize()` Returns the maximum size in megabytes that all audit log files may have.
`Iterator` | `getXPathFilters()` Obtain an iterator over the XPath expressions (Strings) currently registered with the audit manager.
`void` | `initialize(XMPPServer server)` Initializes the basic module.
`boolean` | `isAuditIQ()` Determines if the server will audit all iq packets.
`boolean` | `isAuditMessage()` Determines if the server will audit all message packets.
`boolean` | `isAuditPresence()` Determines if the server will audit all presence packets.
`boolean` | `isAuditXPath()` Determines if the server will audit packets using XPath expressions.
`boolean` | `isEnabled()` Determines if auditing is enabled at all.
`void` | `removeXPath(String xpathExpression)` Removes the XPath expression from the set being used for filtering packets to be audited.
`void` | `setAuditIQ(boolean auditIQ)` Enables or disables the server auditing of all iq packets.
`void` | `setAuditMessage(boolean auditMessage)` Enables or disables the server auditing of all message packets.
`void` | `setAuditPresence(boolean auditPresence)` Enables or disables the server auditing of all presence packets.
`void` | `setAuditXPath(boolean auditXPath)` Enables/disables server auditing of packets using XPath expressions.
`void` | `setEnabled(boolean enabled)` Turns auditing off or on for the manager as a whole.
`void` | `setIgnoreList(Collection<String> usernames)` Sets the list of usernames that won't be audited.
`void` | `setLogDir(String logDir)` Sets the absolute path to the directory where the audit log files will be saved.
`void` | `setLogTimeout(int logTimeout)` Sets the time in milliseconds between successive executions of the task that will save the queued audited packets to a permanent store.
`void` | `setMaxDays(int count)` Set the the maximum number of days to keep audit information.
`void` | `setMaxFileSize(int size)` Set the maximum size of audit log files in megabytes.
`void` | `setMaxTotalSize(int size)` Sets the maximum size in megabytes that all audit log files may have.
`void` | `stop()` Stops the basic module.

Methods inherited from class org.jivesoftware.openfire.container.BasicModule
`destroy, getName, start`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### AuditManagerImpl

    public AuditManagerImpl()

Method Detail

### isEnabled

    public boolean isEnabled()

  Description copied from interface: `AuditManager`
  Determines if auditing is enabled at all.

  Specified by:
    `isEnabled` in interface `AuditManager`
  Returns:
    true if auditing is enabled, false indicates no auditing will occur

### setEnabled

    public void setEnabled(boolean enabled)

  Description copied from interface: `AuditManager`
  Turns auditing off or on for the manager as a whole.

  Specified by:
    `setEnabled` in interface `AuditManager`
  Parameters:
    `enabled` - true if auditing is enabled, false indicates no auditing will occur.

### getAuditor

    public Auditor getAuditor()

  Description copied from interface: `AuditManager`
  Factory method for creating auditors that are configured by this audit manager.

  Specified by:
    `getAuditor` in interface `AuditManager`
  Returns:
    a new auditor that will obey the configuration of the audit manager.

### getMaxTotalSize

    public int getMaxTotalSize()

  Description copied from interface: `AuditManager`
  Returns the maximum size in megabytes that all audit log files may have. When the limit is reached oldest audit log files will be removed until total size is under the limit.

  Specified by:
    `getMaxTotalSize` in interface `AuditManager`
  Returns:
    the maximum size of all audit logs in megabytes.

### setMaxTotalSize

    public void setMaxTotalSize(int size)

  Description copied from interface: `AuditManager`
  Sets the maximum size in megabytes that all audit log files may have. When the limit is reached oldest audit log files will be removed until total size is under the limit.

  Specified by:
    `setMaxTotalSize` in interface `AuditManager`
  Parameters:
    `size` - the maximum size of all audit logs in megabytes.

### getMaxFileSize

    public int getMaxFileSize()

  Description copied from interface: `AuditManager`
  Obtain the maximum size of audit log files in megabytes. Logs that exceed the max size will be rolled over to another file.

  Specified by:
    `getMaxFileSize` in interface `AuditManager`
  Returns:
    the maximum size of an audit log in megabytes.

### setMaxFileSize

    public void setMaxFileSize(int size)

  Description copied from interface: `AuditManager`
  Set the maximum size of audit log files in megabytes.

  Specified by:
    `setMaxFileSize` in interface `AuditManager`
  Parameters:
    `size` - the maximum audit log file size in megabytes.

### getMaxDays

    public int getMaxDays()

  Description copied from interface: `AuditManager`
  Returns the maximum number of days to keep audit information. Once the limit has been reached audit files that contain information that exceed the limit will be deleted.

  Specified by:
    `getMaxDays` in interface `AuditManager`
  Returns:
    the maximum number of days to keep audit information or -1 for unlimited

### setMaxDays

    public void setMaxDays(int count)

  Description copied from interface: `AuditManager`
  Set the the maximum number of days to keep audit information.

  Specified by:
    `setMaxDays` in interface `AuditManager`
  Parameters:
    `count` - the maximum number of days to keep audit information or -1 for unlimited

### getLogTimeout

    public int getLogTimeout()

  Description copied from interface: `AuditManager`
  Returns the time in milliseconds between successive executions of the task that will save the queued audited packets to a permanent store.

  Specified by:
    `getLogTimeout` in interface `AuditManager`
  Returns:
    the time in milliseconds between successive executions of the task that will save the queued audited packets to a permanent store.

### setLogTimeout

    public void setLogTimeout(int logTimeout)

  Description copied from interface: `AuditManager`
  Sets the time in milliseconds between successive executions of the task that will save the queued audited packets to a permanent store.

  Specified by:
    `setLogTimeout` in interface `AuditManager`
  Parameters:
    `logTimeout` - the time in milliseconds between successive executions of the task that will save the queued audited packets to a permanent store.

### getLogDir

    public String getLogDir()

  Description copied from interface: `AuditManager`
  Returns the absolute path to the directory where the audit log files will be saved.

  Specified by:
    `getLogDir` in interface `AuditManager`
  Returns:
    the absolute path to the directory where the audit log files will be saved.

### setLogDir

    public void setLogDir(String logDir)

  Description copied from interface: `AuditManager`
  Sets the absolute path to the directory where the audit log files will be saved.

  Specified by:
    `setLogDir` in interface `AuditManager`
  Parameters:
    `logDir` - the absolute path to the directory where the audit log files will be saved.

### isAuditMessage

    public boolean isAuditMessage()

  Description copied from interface: `AuditManager`

  Determines if the server will audit all message packets.

  This is a speed optimization and convenience for logging all message packets rather than using an XPath expression.

  Specified by:
    `isAuditMessage` in interface `AuditManager`
  Returns:
    true if all messages are to be audited

### setAuditMessage

    public void setAuditMessage(boolean auditMessage)

  Description copied from interface: `AuditManager`

  Enables or disables the server auditing of all message packets.

  This is a speed optimization and convenience for logging all message packets rather than using an XPath expression.

  Specified by:
    `setAuditMessage` in interface `AuditManager`
  Parameters:
    `auditMessage` - True if all messages are to be audited

### isAuditPresence

    public boolean isAuditPresence()

  Description copied from interface: `AuditManager`

  Determines if the server will audit all presence packets.

  This is a speed optimization and convenience for logging all presence packets rather than using an XPath expression.

  Specified by:
    `isAuditPresence` in interface `AuditManager`
  Returns:
    True if all presence are to be audited

### setAuditPresence

    public void setAuditPresence(boolean auditPresence)

  Description copied from interface: `AuditManager`

  Enables or disables the server auditing of all presence packets.

  This is a speed optimization and convenience for logging all presence packets rather than using an XPath expression.

  Specified by:
    `setAuditPresence` in interface `AuditManager`
  Parameters:
    `auditPresence` - True if all presence are to be audited

### isAuditIQ

    public boolean isAuditIQ()

  Description copied from interface: `AuditManager`

  Determines if the server will audit all iq packets.

  This is a speed optimization and convenience for logging all iq packets rather than using an XPath expression.

  Specified by:
    `isAuditIQ` in interface `AuditManager`
  Returns:
    True if all iq are to be audited

### setAuditIQ

    public void setAuditIQ(boolean auditIQ)

  Description copied from interface: `AuditManager`
  Enables or disables the server auditing of all iq packets. This is a speed optimization and convenience for logging all iq packets rather than using an XPath expression.

  Specified by:
    `setAuditIQ` in interface `AuditManager`
  Parameters:
    `auditIQ` - true if all iq are to be audited.

### isAuditXPath

    public boolean isAuditXPath()

  Description copied from interface: `AuditManager`
  Determines if the server will audit packets using XPath expressions. XPath expressions provide a lot of power in specifying what is logged. However, it is much more compute intensive than other techniques and requires all packets be transformed into DOM objects (which can be computationally expensive).

  Specified by:
    `isAuditXPath` in interface `AuditManager`
  Returns:
    true if XPath expressions should be audited.

### setAuditXPath

    public void setAuditXPath(boolean auditXPath)

  Description copied from interface: `AuditManager`

  Enables/disables server auditing of packets using XPath expressions.

  XPath expressions provide a lot of power in specifying what is logged. However, it is much more compute intensive than other techniques and requires all packets be transformed into DOM objects (which can be computationally expensive).

  Specified by:
    `setAuditXPath` in interface `AuditManager`
  Parameters:
    `auditXPath` - true if XPath expressions should be audited

### addXPath

    public void addXPath(String xpathExpression)

  Description copied from interface: `AuditManager`
  Adds an XPath expression to be used for filtering packets to be audited. XPath expressions aren't evaluated or used for filtering unless isAuditXPath() returns true.

  Specified by:
    `addXPath` in interface `AuditManager`
  Parameters:
    `xpathExpression` - the xpath expression to add to the list of auditing filters.

### removeXPath

    public void removeXPath(String xpathExpression)

  Description copied from interface: `AuditManager`

  Removes the XPath expression from the set being used for filtering packets to be audited.

  XPath expressions aren't evaluated or used for filtering unless isAuditXPath() returns true.

  Specified by:
    `removeXPath` in interface `AuditManager`
  Parameters:
    `xpathExpression` - The xpath expression to remove from the list of auditing filters

### getXPathFilters

    public Iterator getXPathFilters()

  Description copied from interface: `AuditManager`

  Obtain an iterator over the XPath expressions (Strings) currently registered with the audit manager.

  XPath expressions aren't evaluated or used for filtering unless isAuditXPath() returns true.

  Specified by:
    `getXPathFilters` in interface `AuditManager`
  Returns:
    An iterator of all XPath expressions the audit manager is using

### setIgnoreList

    public void setIgnoreList(Collection<String> usernames)

  Description copied from interface: `AuditManager`
  Sets the list of usernames that won't be audited. Packets sent or received by any of these users will be ignored by the auditor.

  Specified by:
    `setIgnoreList` in interface `AuditManager`
  Parameters:
    `usernames` - the list of usernames that won't be audited.

### getIgnoreList

    public Collection<String> getIgnoreList()

  Description copied from interface: `AuditManager`
  Returns the list of usernames that won't be audited. Packets sent or received by any of these users will be ignored by the auditor.

  Specified by:
    `getIgnoreList` in interface `AuditManager`
  Returns:
    the list of usernames that won't be audited.

### initialize

    public void initialize(XMPPServer server)

  Description copied from class: `BasicModule`

  Initializes the basic module.

  Inheriting classes that choose to override this method MUST call this initialize() method before accessing BasicModule resources.

  Specified by:
    `initialize` in interface `Module`
  Overrides:
    `initialize` in class `BasicModule`
  Parameters:
    `server` - the server hosting this module.

### stop

    public void stop()

  Description copied from class: `BasicModule`

  Stops the basic module.

  Inheriting classes that choose to override this method MUST call this stop() method before accessing BasicModule resources.

  Specified by:
    `stop` in interface `Module`
  Overrides:
    `stop` in class `BasicModule`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Openfire 3.4.3 Javadoc
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2007 Jive Software.