Class OutputLogInterceptor
- java.lang.Object
-
- org.exolab.castor.persist.OutputLogInterceptor
-
- All Implemented Interfaces:
LogInterceptor
public class OutputLogInterceptor extends java.lang.Object implements LogInterceptor
A simple log interceptor that reports all messages to a writer or an output stream.- Version:
- $Revision: 7089 $ $Date: 2003-03-03 00:05:44 -0700 (Mon, 03 Mar 2003) $
- Author:
- Assaf Arkin
-
-
Constructor Summary
Constructors Constructor Description OutputLogInterceptor(java.io.OutputStream output)OutputLogInterceptor(java.io.PrintWriter writer)OutputLogInterceptor(java.io.Writer writer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreating(java.lang.Object objClass, java.lang.Object identity)Called to indicate that an object of the given type and identity is about to be created in persistent storage.voidexception(java.lang.Exception except)Reports an exception of some sort that is not delivered to the application.java.io.PrintWritergetPrintWriter()Returns the PrintWriter for this LogInterceptor.voidloading(java.lang.Object objClass, java.lang.Object identity)Called to indicate that an object of the given type and identity is about to be loaded into memory.voidmessage(java.lang.String message)Reports a message of some sort that is not delivered to the application.voidqueryStatement(java.lang.String statement)Reports a statement that will be used with the persistent engine to conduct a query.voidremoving(java.lang.Object objClass, java.lang.Object identity)Called to indicate that an object of the given type and identity is about to be deleted from persistent storage.voidstoreStatement(java.lang.String statement)Reports a statement that will be used with the persistent engine.voidstoring(java.lang.Object objClass, java.lang.Object identity)Called to indicate that an object of the given type and identity is about to be stored in persistent storage.
-
-
-
Method Detail
-
loading
public void loading(java.lang.Object objClass, java.lang.Object identity)Description copied from interface:LogInterceptorCalled to indicate that an object of the given type and identity is about to be loaded into memory.This method is called when the cache engine decides to explicitly load the specified object from persistent storage and not use a cached copy. It is called prior to the retrieval.
- Specified by:
loadingin interfaceLogInterceptor- Parameters:
objClass- The type of the objectidentity- The object identity
-
creating
public void creating(java.lang.Object objClass, java.lang.Object identity)Description copied from interface:LogInterceptorCalled to indicate that an object of the given type and identity is about to be created in persistent storage.This method is called when the cache engine decides to explicitly create the specified object in persistent storage, either in response to a create method or upon transaction commit. It is called prior to the creation.
- Specified by:
creatingin interfaceLogInterceptor- Parameters:
objClass- The type of the objectidentity- The object identity
-
removing
public void removing(java.lang.Object objClass, java.lang.Object identity)Description copied from interface:LogInterceptorCalled to indicate that an object of the given type and identity is about to be deleted from persistent storage.This method is called when the cache engine decides to explicitly delete the specified object from persistent storage, either in response to a delete method or upon transaction commit. It is called prior to the deletion.
- Specified by:
removingin interfaceLogInterceptor- Parameters:
objClass- The type of the objectidentity- The object identity
-
storing
public void storing(java.lang.Object objClass, java.lang.Object identity)Description copied from interface:LogInterceptorCalled to indicate that an object of the given type and identity is about to be stored in persistent storage.This method is called when the cache engine decides to explicitly store the specified object in persistent storage, after detecting a modification in this object. It is called prior to storage.
- Specified by:
storingin interfaceLogInterceptor- Parameters:
objClass- The type of the objectidentity- The object identity
-
storeStatement
public void storeStatement(java.lang.String statement)
Description copied from interface:LogInterceptorReports a statement that will be used with the persistent engine.The SQL engine uses this method to report all the select, update, insert statements it creates upon initialization.
- Specified by:
storeStatementin interfaceLogInterceptor- Parameters:
statement- The storage statement
-
queryStatement
public void queryStatement(java.lang.String statement)
Description copied from interface:LogInterceptorReports a statement that will be used with the persistent engine to conduct a query.The SQL engine uses this method to report select statements when running new queries.
- Specified by:
queryStatementin interfaceLogInterceptor- Parameters:
statement- The query statement
-
message
public void message(java.lang.String message)
Description copied from interface:LogInterceptorReports a message of some sort that is not delivered to the application. Only the interceptor will be notified of this message.- Specified by:
messagein interfaceLogInterceptor- Parameters:
message- The reported message
-
exception
public void exception(java.lang.Exception except)
Description copied from interface:LogInterceptorReports an exception of some sort that is not delivered to the application. Only the interceptor will be notified of this exception.- Specified by:
exceptionin interfaceLogInterceptor- Parameters:
except- The exception
-
getPrintWriter
public java.io.PrintWriter getPrintWriter()
Description copied from interface:LogInterceptorReturns the PrintWriter for this LogInterceptor.- Specified by:
getPrintWriterin interfaceLogInterceptor
-
-