|
Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client 11g Release 1 (11.1.1) E17503-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectoracle.adfnmc.java.util.logging.Handler
public abstract class Handler
A Handler
object accepts a logging request and exports the
desired messages to a target, for example, a file, the console, etc. It can
be disabled by setting its logging level to Level.OFF
.
Field Summary | |
---|---|
protected java.lang.String |
prefix
|
Constructor Summary | |
---|---|
protected |
Handler()
Constructs a Handler object with a default error manager,
the default encoding, and the default logging level
Level.ALL . |
Method Summary | |
---|---|
abstract void |
close()
Closes this handler. |
abstract void |
flush()
Flushes any buffered output. |
java.lang.String |
getEncoding()
Gets the character encoding used by this handler. |
ErrorManager |
getErrorManager()
Gets the error manager used by this handler to report errors during logging. |
Filter |
getFilter()
Gets the filter used by this handler. |
Formatter |
getFormatter()
Gets the formatter used by this handler to format the logging messages. |
Level |
getLevel()
Gets the logging level of this handler. |
boolean |
isLoggable(LogRecord record)
Determines whether the supplied log record need to be logged. |
abstract void |
publish(LogRecord record)
Accepts an actual logging request. |
protected void |
reportError(java.lang.String msg,
java.lang.Exception ex,
int code)
Report an error to the error manager associated with this handler. |
void |
setEncoding(java.lang.String encoding)
Sets the character encoding used by this handler. |
void |
setErrorManager(ErrorManager em)
Sets the error manager for this handler. |
void |
setFilter(Filter newFilter)
Sets the filter to be used by this handler. |
void |
setFormatter(Formatter newFormatter)
Sets the formatter to be used by this handler. |
void |
setLevel(Level newLevel)
Sets the logging level of this handler. |
protected void |
setPrefix(java.lang.String prefix)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String prefix
Constructor Detail |
---|
protected Handler()
Handler
object with a default error manager,
the default encoding, and the default logging level
Level.ALL
. It has no filter and no formatter.
Method Detail |
---|
protected void setPrefix(java.lang.String prefix)
public abstract void close()
java.lang.SecurityException
- If a security manager determines that the caller does not
have the required permission.public abstract void flush()
public abstract void publish(LogRecord record)
record
- the log record to be loggedpublic java.lang.String getEncoding()
public ErrorManager getErrorManager()
java.lang.SecurityException
- If a security manager determines that the caller does not
have the required permission.public Filter getFilter()
public Formatter getFormatter()
public Level getLevel()
public boolean isLoggable(LogRecord record)
record
- the log record to be checked
true
if the supplied log record need to be logged,
otherwise false
protected void reportError(java.lang.String msg, java.lang.Exception ex, int code)
msg
- the error messageex
- the associated exceptioncode
- the error codepublic void setEncoding(java.lang.String encoding) throws java.lang.SecurityException, java.io.UnsupportedEncodingException
null
value indicates the using of the default encoding.
encoding
- the character encoding to set
java.lang.SecurityException
- If a security manager determines that the caller does not
have the required permission.
java.io.UnsupportedEncodingException
- If the specified encoding is not supported by the runtime.public void setErrorManager(ErrorManager em)
em
- the error manager to set
java.lang.SecurityException
- If a security manager determines that the caller does not
have the required permission.public void setFilter(Filter newFilter)
newFilter
- the filter to set
java.lang.SecurityException
- If a security manager determines that the caller does not
have the required permission.public void setFormatter(Formatter newFormatter)
newFormatter
- the formatter to set
java.lang.SecurityException
- If a security manager determines that the caller does not
have the required permission.public void setLevel(Level newLevel)
newLevel
- the logging level to set
java.lang.SecurityException
- If a security manager determines that the caller does not
have the required permission.
|
Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile Client 11g Release 1 (11.1.1) E17503-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |