Class OutputLogInterceptor

java.lang.Object
org.exolab.castor.persist.OutputLogInterceptor
All Implemented Interfaces:
LogInterceptor

public class OutputLogInterceptor extends 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 Details

    • OutputLogInterceptor

      public OutputLogInterceptor(PrintWriter writer)
    • OutputLogInterceptor

      public OutputLogInterceptor(OutputStream output)
    • OutputLogInterceptor

      public OutputLogInterceptor(Writer writer)
  • Method Details

    • loading

      public void loading(Object objClass, Object identity)
      Description copied from interface: LogInterceptor
      Called 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:
      loading in interface LogInterceptor
      Parameters:
      objClass - The type of the object
      identity - The object identity
    • creating

      public void creating(Object objClass, Object identity)
      Description copied from interface: LogInterceptor
      Called 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:
      creating in interface LogInterceptor
      Parameters:
      objClass - The type of the object
      identity - The object identity
    • removing

      public void removing(Object objClass, Object identity)
      Description copied from interface: LogInterceptor
      Called 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:
      removing in interface LogInterceptor
      Parameters:
      objClass - The type of the object
      identity - The object identity
    • storing

      public void storing(Object objClass, Object identity)
      Description copied from interface: LogInterceptor
      Called 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:
      storing in interface LogInterceptor
      Parameters:
      objClass - The type of the object
      identity - The object identity
    • storeStatement

      public void storeStatement(String statement)
      Description copied from interface: LogInterceptor
      Reports 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:
      storeStatement in interface LogInterceptor
      Parameters:
      statement - The storage statement
    • queryStatement

      public void queryStatement(String statement)
      Description copied from interface: LogInterceptor
      Reports 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:
      queryStatement in interface LogInterceptor
      Parameters:
      statement - The query statement
    • message

      public void message(String message)
      Description copied from interface: LogInterceptor
      Reports a message of some sort that is not delivered to the application. Only the interceptor will be notified of this message.
      Specified by:
      message in interface LogInterceptor
      Parameters:
      message - The reported message
    • exception

      public void exception(Exception except)
      Description copied from interface: LogInterceptor
      Reports an exception of some sort that is not delivered to the application. Only the interceptor will be notified of this exception.
      Specified by:
      exception in interface LogInterceptor
      Parameters:
      except - The exception
    • getPrintWriter

      public PrintWriter getPrintWriter()
      Description copied from interface: LogInterceptor
      Returns the PrintWriter for this LogInterceptor.
      Specified by:
      getPrintWriter in interface LogInterceptor