public class ProxyHandler extends Handler
Handler
that redirects all method calls to a delegate, which can be changed at runtime.Constructor and Description |
---|
ProxyHandler()
Constructs a proxy handler without a delegate.
|
ProxyHandler(Handler delegate) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
flush() |
String |
getEncoding() |
ErrorManager |
getErrorManager() |
Filter |
getFilter() |
Formatter |
getFormatter() |
Level |
getLevel() |
boolean |
isLoggable(LogRecord record) |
void |
publish(LogRecord record) |
void |
setDelegate(Handler delegate)
Changes the delegate handler.
|
void |
setEncoding(String encoding) |
void |
setErrorManager(ErrorManager errorManager) |
void |
setFilter(Filter newFilter) |
void |
setFormatter(Formatter formatter) |
void |
setLevel(Level level) |
reportError
public ProxyHandler()
public ProxyHandler(@Nullable Handler delegate)
delegate
- null
if a delegate is not (yet) desiredpublic void setDelegate(@Nullable Handler delegate)
delegate
- null
if a delegate is no longer desired@Nullable public Formatter getFormatter()
getFormatter
in class Handler
@Nullable public String getEncoding()
getEncoding
in class Handler
@Nullable public ErrorManager getErrorManager()
getErrorManager
in class Handler
public void setFormatter(@Nullable Formatter formatter) throws SecurityException
setFormatter
in class Handler
SecurityException
public void setEncoding(@Nullable String encoding) throws SecurityException, UnsupportedEncodingException
setEncoding
in class Handler
SecurityException
UnsupportedEncodingException
public void setFilter(@Nullable Filter newFilter) throws SecurityException
setFilter
in class Handler
SecurityException
public void setErrorManager(@Nullable ErrorManager errorManager)
setErrorManager
in class Handler
public void setLevel(@Nullable Level level) throws SecurityException
setLevel
in class Handler
SecurityException
public boolean isLoggable(@Nullable LogRecord record)
isLoggable
in class Handler
public void close() throws SecurityException
close
in class Handler
SecurityException
Copyright © 2018 Arno Unkrig. All rights reserved.