org.exolab.castor.persist
Class OutputLogInterceptor

java.lang.Object
  extended by 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: 1.1.1.1 $ $Date: 2003/03/03 07:08:46 $
Author:
Assaf Arkin

Constructor Summary
OutputLogInterceptor(java.io.OutputStream output)
           
OutputLogInterceptor(java.io.PrintWriter writer)
           
OutputLogInterceptor(java.io.Writer writer)
           
 
Method Summary
 void creating(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.
 void exception(java.lang.Exception except)
          Reports an exception of some sort that is not delivered to the application.
 java.io.PrintWriter getPrintWriter()
          Returns the PrintWriter for this LogInterceptor
 void loading(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.
 void message(java.lang.String message)
          Reports a message of some sort that is not delivered to the application.
 void queryStatement(java.lang.String statement)
          Reports a statement that will be used with the persistent engine to conduct a query.
 void removing(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.
 void storeStatement(java.lang.String statement)
          Reports a statement that will be used with the persistent engine.
 void storing(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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OutputLogInterceptor

public OutputLogInterceptor(java.io.PrintWriter writer)

OutputLogInterceptor

public OutputLogInterceptor(java.io.OutputStream output)

OutputLogInterceptor

public OutputLogInterceptor(java.io.Writer writer)
Method Detail

loading

public void loading(java.lang.Object objClass,
                    java.lang.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(java.lang.Object objClass,
                     java.lang.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(java.lang.Object objClass,
                     java.lang.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(java.lang.Object objClass,
                    java.lang.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(java.lang.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(java.lang.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(java.lang.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(java.lang.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 java.io.PrintWriter getPrintWriter()
Description copied from interface: LogInterceptor
Returns the PrintWriter for this LogInterceptor

Specified by:
getPrintWriter in interface LogInterceptor


Intalio Inc. (C) 1999-2004. All rights reserved http://www.intalio.com