Module org.firebirdsql.jaybird
Package org.firebirdsql.management

# Interface TraceManager

All Superinterfaces:
  `AttachmentProperties`, `BaseProperties`, `ServiceConnectionProperties`, `ServiceManager`

All Known Implementing Classes:
  `FBTraceManager`

public interface TraceManager extends ServiceManager
Implements the Trace/Audit API available new in Firebird 2.5.

This functionality includes:

- Starting a new trace session
- Stopping an existing trace session
- Suspending an existing trace session
- Resuming a suspended trace session
- Retrieving a list of trace sessions

Author:
  Thomas Steinmaurer

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Integer`
  `getSessionId(String sessionName)`
  Gets the sessionId for the given name.
  `void`
  `listTraceSessions()`
  List all currently registered trace sessions
  `void`
  `resumeTraceSession(int traceSessionId)`
  Resumes a trace session with the given trace session ID
  `void`
  `startTraceSession(String traceSessionName, String configuration)`
  Starts a trace session with an optioanl trace session name and configuration
  `void`
  `stopTraceSession(int traceSessionId)`
  Stops a trace session with the given trace session ID
  `void`
  `suspendTraceSession(int traceSessionId)`
  Suspends a trace session with the given trace session ID

  ### Methods inherited from interface org.firebirdsql.jaybird.props.AttachmentProperties

  `getAuthPlugins, getCharSet, getConnectTimeout, getDbCryptConfig, getEnableProtocol, getEncoding, getParallelWorkers, getPassword, getPortNumber, getProcessId, getProcessName, getRoleName, getServerName, getSocketBufferSize, getSocketFactory, getSoTimeout, getType, getUser, getWireCrypt, isWireCompression, setAuthPlugins, setCharSet, setConnectTimeout, setDbCryptConfig, setEnableProtocol, setEncoding, setParallelWorkers, setPassword, setPortNumber, setProcessId, setProcessName, setRoleName, setServerName, setSocketBufferSize, setSocketFactory, setSoTimeout, setType, setUser, setWireCompression, setWireCrypt`

  ### Methods inherited from interface org.firebirdsql.jaybird.props.BaseProperties

  `connectionPropertyValues, getBooleanProperty, getBooleanProperty, getIntProperty, getIntProperty, getProperty, getProperty, setBooleanProperty, setIntProperty, setProperty`

  ### Methods inherited from interface org.firebirdsql.jaybird.props.ServiceConnectionProperties

  `getExpectedDb, getServiceName, setExpectedDb, setServiceName`

  ### Methods inherited from interface org.firebirdsql.management.ServiceManager

  `getDatabase, getHost, getLogger, getPort, getServerVersion, getWireCryptAsEnum, setDatabase, setHost, setLogger, setPort, setWireCryptAsEnum`

- ## Method Details

  - ### startTraceSession

    void startTraceSession(String traceSessionName, String configuration) throws SQLException
    Starts a trace session with an optioanl trace session name and configuration
    Parameters:
      `traceSessionName` - The trace session name (optional)
      `configuration` - The trace configuration. For an example, look into fbtrace.conf in the root directory of your Firebird installation
    Throws:
      `SQLException`

  - ### stopTraceSession

    void stopTraceSession(int traceSessionId) throws SQLException
    Stops a trace session with the given trace session ID
    Parameters:
      `traceSessionId` - The trace session ID
    Throws:
      `SQLException`

  - ### suspendTraceSession

    void suspendTraceSession(int traceSessionId) throws SQLException
    Suspends a trace session with the given trace session ID
    Parameters:
      `traceSessionId` - The trace session ID
    Throws:
      `SQLException`

  - ### resumeTraceSession

    void resumeTraceSession(int traceSessionId) throws SQLException
    Resumes a trace session with the given trace session ID
    Parameters:
      `traceSessionId` - The trace session ID
    Throws:
      `SQLException`

  - ### listTraceSessions

    void listTraceSessions() throws SQLException
    List all currently registered trace sessions
    Throws:
      `SQLException`

  - ### getSessionId

    Integer getSessionId(String sessionName)
    Gets the sessionId for the given name.

    Returns null if the sessionName does not exist or hasn't been initialized yet.

    If multiple sessions are started with the same name, the last one is returned.

    Parameters:
      `sessionName` - Name of the session
    Returns:
      ID of the session or null otherwise