org.apache.log4j.xml
クラス XMLDecoder

java.lang.Object
  上位を拡張 org.apache.log4j.xml.XMLDecoder
すべての実装されたインタフェース:
Decoder

public class XMLDecoder
extends java.lang.Object
implements Decoder

Decodes Logging Events in XML formated into elements that are used by Chainsaw. This decoder can process a collection of log4j:event nodes ONLY (no XML declaration nor eventSet node) NOTE: Only a single LoggingEvent is returned from the decode method even though the DTD supports multiple events nested in an eventSet. NOTE: This class has been created on the assumption that all XML log files are encoded in UTF-8. There is no current support for any other encoding format at this time.

作成者:
Scott Deboy (sdeboy@apache.org), Paul Smith (psmith@apache.org)

コンストラクタの概要
XMLDecoder()
          Create new instance.
XMLDecoder(java.awt.Component o)
          Create new instance.
 
メソッドの概要
 org.apache.log4j.spi.LoggingEvent decode(java.lang.String data)
          Converts the string data into an XML Document, and then soaks out the relevant bits to form a new LoggingEvent instance which can be used by any Log4j element locally.
 java.util.Vector decode(java.net.URL url)
          Decodes a File into a Vector of LoggingEvents.
 java.util.Vector decodeEvents(java.lang.String document)
          Decodes a String representing a number of events into a Vector of LoggingEvents.
 void setAdditionalProperties(java.util.Map properties)
          Sets an additionalProperty map, where each Key/Value pair is automatically added to each LoggingEvent as it is decoded.
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

XMLDecoder

public XMLDecoder(java.awt.Component o)
Create new instance.

パラメータ:
o - owner

XMLDecoder

public XMLDecoder()
Create new instance.

メソッドの詳細

setAdditionalProperties

public void setAdditionalProperties(java.util.Map properties)
Sets an additionalProperty map, where each Key/Value pair is automatically added to each LoggingEvent as it is decoded. This is useful, say, to include the source file name of the Logging events

定義:
インタフェース Decoder 内の setAdditionalProperties
パラメータ:
properties - additional properties

decode

public java.util.Vector decode(java.net.URL url)
                        throws java.io.IOException
Decodes a File into a Vector of LoggingEvents.

定義:
インタフェース Decoder 内の decode
パラメータ:
url - the url of a file containing events to decode
戻り値:
Vector of LoggingEvents
例外:
java.io.IOException - if IO error during processing.

decodeEvents

public java.util.Vector decodeEvents(java.lang.String document)
Decodes a String representing a number of events into a Vector of LoggingEvents.

定義:
インタフェース Decoder 内の decodeEvents
パラメータ:
document - to decode events from
戻り値:
Vector of LoggingEvents

decode

public org.apache.log4j.spi.LoggingEvent decode(java.lang.String data)
Converts the string data into an XML Document, and then soaks out the relevant bits to form a new LoggingEvent instance which can be used by any Log4j element locally.

定義:
インタフェース Decoder 内の decode
パラメータ:
data - XML fragment
戻り値:
a single LoggingEvent or null


Copyright © 2010 Apache Software Foundation. All Rights Reserved.