com.mycila.log.jdk.hook
Class MycilaInvocationHandler<T extends java.util.logging.Handler>

java.lang.Object
  extended by com.mycila.log.jdk.hook.MycilaInvocationHandler<T>
All Implemented Interfaces:
InvocationHandler<T>
Direct Known Subclasses:
AsyncInvocationHandler

public class MycilaInvocationHandler<T extends java.util.logging.Handler>
extends java.lang.Object
implements InvocationHandler<T>

Author:
Mathieu Carbou (mathieu.carbou@gmail.com)

Constructor Summary
MycilaInvocationHandler()
           
 
Method Summary
 void close(T handler)
           
 void flush(T handler)
           
 java.lang.String getEncoding(T handler)
           
 java.util.logging.ErrorManager getErrorManager(T handler)
           
 java.util.logging.Filter getFilter(T handler)
           
 java.util.logging.Formatter getFormatter(T handler)
           
 java.util.logging.Level getLevel(T handler)
           
 boolean isLoggable(T handler, java.util.logging.LogRecord record)
           
 void publish(T handler, java.util.logging.LogRecord record)
           
 void setEncoding(T handler, java.lang.String encoding)
           
 void setErrorManager(T handler, java.util.logging.ErrorManager em)
           
 void setFilter(T handler, java.util.logging.Filter newFilter)
           
 void setFormatter(T handler, java.util.logging.Formatter newFormatter)
           
 void setLevel(T handler, java.util.logging.Level newLevel)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MycilaInvocationHandler

public MycilaInvocationHandler()
Method Detail

publish

public void publish(T handler,
                    java.util.logging.LogRecord record)
Specified by:
publish in interface InvocationHandler<T extends java.util.logging.Handler>

flush

public void flush(T handler)
Specified by:
flush in interface InvocationHandler<T extends java.util.logging.Handler>

close

public void close(T handler)
           throws java.lang.SecurityException
Specified by:
close in interface InvocationHandler<T extends java.util.logging.Handler>
Throws:
java.lang.SecurityException

setFormatter

public void setFormatter(T handler,
                         java.util.logging.Formatter newFormatter)
                  throws java.lang.SecurityException
Specified by:
setFormatter in interface InvocationHandler<T extends java.util.logging.Handler>
Throws:
java.lang.SecurityException

getFormatter

public java.util.logging.Formatter getFormatter(T handler)
Specified by:
getFormatter in interface InvocationHandler<T extends java.util.logging.Handler>

setEncoding

public void setEncoding(T handler,
                        java.lang.String encoding)
                 throws java.lang.SecurityException,
                        java.io.UnsupportedEncodingException
Specified by:
setEncoding in interface InvocationHandler<T extends java.util.logging.Handler>
Throws:
java.lang.SecurityException
java.io.UnsupportedEncodingException

getEncoding

public java.lang.String getEncoding(T handler)
Specified by:
getEncoding in interface InvocationHandler<T extends java.util.logging.Handler>

setFilter

public void setFilter(T handler,
                      java.util.logging.Filter newFilter)
               throws java.lang.SecurityException
Specified by:
setFilter in interface InvocationHandler<T extends java.util.logging.Handler>
Throws:
java.lang.SecurityException

getFilter

public java.util.logging.Filter getFilter(T handler)
Specified by:
getFilter in interface InvocationHandler<T extends java.util.logging.Handler>

setErrorManager

public void setErrorManager(T handler,
                            java.util.logging.ErrorManager em)
Specified by:
setErrorManager in interface InvocationHandler<T extends java.util.logging.Handler>

getErrorManager

public java.util.logging.ErrorManager getErrorManager(T handler)
Specified by:
getErrorManager in interface InvocationHandler<T extends java.util.logging.Handler>

setLevel

public void setLevel(T handler,
                     java.util.logging.Level newLevel)
              throws java.lang.SecurityException
Specified by:
setLevel in interface InvocationHandler<T extends java.util.logging.Handler>
Throws:
java.lang.SecurityException

getLevel

public java.util.logging.Level getLevel(T handler)
Specified by:
getLevel in interface InvocationHandler<T extends java.util.logging.Handler>

isLoggable

public boolean isLoggable(T handler,
                          java.util.logging.LogRecord record)
Specified by:
isLoggable in interface InvocationHandler<T extends java.util.logging.Handler>


Copyright © 2008-2010 Mycila. All Rights Reserved.