Package org.firebirdsql.management
Class FBTraceManager
java.lang.Object
org.firebirdsql.management.FBServiceManager
org.firebirdsql.management.FBTraceManager
- All Implemented Interfaces:
ServiceManager,TraceManager
Implements the Trace/Audit API available new in Firebird 2.5
- Author:
- Thomas Steinmaurer
-
Field Summary
Fields inherited from class org.firebirdsql.management.FBServiceManager
BUFFER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new instance ofFBTraceManagerbased on the default GDSType.FBTraceManager(String gdsType) Create a new instance ofFBTraceManagerbased on a given GDSType.FBTraceManager(GDSType gdsType) Create a new instance ofFBTraceManagerbased on a given GDSType. -
Method Summary
Modifier and TypeMethodDescriptiongetSessionId(String sessionName) Gets the sessionId for the given name.voidList all currently registered trace sessionsloadConfigurationFromFile(String fileName) Deprecated.voidresumeTraceSession(int traceSessionId) Resumes a trace session with the given trace session IDvoidstartTraceSession(String traceSessionName, String configuration) Starts a trace session with an optional trace session name and configurationvoidstopTraceSession(int traceSessionId) Stops a trace session with the given trace session IDvoidsuspendTraceSession(int traceSessionId) Suspends a trace session with the given trace session IDMethods inherited from class org.firebirdsql.management.FBServiceManager
attachDatabase, attachServiceManager, createRequestBuffer, executeServicesOperation, executeServicesOperation, getAuthPlugins, getCharSet, getDatabase, getDbCryptConfig, getHost, getLogger, getPassword, getPort, getServerVersion, getServiceName, getUser, getWireCrypt, isWireCompression, queueService, setAuthPlugins, setCharSet, setDatabase, setDbCryptConfig, setHost, setLogger, setPassword, setPort, setUser, setWireCompression, setWireCryptMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.firebirdsql.management.ServiceManager
getAuthPlugins, getCharSet, getDatabase, getDbCryptConfig, getHost, getLogger, getPassword, getPort, getServerVersion, getUser, getWireCrypt, isWireCompression, setAuthPlugins, setCharSet, setDatabase, setDbCryptConfig, setHost, setLogger, setPassword, setPort, setUser, setWireCompression, setWireCrypt
-
Constructor Details
-
FBTraceManager
public FBTraceManager()Create a new instance ofFBTraceManagerbased on the default GDSType. -
FBTraceManager
Create a new instance ofFBTraceManagerbased on a given GDSType.- Parameters:
gdsType- type must be PURE_JAVA, EMBEDDED, or NATIVE
-
FBTraceManager
Create a new instance ofFBTraceManagerbased on a given GDSType.- Parameters:
gdsType- type must be PURE_JAVA, EMBEDDED, or NATIVE
-
-
Method Details
-
startTraceSession
Starts a trace session with an optional trace session name and configuration- Specified by:
startTraceSessionin interfaceTraceManager- 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
Stops a trace session with the given trace session ID- Specified by:
stopTraceSessionin interfaceTraceManager- Parameters:
traceSessionId- The trace session ID- Throws:
SQLException
-
suspendTraceSession
Suspends a trace session with the given trace session ID- Specified by:
suspendTraceSessionin interfaceTraceManager- Parameters:
traceSessionId- The trace session ID- Throws:
SQLException
-
resumeTraceSession
Resumes a trace session with the given trace session ID- Specified by:
resumeTraceSessionin interfaceTraceManager- Parameters:
traceSessionId- The trace session ID- Throws:
SQLException
-
listTraceSessions
List all currently registered trace sessions- Specified by:
listTraceSessionsin interfaceTraceManager- Throws:
SQLException
-
getSessionId
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.
- Specified by:
getSessionIdin interfaceTraceManager- Parameters:
sessionName- Name of the session- Returns:
- Id of the session or null otherwise
-
loadConfigurationFromFile
Deprecated.Description copied from interface:TraceManagerLoads a configuration from the specified fileName using the default character set.- Specified by:
loadConfigurationFromFilein interfaceTraceManager- Parameters:
fileName- File name- Throws:
IOException
-