Oracle Fusion Middleware Java API Reference for Oracle ADF Share
11g Release 1 (11.1.1.6.0)

E10686-07

oracle.adf.share.logging.internal
Class BaseFileHandler

java.lang.Object
  extended by java.util.logging.Handler
      extended by java.util.logging.StreamHandler
          extended by java.util.logging.FileHandler
              extended by oracle.adf.share.logging.internal.BaseFileHandler
Direct Known Subclasses:
AnalyticsFileHandler, PerfFileHandler

public class BaseFileHandler
extends java.util.logging.FileHandler

Base file logging handler for both performance and business analytics logging


Constructor Summary
protected BaseFileHandler(java.lang.String pattern, int limit, int count, boolean append, int bufSize)
          Constructor to create a file based handler
 
Method Summary
protected  java.lang.String addRecordToList(java.util.logging.LogRecord record, java.lang.String ecid)
          Add a record to the LinkedList identified by ECID.
 void flush()
          Flush the map entry identified by current ecid from internal logging buffer.
protected  java.lang.String getLeastAccessedECID()
          Return the least accessed ECID.
protected  boolean isBufferFull()
          Is buffer mLogRecordBuffer full(too many requests in the buffer)?
protected  boolean isRecordListTooLong(java.lang.String ecid)
          Does the length of log records exceend LOGRECORDS_PER_LINE?
protected  void printList(java.lang.String ecid, java.util.LinkedList recordList)
          Print the log record list based on ecid
protected  java.util.LinkedList removeList(java.lang.String ecid)
          Remove the linked list from buffer based on ECID
protected  void reportError(java.lang.String msg, java.lang.Exception ex, int code)
          This is the standard logging error reporting mechanism used by JUL handlers.
 
Methods inherited from class java.util.logging.FileHandler
close, publish
 
Methods inherited from class java.util.logging.StreamHandler
isLoggable, setEncoding, setOutputStream
 
Methods inherited from class java.util.logging.Handler
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, setErrorManager, setFilter, setFormatter, setLevel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseFileHandler

protected BaseFileHandler(java.lang.String pattern,
                          int limit,
                          int count,
                          boolean append,
                          int bufSize)
                   throws java.io.IOException,
                          java.lang.SecurityException
Constructor to create a file based handler

Parameters:
pattern - log file name pattern
limit - log file size limit
count - number of log files
append - true means log contents being appended to the existing file. false means the existing log file is truncated.
bufSize - the size of internal buffer to hold specified number of request log line. Each request normally generates only one line performanc logging entry and business analytics entry.
Throws:
java.io.IOException
java.lang.SecurityException
Method Detail

flush

public void flush()
Flush the map entry identified by current ecid from internal logging buffer. This function should be called by ADF framework.

Overrides:
flush in class java.util.logging.StreamHandler

addRecordToList

protected java.lang.String addRecordToList(java.util.logging.LogRecord record,
                                           java.lang.String ecid)
Add a record to the LinkedList identified by ECID. Create a new LinkedList if necessary.


isBufferFull

protected boolean isBufferFull()
Is buffer mLogRecordBuffer full(too many requests in the buffer)?


isRecordListTooLong

protected boolean isRecordListTooLong(java.lang.String ecid)
Does the length of log records exceend LOGRECORDS_PER_LINE?


getLeastAccessedECID

protected java.lang.String getLeastAccessedECID()
Return the least accessed ECID. This is supported by the iterator of LinkedHashMap.


removeList

protected java.util.LinkedList removeList(java.lang.String ecid)
Remove the linked list from buffer based on ECID


printList

protected void printList(java.lang.String ecid,
                         java.util.LinkedList recordList)
Print the log record list based on ecid


reportError

protected void reportError(java.lang.String msg,
                           java.lang.Exception ex,
                           int code)
This is the standard logging error reporting mechanism used by JUL handlers.

Overrides:
reportError in class java.util.logging.Handler

Oracle Fusion Middleware Java API Reference for Oracle ADF Share
11g Release 1 (11.1.1.6.0)

E10686-07

Copyright © 1997, 2011, Oracle. All rights reserved.