logging-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From carn...@apache.org
Subject svn commit: r558362 [30/33] - in /logging/site/trunk/docs/log4j/companions/receivers: ./ apidocs/ apidocs/org/ apidocs/org/apache/ apidocs/org/apache/log4j/ apidocs/org/apache/log4j/db/ apidocs/org/apache/log4j/db/class-use/ apidocs/org/apache/log4j/db...
Date Sat, 21 Jul 2007 17:50:44 GMT
Added: logging/site/trunk/docs/log4j/companions/receivers/xref/org/apache/log4j/net/XMLSocketNode.html
URL: http://svn.apache.org/viewvc/logging/site/trunk/docs/log4j/companions/receivers/xref/org/apache/log4j/net/XMLSocketNode.html?view=auto&rev=558362
==============================================================================
--- logging/site/trunk/docs/log4j/companions/receivers/xref/org/apache/log4j/net/XMLSocketNode.html (added)
+++ logging/site/trunk/docs/log4j/companions/receivers/xref/org/apache/log4j/net/XMLSocketNode.html Sat Jul 21 10:50:33 2007
@@ -0,0 +1,223 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /><title>XMLSocketNode xref</title>
+<link type="text/css" rel="stylesheet" href="../../../../stylesheet.css" />
+</head>
+<body>
+<div id="overview"><a href="../../../../../../../../../../apidocs/org/apache/log4j/net/XMLSocketNode.html">View Javadoc</a></div><pre>
+
+<a name="1" href="#1">1</a>   <em class="comment">/*</em>
+<a name="2" href="#2">2</a>   <em class="comment"> * Licensed to the Apache Software Foundation (ASF) under one or more</em>
+<a name="3" href="#3">3</a>   <em class="comment"> * contributor license agreements.  See the NOTICE file distributed with</em>
+<a name="4" href="#4">4</a>   <em class="comment"> * this work for additional information regarding copyright ownership.</em>
+<a name="5" href="#5">5</a>   <em class="comment"> * The ASF licenses this file to You under the Apache License, Version 2.0</em>
+<a name="6" href="#6">6</a>   <em class="comment"> * (the "License"); you may not use this file except in compliance with</em>
+<a name="7" href="#7">7</a>   <em class="comment"> * the License.  You may obtain a copy of the License at</em>
+<a name="8" href="#8">8</a>   <em class="comment"> *</em>
+<a name="9" href="#9">9</a>   <em class="comment"> *      <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a></em>
+<a name="10" href="#10">10</a>  <em class="comment"> *</em>
+<a name="11" href="#11">11</a>  <em class="comment"> * Unless required by applicable law or agreed to in writing, software</em>
+<a name="12" href="#12">12</a>  <em class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</em>
+<a name="13" href="#13">13</a>  <em class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</em>
+<a name="14" href="#14">14</a>  <em class="comment"> * See the License for the specific language governing permissions and</em>
+<a name="15" href="#15">15</a>  <em class="comment"> * limitations under the License.</em>
+<a name="16" href="#16">16</a>  <em class="comment"> */</em>
+<a name="17" href="#17">17</a>  
+<a name="18" href="#18">18</a>  <strong>package</strong> org.apache.log4j.net;
+<a name="19" href="#19">19</a>  
+<a name="20" href="#20">20</a>  <strong>import</strong> org.apache.log4j.*;
+<a name="21" href="#21">21</a>  <strong>import</strong> org.apache.log4j.helpers.Constants;
+<a name="22" href="#22">22</a>  <strong>import</strong> org.apache.log4j.plugins.Receiver;
+<a name="23" href="#23">23</a>  <strong>import</strong> org.apache.log4j.spi.*;
+<a name="24" href="#24">24</a>  
+<a name="25" href="#25">25</a>  <strong>import</strong> java.io.IOException;
+<a name="26" href="#26">26</a>  <strong>import</strong> java.io.InputStream;
+<a name="27" href="#27">27</a>  
+<a name="28" href="#28">28</a>  <strong>import</strong> java.net.Socket;
+<a name="29" href="#29">29</a>  
+<a name="30" href="#30">30</a>  <strong>import</strong> java.util.Iterator;
+<a name="31" href="#31">31</a>  <strong>import</strong> java.util.List;
+<a name="32" href="#32">32</a>  
+<a name="33" href="#33">33</a>  
+<a name="34" href="#34">34</a>  <em>/**<em>*</em></em>
+<a name="35" href="#35">35</a>  <em>   Read {@link LoggingEvent} objects sent from a remote client using XML over</em>
+<a name="36" href="#36">36</a>  <em>   Sockets (TCP). These logging events are logged according to local</em>
+<a name="37" href="#37">37</a>  <em>   policy, as if they were generated locally.</em>
+<a name="38" href="#38">38</a>  
+<a name="39" href="#39">39</a>  <em>   &lt;p>For example, the socket node might decide to log events to a</em>
+<a name="40" href="#40">40</a>  <em>   local file and also resent them to a second socket node.</em>
+<a name="41" href="#41">41</a>  
+<a name="42" href="#42">42</a>  <em>    @author  Scott Deboy &lt;sdeboy@apache.org>;</em>
+<a name="43" href="#43">43</a>  
+<a name="44" href="#44">44</a>  <em>    @since 0.8.4</em>
+<a name="45" href="#45">45</a>  <em>*/</em>
+<a name="46" href="#46">46</a>  <strong>public</strong> <strong>class</strong> <a href="../../../../org/apache/log4j/net/XMLSocketNode.html">XMLSocketNode</a> <strong>extends</strong> ComponentBase implements Runnable {
+<a name="47" href="#47">47</a>    Socket socket;
+<a name="48" href="#48">48</a>    Receiver receiver;
+<a name="49" href="#49">49</a>    <a href="../../../../org/apache/log4j/spi/Decoder.html">Decoder</a> decoder;
+<a name="50" href="#50">50</a>    <a href="../../../../org/apache/log4j/net/SocketNodeEventListener.html">SocketNodeEventListener</a> listener;
+<a name="51" href="#51">51</a>  
+<a name="52" href="#52">52</a>    <em>/**<em>*</em></em>
+<a name="53" href="#53">53</a>  <em>    Constructor for socket and logger repository. */</em>
+<a name="54" href="#54">54</a>    <strong>public</strong> <a href="../../../../org/apache/log4j/net/XMLSocketNode.html">XMLSocketNode</a>(
+<a name="55" href="#55">55</a>      String decoder, Socket socket, LoggerRepository hierarchy) {
+<a name="56" href="#56">56</a>      <strong>this</strong>.repository = hierarchy;
+<a name="57" href="#57">57</a>      <strong>try</strong> {
+<a name="58" href="#58">58</a>        Class c = Class.forName(decoder);
+<a name="59" href="#59">59</a>        Object o = c.newInstance();
+<a name="60" href="#60">60</a>  
+<a name="61" href="#61">61</a>        <strong>if</strong> (o instanceof Decoder) {
+<a name="62" href="#62">62</a>          <strong>this</strong>.decoder = (Decoder) o;
+<a name="63" href="#63">63</a>        }
+<a name="64" href="#64">64</a>      } <strong>catch</strong> (ClassNotFoundException cnfe) {
+<a name="65" href="#65">65</a>        getLogger().warn(<span class="string">"Unable to find decoder"</span>, cnfe);
+<a name="66" href="#66">66</a>      } <strong>catch</strong> (IllegalAccessException iae) {
+<a name="67" href="#67">67</a>        getLogger().warn(<span class="string">"Unable to construct decoder"</span>, iae);
+<a name="68" href="#68">68</a>      } <strong>catch</strong> (InstantiationException ie) {
+<a name="69" href="#69">69</a>        getLogger().warn(<span class="string">"Unable to construct decoder"</span>, ie);
+<a name="70" href="#70">70</a>      }
+<a name="71" href="#71">71</a>  
+<a name="72" href="#72">72</a>      <strong>this</strong>.socket = socket;
+<a name="73" href="#73">73</a>    }
+<a name="74" href="#74">74</a>  
+<a name="75" href="#75">75</a>    <em>/**<em>*</em></em>
+<a name="76" href="#76">76</a>  <em>    Constructor for socket and reciever. */</em>
+<a name="77" href="#77">77</a>    <strong>public</strong> <a href="../../../../org/apache/log4j/net/XMLSocketNode.html">XMLSocketNode</a>(String decoder, Socket socket, Receiver receiver) {
+<a name="78" href="#78">78</a>      <strong>try</strong> {
+<a name="79" href="#79">79</a>        Class c = Class.forName(decoder);
+<a name="80" href="#80">80</a>        Object o = c.newInstance();
+<a name="81" href="#81">81</a>  
+<a name="82" href="#82">82</a>        <strong>if</strong> (o instanceof Decoder) {
+<a name="83" href="#83">83</a>          <strong>this</strong>.decoder = (Decoder) o;
+<a name="84" href="#84">84</a>        }
+<a name="85" href="#85">85</a>      } <strong>catch</strong> (ClassNotFoundException cnfe) {
+<a name="86" href="#86">86</a>        getLogger().warn(<span class="string">"Unable to find decoder"</span>, cnfe);
+<a name="87" href="#87">87</a>      } <strong>catch</strong> (IllegalAccessException iae) {
+<a name="88" href="#88">88</a>        getLogger().warn(<span class="string">"Unable to construct decoder"</span>, iae);
+<a name="89" href="#89">89</a>      } <strong>catch</strong> (InstantiationException ie) {
+<a name="90" href="#90">90</a>        getLogger().warn(<span class="string">"Unable to construct decoder"</span>, ie);
+<a name="91" href="#91">91</a>      }
+<a name="92" href="#92">92</a>  
+<a name="93" href="#93">93</a>      <strong>this</strong>.socket = socket;
+<a name="94" href="#94">94</a>      <strong>this</strong>.receiver = receiver;
+<a name="95" href="#95">95</a>    }
+<a name="96" href="#96">96</a>  
+<a name="97" href="#97">97</a>    <em>/**<em>*</em></em>
+<a name="98" href="#98">98</a>  <em>    Set the event listener on this node. */</em>
+<a name="99" href="#99">99</a>    <strong>public</strong> <strong>void</strong> setListener(<a href="../../../../org/apache/log4j/net/SocketNodeEventListener.html">SocketNodeEventListener</a> _listener) {
+<a name="100" href="#100">100</a>     listener = _listener;
+<a name="101" href="#101">101</a>   }
+<a name="102" href="#102">102</a> 
+<a name="103" href="#103">103</a>   <strong>public</strong> <strong>void</strong> run() {
+<a name="104" href="#104">104</a>     Logger remoteLogger;
+<a name="105" href="#105">105</a>     Exception listenerException = <strong>null</strong>;
+<a name="106" href="#106">106</a>     InputStream is = <strong>null</strong>;
+<a name="107" href="#107">107</a> 
+<a name="108" href="#108">108</a>     <strong>if</strong> ((<strong>this</strong>.receiver == <strong>null</strong>) || (<strong>this</strong>.decoder == <strong>null</strong>)) {
+<a name="109" href="#109">109</a>       is = <strong>null</strong>;
+<a name="110" href="#110">110</a>       listenerException =
+<a name="111" href="#111">111</a>         <strong>new</strong> Exception(
+<a name="112" href="#112">112</a>           <span class="string">"No receiver or decoder provided.  Cannot process xml socket events"</span>);
+<a name="113" href="#113">113</a>       getLogger().error(
+<a name="114" href="#114">114</a>         <span class="string">"Exception constructing XML Socket Receiver"</span>, listenerException);
+<a name="115" href="#115">115</a>     }
+<a name="116" href="#116">116</a> 
+<a name="117" href="#117">117</a>     <strong>try</strong> {
+<a name="118" href="#118">118</a>       is = socket.getInputStream();
+<a name="119" href="#119">119</a>     } <strong>catch</strong> (Exception e) {
+<a name="120" href="#120">120</a>       is = <strong>null</strong>;
+<a name="121" href="#121">121</a>       listenerException = e;
+<a name="122" href="#122">122</a>       getLogger().error(<span class="string">"Exception opening ObjectInputStream to "</span> + socket, e);
+<a name="123" href="#123">123</a>     }
+<a name="124" href="#124">124</a> 
+<a name="125" href="#125">125</a>     <strong>if</strong> (is != <strong>null</strong>) {
+<a name="126" href="#126">126</a>       String remoteInfo =
+<a name="127" href="#127">127</a>         socket.getInetAddress().getHostName() + <span class="string">":"</span> + socket.getPort();
+<a name="128" href="#128">128</a> 
+<a name="129" href="#129">129</a>       <strong>try</strong> {
+<a name="130" href="#130">130</a>         <em class="comment">//read data from the socket</em>
+<a name="131" href="#131">131</a>         <em class="comment">//it's up to the individual decoder to handle incomplete event data</em>
+<a name="132" href="#132">132</a>         <strong>while</strong> (<strong>true</strong>) {
+<a name="133" href="#133">133</a>           byte[] b = <strong>new</strong> byte[1024];
+<a name="134" href="#134">134</a>           <strong>int</strong> length = is.read(b);
+<a name="135" href="#135">135</a>           <strong>if</strong> (length == -1) {
+<a name="136" href="#136">136</a>             getLogger().info(
+<a name="137" href="#137">137</a>               <span class="string">"no bytes read from stream - closing connection."</span>);
+<a name="138" href="#138">138</a>             <strong>break</strong>;
+<a name="139" href="#139">139</a>           }
+<a name="140" href="#140">140</a>           List v = decoder.decodeEvents(<strong>new</strong> String(b, 0, length));
+<a name="141" href="#141">141</a> 
+<a name="142" href="#142">142</a>           <strong>if</strong> (v != <strong>null</strong>) {
+<a name="143" href="#143">143</a>             Iterator iter = v.iterator();
+<a name="144" href="#144">144</a> 
+<a name="145" href="#145">145</a>             <strong>while</strong> (iter.hasNext()) {
+<a name="146" href="#146">146</a>               LoggingEvent e = (LoggingEvent) iter.next();
+<a name="147" href="#147">147</a> 
+<a name="148" href="#148">148</a>               <em class="comment">//if machinename property was not set (the case if properties</em>
+<a name="149" href="#149">149</a>               <em class="comment">//not supported by the DTD), use remoteinfo as machine name</em>
+<a name="150" href="#150">150</a>               <strong>if</strong> (e.getProperty(Constants.HOSTNAME_KEY) == <strong>null</strong>) {
+<a name="151" href="#151">151</a>                 e.setProperty(Constants.HOSTNAME_KEY, remoteInfo);
+<a name="152" href="#152">152</a>               }
+<a name="153" href="#153">153</a> 
+<a name="154" href="#154">154</a>               <em class="comment">// store the known remote info in an event property</em>
+<a name="155" href="#155">155</a>               e.setProperty(<span class="string">"log4j.remoteSourceInfo"</span>, remoteInfo);
+<a name="156" href="#156">156</a> 
+<a name="157" href="#157">157</a>               <em class="comment">// if configured with a receiver, tell it to post the event</em>
+<a name="158" href="#158">158</a>               <strong>if</strong> (receiver != <strong>null</strong>) {
+<a name="159" href="#159">159</a>                 receiver.doPost(e);
+<a name="160" href="#160">160</a> 
+<a name="161" href="#161">161</a>                 <em class="comment">// else post it via the hierarchy</em>
+<a name="162" href="#162">162</a>               } <strong>else</strong> {
+<a name="163" href="#163">163</a>                 <em class="comment">// get a logger from the hierarchy. The name of the logger</em>
+<a name="164" href="#164">164</a>                 <em class="comment">// is taken to be the name contained in the event.</em>
+<a name="165" href="#165">165</a>                 remoteLogger = repository.getLogger(e.getLoggerName());
+<a name="166" href="#166">166</a> 
+<a name="167" href="#167">167</a>                 <em class="comment">//event.logger = remoteLogger;</em>
+<a name="168" href="#168">168</a>                 <em class="comment">// apply the logger-level filter</em>
+<a name="169" href="#169">169</a>                 <strong>if</strong> (
+<a name="170" href="#170">170</a>                   e.getLevel().isGreaterOrEqual(
+<a name="171" href="#171">171</a>                       remoteLogger.getEffectiveLevel())) {
+<a name="172" href="#172">172</a>                   <em class="comment">// finally log the event as if was generated locally</em>
+<a name="173" href="#173">173</a>                   remoteLogger.callAppenders(e);
+<a name="174" href="#174">174</a>                 }
+<a name="175" href="#175">175</a>               }
+<a name="176" href="#176">176</a>             }
+<a name="177" href="#177">177</a>           }
+<a name="178" href="#178">178</a>         }
+<a name="179" href="#179">179</a>       } <strong>catch</strong> (java.io.EOFException e) {
+<a name="180" href="#180">180</a>         getLogger().info(<span class="string">"Caught java.io.EOFException closing connection."</span>);
+<a name="181" href="#181">181</a>         listenerException = e;
+<a name="182" href="#182">182</a>       } <strong>catch</strong> (java.net.SocketException e) {
+<a name="183" href="#183">183</a>         getLogger().info(
+<a name="184" href="#184">184</a>           <span class="string">"Caught java.net.SocketException closing connection."</span>);
+<a name="185" href="#185">185</a>         listenerException = e;
+<a name="186" href="#186">186</a>       } <strong>catch</strong> (IOException e) {
+<a name="187" href="#187">187</a>         getLogger().info(<span class="string">"Caught java.io.IOException: "</span> + e);
+<a name="188" href="#188">188</a>         getLogger().info(<span class="string">"Closing connection."</span>);
+<a name="189" href="#189">189</a>         listenerException = e;
+<a name="190" href="#190">190</a>       } <strong>catch</strong> (Exception e) {
+<a name="191" href="#191">191</a>         getLogger().error(<span class="string">"Unexpected exception. Closing connection."</span>, e);
+<a name="192" href="#192">192</a>         listenerException = e;
+<a name="193" href="#193">193</a>       }
+<a name="194" href="#194">194</a>     }
+<a name="195" href="#195">195</a> 
+<a name="196" href="#196">196</a>     <em class="comment">// close the socket</em>
+<a name="197" href="#197">197</a>     <strong>try</strong> {
+<a name="198" href="#198">198</a>       <strong>if</strong> (is != <strong>null</strong>) {
+<a name="199" href="#199">199</a>         is.close();
+<a name="200" href="#200">200</a>       }
+<a name="201" href="#201">201</a>     } <strong>catch</strong> (Exception e) {
+<a name="202" href="#202">202</a>       <em class="comment">//logger.info("Could not close connection.", e);</em>
+<a name="203" href="#203">203</a>     }
+<a name="204" href="#204">204</a> 
+<a name="205" href="#205">205</a>     <em class="comment">// send event to listener, if configured</em>
+<a name="206" href="#206">206</a>     <strong>if</strong> (listener != <strong>null</strong>) {
+<a name="207" href="#207">207</a>       listener.socketClosedEvent(listenerException);
+<a name="208" href="#208">208</a>     }
+<a name="209" href="#209">209</a>   }
+<a name="210" href="#210">210</a> }
+</pre>
+<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
+</html>
+

Propchange: logging/site/trunk/docs/log4j/companions/receivers/xref/org/apache/log4j/net/XMLSocketNode.html
------------------------------------------------------------------------------
    svn:mime-type = text/html

Added: logging/site/trunk/docs/log4j/companions/receivers/xref/org/apache/log4j/net/XMLSocketReceiver.html
URL: http://svn.apache.org/viewvc/logging/site/trunk/docs/log4j/companions/receivers/xref/org/apache/log4j/net/XMLSocketReceiver.html?view=auto&rev=558362
==============================================================================
--- logging/site/trunk/docs/log4j/companions/receivers/xref/org/apache/log4j/net/XMLSocketReceiver.html (added)
+++ logging/site/trunk/docs/log4j/companions/receivers/xref/org/apache/log4j/net/XMLSocketReceiver.html Sat Jul 21 10:50:33 2007
@@ -0,0 +1,288 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /><title>XMLSocketReceiver xref</title>
+<link type="text/css" rel="stylesheet" href="../../../../stylesheet.css" />
+</head>
+<body>
+<div id="overview"><a href="../../../../../../../../../../apidocs/org/apache/log4j/net/XMLSocketReceiver.html">View Javadoc</a></div><pre>
+
+<a name="1" href="#1">1</a>   <em class="comment">/*</em>
+<a name="2" href="#2">2</a>   <em class="comment"> * Licensed to the Apache Software Foundation (ASF) under one or more</em>
+<a name="3" href="#3">3</a>   <em class="comment"> * contributor license agreements.  See the NOTICE file distributed with</em>
+<a name="4" href="#4">4</a>   <em class="comment"> * this work for additional information regarding copyright ownership.</em>
+<a name="5" href="#5">5</a>   <em class="comment"> * The ASF licenses this file to You under the Apache License, Version 2.0</em>
+<a name="6" href="#6">6</a>   <em class="comment"> * (the "License"); you may not use this file except in compliance with</em>
+<a name="7" href="#7">7</a>   <em class="comment"> * the License.  You may obtain a copy of the License at</em>
+<a name="8" href="#8">8</a>   <em class="comment"> * </em>
+<a name="9" href="#9">9</a>   <em class="comment"> *      <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a></em>
+<a name="10" href="#10">10</a>  <em class="comment"> * </em>
+<a name="11" href="#11">11</a>  <em class="comment"> * Unless required by applicable law or agreed to in writing, software</em>
+<a name="12" href="#12">12</a>  <em class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</em>
+<a name="13" href="#13">13</a>  <em class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</em>
+<a name="14" href="#14">14</a>  <em class="comment"> * See the License for the specific language governing permissions and</em>
+<a name="15" href="#15">15</a>  <em class="comment"> * limitations under the License.</em>
+<a name="16" href="#16">16</a>  <em class="comment"> */</em>
+<a name="17" href="#17">17</a>  
+<a name="18" href="#18">18</a>  <strong>package</strong> org.apache.log4j.net;
+<a name="19" href="#19">19</a>  
+<a name="20" href="#20">20</a>  <strong>import</strong> java.net.ServerSocket;
+<a name="21" href="#21">21</a>  <strong>import</strong> java.net.Socket;
+<a name="22" href="#22">22</a>  <strong>import</strong> java.util.List;
+<a name="23" href="#23">23</a>  <strong>import</strong> java.util.Vector;
+<a name="24" href="#24">24</a>  
+<a name="25" href="#25">25</a>  <strong>import</strong> org.apache.log4j.plugins.Pauseable;
+<a name="26" href="#26">26</a>  <strong>import</strong> org.apache.log4j.plugins.Plugin;
+<a name="27" href="#27">27</a>  <strong>import</strong> org.apache.log4j.plugins.Receiver;
+<a name="28" href="#28">28</a>  <strong>import</strong> org.apache.log4j.spi.LoggerRepository;
+<a name="29" href="#29">29</a>  <strong>import</strong> org.apache.log4j.spi.LoggingEvent;
+<a name="30" href="#30">30</a>  
+<a name="31" href="#31">31</a>  
+<a name="32" href="#32">32</a>  <em>/**<em>*</em></em>
+<a name="33" href="#33">33</a>  <em>  XMLSocketReceiver receives a remote logging event via XML on a configured</em>
+<a name="34" href="#34">34</a>  <em>  socket and "posts" it to a LoggerRepository as if the event were</em>
+<a name="35" href="#35">35</a>  <em>  generated locally. This class is designed to receive events from</em>
+<a name="36" href="#36">36</a>  <em>  the XMLSocketAppender class (or classes that send compatible events).</em>
+<a name="37" href="#37">37</a>  
+<a name="38" href="#38">38</a>  <em>  &lt;p>Once the event has been "posted", it will be handled by the</em>
+<a name="39" href="#39">39</a>  <em>  appenders currently configured in the LoggerRespository.</em>
+<a name="40" href="#40">40</a>  
+<a name="41" href="#41">41</a>  <em>  @author Mark Womack</em>
+<a name="42" href="#42">42</a>  <em>  @author Scott Deboy &lt;sdeboy@apache.org></em>
+<a name="43" href="#43">43</a>  
+<a name="44" href="#44">44</a>  <em>    @since 1.3</em>
+<a name="45" href="#45">45</a>  <em>*/</em>
+<a name="46" href="#46">46</a>  <strong>public</strong> <strong>class</strong> <a href="../../../../org/apache/log4j/net/XMLSocketReceiver.html">XMLSocketReceiver</a> <strong>extends</strong> Receiver implements Runnable, PortBased, Pauseable {
+<a name="47" href="#47">47</a>    <strong>protected</strong> <strong>boolean</strong> active = false;
+<a name="48" href="#48">48</a>    <strong>private</strong> <strong>boolean</strong> paused;
+<a name="49" href="#49">49</a>    <em class="comment">//default to log4j xml decoder</em>
+<a name="50" href="#50">50</a>    <strong>protected</strong> String decoder = <span class="string">"org.apache.log4j.xml.XMLDecoder"</span>;
+<a name="51" href="#51">51</a>    <strong>private</strong> ServerSocket serverSocket;
+<a name="52" href="#52">52</a>    <strong>private</strong> List socketList = <strong>new</strong> Vector();
+<a name="53" href="#53">53</a>    <strong>private</strong> Thread rThread;
+<a name="54" href="#54">54</a>    <strong>public</strong> <strong>static</strong> <strong>final</strong> <strong>int</strong> DEFAULT_PORT = 4448;
+<a name="55" href="#55">55</a>    <strong>protected</strong> <strong>int</strong> port = DEFAULT_PORT;
+<a name="56" href="#56">56</a>  
+<a name="57" href="#57">57</a>    <strong>public</strong> <a href="../../../../org/apache/log4j/net/XMLSocketReceiver.html">XMLSocketReceiver</a>() {
+<a name="58" href="#58">58</a>    }
+<a name="59" href="#59">59</a>  
+<a name="60" href="#60">60</a>    <strong>public</strong> <a href="../../../../org/apache/log4j/net/XMLSocketReceiver.html">XMLSocketReceiver</a>(<strong>int</strong> _port) {
+<a name="61" href="#61">61</a>      port = _port;
+<a name="62" href="#62">62</a>    }
+<a name="63" href="#63">63</a>  
+<a name="64" href="#64">64</a>    <strong>public</strong> <a href="../../../../org/apache/log4j/net/XMLSocketReceiver.html">XMLSocketReceiver</a>(<strong>int</strong> _port, LoggerRepository _repository) {
+<a name="65" href="#65">65</a>      port = _port;
+<a name="66" href="#66">66</a>      repository = _repository;
+<a name="67" href="#67">67</a>    }
+<a name="68" href="#68">68</a>  
+<a name="69" href="#69">69</a>    <em>/**<em>*</em></em>
+<a name="70" href="#70">70</a>  <em>    Get the port to receive logging events on. */</em>
+<a name="71" href="#71">71</a>    <strong>public</strong> <strong>int</strong> getPort() {
+<a name="72" href="#72">72</a>      <strong>return</strong> port;
+<a name="73" href="#73">73</a>    }
+<a name="74" href="#74">74</a>  
+<a name="75" href="#75">75</a>    <em>/**<em>*</em></em>
+<a name="76" href="#76">76</a>  <em>    Set the port to receive logging events on. */</em>
+<a name="77" href="#77">77</a>    <strong>public</strong> <strong>void</strong> setPort(<strong>int</strong> _port) {
+<a name="78" href="#78">78</a>      port = _port;
+<a name="79" href="#79">79</a>    }
+<a name="80" href="#80">80</a>  
+<a name="81" href="#81">81</a>    <strong>public</strong> String getDecoder() {
+<a name="82" href="#82">82</a>      <strong>return</strong> decoder;
+<a name="83" href="#83">83</a>    }
+<a name="84" href="#84">84</a>  
+<a name="85" href="#85">85</a>    <strong>public</strong> <strong>void</strong> setDecoder(String _decoder) {
+<a name="86" href="#86">86</a>      decoder = _decoder;
+<a name="87" href="#87">87</a>    }
+<a name="88" href="#88">88</a>  
+<a name="89" href="#89">89</a>    <strong>public</strong> <strong>boolean</strong> isPaused() {
+<a name="90" href="#90">90</a>      <strong>return</strong> paused;
+<a name="91" href="#91">91</a>    }
+<a name="92" href="#92">92</a>  
+<a name="93" href="#93">93</a>    <strong>public</strong> <strong>void</strong> setPaused(<strong>boolean</strong> b) {
+<a name="94" href="#94">94</a>      paused = b;
+<a name="95" href="#95">95</a>    }
+<a name="96" href="#96">96</a>  
+<a name="97" href="#97">97</a>    <em>/**<em>*</em></em>
+<a name="98" href="#98">98</a>  <em>   * Returns true if the receiver is the same class and they are</em>
+<a name="99" href="#99">99</a>  <em>   * configured for the same properties, and super class also considers</em>
+<a name="100" href="#100">100</a> <em>   * them to be equivalent. This is used by PluginRegistry when determining</em>
+<a name="101" href="#101">101</a> <em>   * if the a similarly configured receiver is being started.</em>
+<a name="102" href="#102">102</a> <em>   * </em>
+<a name="103" href="#103">103</a> <em>   * @param testPlugin The plugin to test equivalency against.</em>
+<a name="104" href="#104">104</a> <em>   * @return boolean True if the testPlugin is equivalent to this plugin.</em>
+<a name="105" href="#105">105</a> <em>   */</em>
+<a name="106" href="#106">106</a>   <strong>public</strong> <strong>boolean</strong> isEquivalent(Plugin testPlugin) {
+<a name="107" href="#107">107</a>     <strong>if</strong> ((testPlugin != <strong>null</strong>) &amp;&amp; testPlugin instanceof XMLSocketReceiver) {
+<a name="108" href="#108">108</a>       <a href="../../../../org/apache/log4j/net/XMLSocketReceiver.html">XMLSocketReceiver</a> sReceiver = (XMLSocketReceiver) testPlugin;
+<a name="109" href="#109">109</a> 
+<a name="110" href="#110">110</a>       <strong>return</strong> (port == sReceiver.getPort() &amp;&amp; <strong>super</strong>.isEquivalent(testPlugin));
+<a name="111" href="#111">111</a>     }
+<a name="112" href="#112">112</a> 
+<a name="113" href="#113">113</a>     <strong>return</strong> false;
+<a name="114" href="#114">114</a>   }
+<a name="115" href="#115">115</a> 
+<a name="116" href="#116">116</a>   <strong>public</strong> <strong>int</strong> hashCode() {
+<a name="117" href="#117">117</a>   	
+<a name="118" href="#118">118</a>   	<strong>int</strong> result = 37 * (repository != <strong>null</strong>? repository.hashCode():0);
+<a name="119" href="#119">119</a>   	result = result * 37 + port;
+<a name="120" href="#120">120</a>   	<strong>return</strong> (result * 37 + (getName() != <strong>null</strong>? getName().hashCode():0));
+<a name="121" href="#121">121</a>   }
+<a name="122" href="#122">122</a>   	
+<a name="123" href="#123">123</a>   <em>/**<em>*</em></em>
+<a name="124" href="#124">124</a> <em>    Returns true if this receiver is active. */</em>
+<a name="125" href="#125">125</a>   <strong>public</strong> <strong>synchronized</strong> <strong>boolean</strong> isActive() {
+<a name="126" href="#126">126</a>     <strong>return</strong> active;
+<a name="127" href="#127">127</a>   }
+<a name="128" href="#128">128</a> 
+<a name="129" href="#129">129</a>   <em>/**<em>*</em></em>
+<a name="130" href="#130">130</a> <em>    Starts the SocketReceiver with the current options. */</em>
+<a name="131" href="#131">131</a>   <strong>public</strong> <strong>void</strong> activateOptions() {
+<a name="132" href="#132">132</a>     <strong>if</strong> (!isActive()) {
+<a name="133" href="#133">133</a>       rThread = <strong>new</strong> Thread(<strong>this</strong>);
+<a name="134" href="#134">134</a>       rThread.setDaemon(<strong>true</strong>);
+<a name="135" href="#135">135</a>       rThread.start();
+<a name="136" href="#136">136</a>       active = <strong>true</strong>;
+<a name="137" href="#137">137</a>     }
+<a name="138" href="#138">138</a>   }
+<a name="139" href="#139">139</a> 
+<a name="140" href="#140">140</a>   <em>/**<em>*</em></em>
+<a name="141" href="#141">141</a> <em>    Called when the receiver should be stopped. Closes the</em>
+<a name="142" href="#142">142</a> <em>    server socket and all of the open sockets. */</em>
+<a name="143" href="#143">143</a>   <strong>public</strong> <strong>synchronized</strong> <strong>void</strong> shutdown() {
+<a name="144" href="#144">144</a>     <em class="comment">// mark this as no longer running</em>
+<a name="145" href="#145">145</a>     active = false;
+<a name="146" href="#146">146</a> 
+<a name="147" href="#147">147</a>     <strong>if</strong> (rThread != <strong>null</strong>) {
+<a name="148" href="#148">148</a>       rThread.interrupt();
+<a name="149" href="#149">149</a>       rThread = <strong>null</strong>;
+<a name="150" href="#150">150</a>     }
+<a name="151" href="#151">151</a>     doShutdown();
+<a name="152" href="#152">152</a>   }
+<a name="153" href="#153">153</a> 
+<a name="154" href="#154">154</a>     <em>/**<em>*</em></em>
+<a name="155" href="#155">155</a> <em>     * Does the actual shutting down by closing the server socket</em>
+<a name="156" href="#156">156</a> <em>     * and any connected sockets that have been created.</em>
+<a name="157" href="#157">157</a> <em>     */</em>
+<a name="158" href="#158">158</a>     <strong>private</strong> <strong>synchronized</strong> <strong>void</strong> doShutdown() {
+<a name="159" href="#159">159</a>       active = false;
+<a name="160" href="#160">160</a> 
+<a name="161" href="#161">161</a>       getLogger().debug(<span class="string">"{} doShutdown called"</span>, getName());
+<a name="162" href="#162">162</a> 
+<a name="163" href="#163">163</a>       <em class="comment">// close the server socket</em>
+<a name="164" href="#164">164</a>       closeServerSocket();
+<a name="165" href="#165">165</a> 
+<a name="166" href="#166">166</a>       <em class="comment">// close all of the accepted sockets</em>
+<a name="167" href="#167">167</a>       closeAllAcceptedSockets();
+<a name="168" href="#168">168</a>     }
+<a name="169" href="#169">169</a> 
+<a name="170" href="#170">170</a>     <em>/**<em>*</em></em>
+<a name="171" href="#171">171</a> <em>      * Closes the server socket, if created.</em>
+<a name="172" href="#172">172</a> <em>      */</em>
+<a name="173" href="#173">173</a>      <strong>private</strong> <strong>void</strong> closeServerSocket() {
+<a name="174" href="#174">174</a>        getLogger().debug(<span class="string">"{} closing server socket"</span>, getName());
+<a name="175" href="#175">175</a> 
+<a name="176" href="#176">176</a>        <strong>try</strong> {
+<a name="177" href="#177">177</a>          <strong>if</strong> (serverSocket != <strong>null</strong>) {
+<a name="178" href="#178">178</a>            serverSocket.close();
+<a name="179" href="#179">179</a>          }
+<a name="180" href="#180">180</a>        } <strong>catch</strong> (Exception e) {
+<a name="181" href="#181">181</a>          <em class="comment">// ignore for now</em>
+<a name="182" href="#182">182</a>        }
+<a name="183" href="#183">183</a> 
+<a name="184" href="#184">184</a>        serverSocket = <strong>null</strong>;
+<a name="185" href="#185">185</a>      }
+<a name="186" href="#186">186</a> 
+<a name="187" href="#187">187</a>     <em>/**<em>*</em></em>
+<a name="188" href="#188">188</a> <em>      * Closes all the connected sockets in the List.</em>
+<a name="189" href="#189">189</a> <em>      */</em>
+<a name="190" href="#190">190</a>      <strong>private</strong> <strong>synchronized</strong> <strong>void</strong> closeAllAcceptedSockets() {
+<a name="191" href="#191">191</a>        <strong>for</strong> (<strong>int</strong> x = 0; x &lt; socketList.size(); x++) {
+<a name="192" href="#192">192</a>          <strong>try</strong> {
+<a name="193" href="#193">193</a>            ((Socket) socketList.get(x)).close();
+<a name="194" href="#194">194</a>          } <strong>catch</strong> (Exception e) {
+<a name="195" href="#195">195</a>            <em class="comment">// ignore for now</em>
+<a name="196" href="#196">196</a>          }
+<a name="197" href="#197">197</a>        }
+<a name="198" href="#198">198</a> 
+<a name="199" href="#199">199</a>        <em class="comment">// clear member variables</em>
+<a name="200" href="#200">200</a>        socketList.clear();
+<a name="201" href="#201">201</a>      }
+<a name="202" href="#202">202</a> 
+<a name="203" href="#203">203</a>   <em>/**<em>*</em></em>
+<a name="204" href="#204">204</a> <em>    Loop, accepting new socket connections. */</em>
+<a name="205" href="#205">205</a>   <strong>public</strong> <strong>void</strong> run() {
+<a name="206" href="#206">206</a>       <em>/**<em>*</em></em>
+<a name="207" href="#207">207</a> <em>        * Ensure we start fresh.</em>
+<a name="208" href="#208">208</a> <em>        */</em>
+<a name="209" href="#209">209</a>     getLogger().debug(<span class="string">"performing socket cleanup prior to entering loop for {}"</span>,  name);
+<a name="210" href="#210">210</a>     closeServerSocket();
+<a name="211" href="#211">211</a>     closeAllAcceptedSockets();
+<a name="212" href="#212">212</a>     getLogger().debug(<span class="string">"socket cleanup complete for {}"</span>, name);       
+<a name="213" href="#213">213</a>     active = <strong>true</strong>;
+<a name="214" href="#214">214</a> 
+<a name="215" href="#215">215</a>     <em class="comment">// start the server socket</em>
+<a name="216" href="#216">216</a>     <strong>try</strong> {
+<a name="217" href="#217">217</a>       serverSocket = <strong>new</strong> ServerSocket(port);
+<a name="218" href="#218">218</a>     } <strong>catch</strong> (Exception e) {
+<a name="219" href="#219">219</a>       getLogger().error(
+<a name="220" href="#220">220</a>         <span class="string">"error starting SocketReceiver ("</span> + <strong>this</strong>.getName()
+<a name="221" href="#221">221</a>         + <span class="string">"), receiver did not start"</span>, e);
+<a name="222" href="#222">222</a>       active = false;
+<a name="223" href="#223">223</a>       doShutdown();
+<a name="224" href="#224">224</a> 
+<a name="225" href="#225">225</a>       <strong>return</strong>;
+<a name="226" href="#226">226</a>     }
+<a name="227" href="#227">227</a> 
+<a name="228" href="#228">228</a>     Socket socket = <strong>null</strong>;
+<a name="229" href="#229">229</a> 
+<a name="230" href="#230">230</a>     <strong>try</strong> {
+<a name="231" href="#231">231</a>       getLogger().debug(<span class="string">"in run-about to enter while isactiveloop"</span>);
+<a name="232" href="#232">232</a> 
+<a name="233" href="#233">233</a>       active = <strong>true</strong>;
+<a name="234" href="#234">234</a> 
+<a name="235" href="#235">235</a>       <strong>while</strong> (!rThread.isInterrupted()) {
+<a name="236" href="#236">236</a>         <em class="comment">// if we have a socket, start watching it</em>
+<a name="237" href="#237">237</a>         <strong>if</strong> (socket != <strong>null</strong>) {
+<a name="238" href="#238">238</a>           getLogger().debug(<span class="string">"socket not null - creating and starting socketnode"</span>);
+<a name="239" href="#239">239</a>           socketList.add(socket);
+<a name="240" href="#240">240</a> 
+<a name="241" href="#241">241</a>           <a href="../../../../org/apache/log4j/net/XMLSocketNode.html">XMLSocketNode</a> node = <strong>new</strong> <a href="../../../../org/apache/log4j/net/XMLSocketNode.html">XMLSocketNode</a>(decoder, socket, <strong>this</strong>);
+<a name="242" href="#242">242</a>           node.setLoggerRepository(<strong>this</strong>.repository);
+<a name="243" href="#243">243</a>           <strong>new</strong> Thread(node).start();
+<a name="244" href="#244">244</a>           socket = <strong>null</strong>;
+<a name="245" href="#245">245</a>         }
+<a name="246" href="#246">246</a> 
+<a name="247" href="#247">247</a>         getLogger().debug(<span class="string">"waiting to accept socket"</span>);
+<a name="248" href="#248">248</a> 
+<a name="249" href="#249">249</a>         <em class="comment">// wait for a socket to open, then loop to start it</em>
+<a name="250" href="#250">250</a>         socket = serverSocket.accept();
+<a name="251" href="#251">251</a>         getLogger().debug(<span class="string">"accepted socket"</span>);
+<a name="252" href="#252">252</a>       }
+<a name="253" href="#253">253</a> 
+<a name="254" href="#254">254</a>       <em class="comment">// socket not watched because we a no longer running</em>
+<a name="255" href="#255">255</a>       <em class="comment">// so close it now.</em>
+<a name="256" href="#256">256</a>       <strong>if</strong> (socket != <strong>null</strong>) {
+<a name="257" href="#257">257</a>         socket.close();
+<a name="258" href="#258">258</a>       }
+<a name="259" href="#259">259</a>     } <strong>catch</strong> (Exception e) {
+<a name="260" href="#260">260</a>       getLogger().warn(
+<a name="261" href="#261">261</a>         <span class="string">"socket server disconnected, stopping"</span>);
+<a name="262" href="#262">262</a>     }
+<a name="263" href="#263">263</a>   }
+<a name="264" href="#264">264</a> 
+<a name="265" href="#265">265</a>   <em class="comment">/*<em class="comment"> (non-Javadoc)</em></em>
+<a name="266" href="#266">266</a> <em class="comment">   * @see org.apache.log4j.plugins.Receiver#doPost(org.apache.log4j.spi.LoggingEvent)</em>
+<a name="267" href="#267">267</a> <em class="comment">   */</em>
+<a name="268" href="#268">268</a>   <strong>public</strong> <strong>void</strong> doPost(LoggingEvent event) {
+<a name="269" href="#269">269</a>     <strong>if</strong>(!isPaused()){
+<a name="270" href="#270">270</a>       <strong>super</strong>.doPost(event);
+<a name="271" href="#271">271</a>     }
+<a name="272" href="#272">272</a>   }
+<a name="273" href="#273">273</a> 
+<a name="274" href="#274">274</a> 
+<a name="275" href="#275">275</a> }
+</pre>
+<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
+</html>
+

Propchange: logging/site/trunk/docs/log4j/companions/receivers/xref/org/apache/log4j/net/XMLSocketReceiver.html
------------------------------------------------------------------------------
    svn:mime-type = text/html

Added: logging/site/trunk/docs/log4j/companions/receivers/xref/org/apache/log4j/net/package-frame.html
URL: http://svn.apache.org/viewvc/logging/site/trunk/docs/log4j/companions/receivers/xref/org/apache/log4j/net/package-frame.html?view=auto&rev=558362
==============================================================================
--- logging/site/trunk/docs/log4j/companions/receivers/xref/org/apache/log4j/net/package-frame.html (added)
+++ logging/site/trunk/docs/log4j/companions/receivers/xref/org/apache/log4j/net/package-frame.html Sat Jul 21 10:50:33 2007
@@ -0,0 +1,69 @@
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
+<html xml:lang="en" lang="en">
+	<head>
+		<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
+		<title>Apache Receivers Companion for log4j 1.2. 1.1-SNAPSHOT Reference Package org.apache.log4j.net</title>
+		<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="style" />
+	</head>
+	<body>
+
+		<h3>
+        	<a href="package-summary.html" target="classFrame">org.apache.log4j.net</a>
+      	</h3>
+
+      	<h3>Classes</h3>
+
+      	<ul>
+      		          	<li>
+            	<a href="AddressBased.html" target="classFrame">AddressBased</a>
+          	</li>
+          	          	<li>
+            	<a href="JMSReceiver.html" target="classFrame">JMSReceiver</a>
+          	</li>
+          	          	<li>
+            	<a href="JMSReceiverBeanInfo.html" target="classFrame">JMSReceiverBeanInfo</a>
+          	</li>
+          	          	<li>
+            	<a href="MulticastAppender.html" target="classFrame">MulticastAppender</a>
+          	</li>
+          	          	<li>
+            	<a href="MulticastReceiver.html" target="classFrame">MulticastReceiver</a>
+          	</li>
+          	          	<li>
+            	<a href="MulticastReceiverBeanInfo.html" target="classFrame">MulticastReceiverBeanInfo</a>
+          	</li>
+          	          	<li>
+            	<a href="NetworkBased.html" target="classFrame">NetworkBased</a>
+          	</li>
+          	          	<li>
+            	<a href="PortBased.html" target="classFrame">PortBased</a>
+          	</li>
+          	          	<li>
+            	<a href="SocketHubReceiver.html" target="classFrame">SocketHubReceiver</a>
+          	</li>
+          	          	<li>
+            	<a href="SocketNode13.html" target="classFrame">SocketNode13</a>
+          	</li>
+          	          	<li>
+            	<a href="SocketNodeEventListener.html" target="classFrame">SocketNodeEventListener</a>
+          	</li>
+          	          	<li>
+            	<a href="SocketReceiver.html" target="classFrame">SocketReceiver</a>
+          	</li>
+          	          	<li>
+            	<a href="UDPAppender.html" target="classFrame">UDPAppender</a>
+          	</li>
+          	          	<li>
+            	<a href="UDPReceiver.html" target="classFrame">UDPReceiver</a>
+          	</li>
+          	          	<li>
+            	<a href="XMLSocketNode.html" target="classFrame">XMLSocketNode</a>
+          	</li>
+          	          	<li>
+            	<a href="XMLSocketReceiver.html" target="classFrame">XMLSocketReceiver</a>
+          	</li>
+          	      	</ul>
+
+	</body>
+</html>
\ No newline at end of file

Propchange: logging/site/trunk/docs/log4j/companions/receivers/xref/org/apache/log4j/net/package-frame.html
------------------------------------------------------------------------------
    svn:mime-type = text/html

Added: logging/site/trunk/docs/log4j/companions/receivers/xref/org/apache/log4j/net/package-summary.html
URL: http://svn.apache.org/viewvc/logging/site/trunk/docs/log4j/companions/receivers/xref/org/apache/log4j/net/package-summary.html?view=auto&rev=558362
==============================================================================
--- logging/site/trunk/docs/log4j/companions/receivers/xref/org/apache/log4j/net/package-summary.html (added)
+++ logging/site/trunk/docs/log4j/companions/receivers/xref/org/apache/log4j/net/package-summary.html Sat Jul 21 10:50:33 2007
@@ -0,0 +1,142 @@
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
+<html xml:lang="en" lang="en">
+	<head>
+		<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
+		<title>Apache Receivers Companion for log4j 1.2. 1.1-SNAPSHOT Reference Package $name</title>
+		<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="style" />
+	</head>
+	<body>
+		      	<div class="overview">
+        	<ul>
+          		<li>
+            		<a href="../../../../overview-summary.html">Overview</a>
+          		</li>
+          		<li class="selected">Package</li>
+        	</ul>
+      	</div>
+      	<div class="framenoframe">
+        	<ul>
+          		<li>
+            		<a href="../../../../index.html" target="_top">FRAMES</a>
+          		</li>
+          		<li>
+            		<a href="package-summary.html" target="_top">NO FRAMES</a>
+          		</li>
+        	</ul>
+      	</div>
+		
+		      	<h2>Package org.apache.log4j.net</h2>
+
+		<table class="summary">
+        	<thead>
+          		<tr>
+            		<th>Class Summary</th>
+          		</tr>
+        	</thead>
+        	<tbody>
+        		            	<tr>
+              		<td>
+                		<a href="AddressBased.html" target="classFrame">AddressBased</a>
+              		</td>
+            	</tr>
+				            	<tr>
+              		<td>
+                		<a href="JMSReceiver.html" target="classFrame">JMSReceiver</a>
+              		</td>
+            	</tr>
+				            	<tr>
+              		<td>
+                		<a href="JMSReceiverBeanInfo.html" target="classFrame">JMSReceiverBeanInfo</a>
+              		</td>
+            	</tr>
+				            	<tr>
+              		<td>
+                		<a href="MulticastAppender.html" target="classFrame">MulticastAppender</a>
+              		</td>
+            	</tr>
+				            	<tr>
+              		<td>
+                		<a href="MulticastReceiver.html" target="classFrame">MulticastReceiver</a>
+              		</td>
+            	</tr>
+				            	<tr>
+              		<td>
+                		<a href="MulticastReceiverBeanInfo.html" target="classFrame">MulticastReceiverBeanInfo</a>
+              		</td>
+            	</tr>
+				            	<tr>
+              		<td>
+                		<a href="NetworkBased.html" target="classFrame">NetworkBased</a>
+              		</td>
+            	</tr>
+				            	<tr>
+              		<td>
+                		<a href="PortBased.html" target="classFrame">PortBased</a>
+              		</td>
+            	</tr>
+				            	<tr>
+              		<td>
+                		<a href="SocketHubReceiver.html" target="classFrame">SocketHubReceiver</a>
+              		</td>
+            	</tr>
+				            	<tr>
+              		<td>
+                		<a href="SocketNode13.html" target="classFrame">SocketNode13</a>
+              		</td>
+            	</tr>
+				            	<tr>
+              		<td>
+                		<a href="SocketNodeEventListener.html" target="classFrame">SocketNodeEventListener</a>
+              		</td>
+            	</tr>
+				            	<tr>
+              		<td>
+                		<a href="SocketReceiver.html" target="classFrame">SocketReceiver</a>
+              		</td>
+            	</tr>
+				            	<tr>
+              		<td>
+                		<a href="UDPAppender.html" target="classFrame">UDPAppender</a>
+              		</td>
+            	</tr>
+				            	<tr>
+              		<td>
+                		<a href="UDPReceiver.html" target="classFrame">UDPReceiver</a>
+              		</td>
+            	</tr>
+				            	<tr>
+              		<td>
+                		<a href="XMLSocketNode.html" target="classFrame">XMLSocketNode</a>
+              		</td>
+            	</tr>
+				            	<tr>
+              		<td>
+                		<a href="XMLSocketReceiver.html" target="classFrame">XMLSocketReceiver</a>
+              		</td>
+            	</tr>
+				        	</tbody>
+      	</table>
+		
+		      	<div class="overview">
+        	<ul>
+          		<li>
+            		<a href="../../../../overview-summary.html">Overview</a>
+          		</li>
+          		<li class="selected">Package</li>
+        	</ul>
+      	</div>
+      	<div class="framenoframe">
+        	<ul>
+          		<li>
+            		<a href="../../../../index.html" target="_top">FRAMES</a>
+          		</li>
+          		<li>
+            		<a href="package-summary.html" target="_top">NO FRAMES</a>
+          		</li>
+        	</ul>
+      	</div>
+				<hr />
+		Copyright &copy; null Apache Software Foundation. All Rights Reserved.
+	</body>
+</html>
\ No newline at end of file

Propchange: logging/site/trunk/docs/log4j/companions/receivers/xref/org/apache/log4j/net/package-summary.html
------------------------------------------------------------------------------
    svn:mime-type = text/html

Added: logging/site/trunk/docs/log4j/companions/receivers/xref/org/apache/log4j/spi/Decoder.html
URL: http://svn.apache.org/viewvc/logging/site/trunk/docs/log4j/companions/receivers/xref/org/apache/log4j/spi/Decoder.html?view=auto&rev=558362
==============================================================================
--- logging/site/trunk/docs/log4j/companions/receivers/xref/org/apache/log4j/spi/Decoder.html (added)
+++ logging/site/trunk/docs/log4j/companions/receivers/xref/org/apache/log4j/spi/Decoder.html Sat Jul 21 10:50:33 2007
@@ -0,0 +1,77 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /><title>Decoder xref</title>
+<link type="text/css" rel="stylesheet" href="../../../../stylesheet.css" />
+</head>
+<body>
+<div id="overview"><a href="../../../../../../../../../../apidocs/org/apache/log4j/spi/Decoder.html">View Javadoc</a></div><pre>
+
+<a name="1" href="#1">1</a>   <em class="comment">/*</em>
+<a name="2" href="#2">2</a>   <em class="comment"> * Licensed to the Apache Software Foundation (ASF) under one or more</em>
+<a name="3" href="#3">3</a>   <em class="comment"> * contributor license agreements.  See the NOTICE file distributed with</em>
+<a name="4" href="#4">4</a>   <em class="comment"> * this work for additional information regarding copyright ownership.</em>
+<a name="5" href="#5">5</a>   <em class="comment"> * The ASF licenses this file to You under the Apache License, Version 2.0</em>
+<a name="6" href="#6">6</a>   <em class="comment"> * (the "License"); you may not use this file except in compliance with</em>
+<a name="7" href="#7">7</a>   <em class="comment"> * the License.  You may obtain a copy of the License at</em>
+<a name="8" href="#8">8</a>   <em class="comment"> *</em>
+<a name="9" href="#9">9</a>   <em class="comment"> *      <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a></em>
+<a name="10" href="#10">10</a>  <em class="comment"> *</em>
+<a name="11" href="#11">11</a>  <em class="comment"> * Unless required by applicable law or agreed to in writing, software</em>
+<a name="12" href="#12">12</a>  <em class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</em>
+<a name="13" href="#13">13</a>  <em class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</em>
+<a name="14" href="#14">14</a>  <em class="comment"> * See the License for the specific language governing permissions and</em>
+<a name="15" href="#15">15</a>  <em class="comment"> * limitations under the License.</em>
+<a name="16" href="#16">16</a>  <em class="comment"> */</em>
+<a name="17" href="#17">17</a>  
+<a name="18" href="#18">18</a>  <strong>package</strong> org.apache.log4j.spi;
+<a name="19" href="#19">19</a>  
+<a name="20" href="#20">20</a>  
+<a name="21" href="#21">21</a>  <strong>import</strong> java.io.IOException;
+<a name="22" href="#22">22</a>  
+<a name="23" href="#23">23</a>  <strong>import</strong> java.net.URL;
+<a name="24" href="#24">24</a>  
+<a name="25" href="#25">25</a>  <strong>import</strong> java.util.Map;
+<a name="26" href="#26">26</a>  <strong>import</strong> java.util.Vector;
+<a name="27" href="#27">27</a>  
+<a name="28" href="#28">28</a>  
+<a name="29" href="#29">29</a>  <em>/**<em>*</em></em>
+<a name="30" href="#30">30</a>  <em> *  Allow LoggingEvents to be reconstructed from a different format</em>
+<a name="31" href="#31">31</a>  <em> * (usually XML).</em>
+<a name="32" href="#32">32</a>  <em> *</em>
+<a name="33" href="#33">33</a>  <em> *  @author Scott Deboy (sdeboy@apache.org)</em>
+<a name="34" href="#34">34</a>  <em> *  @since 1.3</em>
+<a name="35" href="#35">35</a>  <em> */</em>
+<a name="36" href="#36">36</a>  <strong>public</strong> <strong>interface</strong> <a href="../../../../org/apache/log4j/spi/Decoder.html">Decoder</a> {
+<a name="37" href="#37">37</a>      <em>/**<em>*</em></em>
+<a name="38" href="#38">38</a>  <em>     * Decode events from document.</em>
+<a name="39" href="#39">39</a>  <em>     * @param document document to decode.</em>
+<a name="40" href="#40">40</a>  <em>     * @return list of LoggingEvent instances.</em>
+<a name="41" href="#41">41</a>  <em>     */</em>
+<a name="42" href="#42">42</a>    Vector decodeEvents(String document);
+<a name="43" href="#43">43</a>  
+<a name="44" href="#44">44</a>      <em>/**<em>*</em></em>
+<a name="45" href="#45">45</a>  <em>     * Decode event from string.</em>
+<a name="46" href="#46">46</a>  <em>     * @param event string representation of event</em>
+<a name="47" href="#47">47</a>  <em>     * @return event</em>
+<a name="48" href="#48">48</a>  <em>     */</em>
+<a name="49" href="#49">49</a>    LoggingEvent decode(String event);
+<a name="50" href="#50">50</a>  
+<a name="51" href="#51">51</a>      <em>/**<em>*</em></em>
+<a name="52" href="#52">52</a>  <em>     * Decode event from document retreived from URL.</em>
+<a name="53" href="#53">53</a>  <em>     * @param url url of document</em>
+<a name="54" href="#54">54</a>  <em>     * @return list of LoggingEvent instances.</em>
+<a name="55" href="#55">55</a>  <em>     * @throws IOException if IO error resolving document.</em>
+<a name="56" href="#56">56</a>  <em>     */</em>
+<a name="57" href="#57">57</a>    Vector decode(URL url) throws IOException;
+<a name="58" href="#58">58</a>  
+<a name="59" href="#59">59</a>      <em>/**<em>*</em></em>
+<a name="60" href="#60">60</a>  <em>     * Sets additional properties.</em>
+<a name="61" href="#61">61</a>  <em>     * @param additionalProperties map of additional properties.</em>
+<a name="62" href="#62">62</a>  <em>     */</em>
+<a name="63" href="#63">63</a>    <strong>void</strong> setAdditionalProperties(Map additionalProperties);
+<a name="64" href="#64">64</a>  }
+</pre>
+<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
+</html>
+

Propchange: logging/site/trunk/docs/log4j/companions/receivers/xref/org/apache/log4j/spi/Decoder.html
------------------------------------------------------------------------------
    svn:mime-type = text/html

Added: logging/site/trunk/docs/log4j/companions/receivers/xref/org/apache/log4j/spi/package-frame.html
URL: http://svn.apache.org/viewvc/logging/site/trunk/docs/log4j/companions/receivers/xref/org/apache/log4j/spi/package-frame.html?view=auto&rev=558362
==============================================================================
--- logging/site/trunk/docs/log4j/companions/receivers/xref/org/apache/log4j/spi/package-frame.html (added)
+++ logging/site/trunk/docs/log4j/companions/receivers/xref/org/apache/log4j/spi/package-frame.html Sat Jul 21 10:50:33 2007
@@ -0,0 +1,24 @@
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
+<html xml:lang="en" lang="en">
+	<head>
+		<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
+		<title>Apache Receivers Companion for log4j 1.2. 1.1-SNAPSHOT Reference Package org.apache.log4j.spi</title>
+		<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="style" />
+	</head>
+	<body>
+
+		<h3>
+        	<a href="package-summary.html" target="classFrame">org.apache.log4j.spi</a>
+      	</h3>
+
+      	<h3>Classes</h3>
+
+      	<ul>
+      		          	<li>
+            	<a href="Decoder.html" target="classFrame">Decoder</a>
+          	</li>
+          	      	</ul>
+
+	</body>
+</html>
\ No newline at end of file

Propchange: logging/site/trunk/docs/log4j/companions/receivers/xref/org/apache/log4j/spi/package-frame.html
------------------------------------------------------------------------------
    svn:mime-type = text/html

Added: logging/site/trunk/docs/log4j/companions/receivers/xref/org/apache/log4j/spi/package-summary.html
URL: http://svn.apache.org/viewvc/logging/site/trunk/docs/log4j/companions/receivers/xref/org/apache/log4j/spi/package-summary.html?view=auto&rev=558362
==============================================================================
--- logging/site/trunk/docs/log4j/companions/receivers/xref/org/apache/log4j/spi/package-summary.html (added)
+++ logging/site/trunk/docs/log4j/companions/receivers/xref/org/apache/log4j/spi/package-summary.html Sat Jul 21 10:50:33 2007
@@ -0,0 +1,67 @@
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
+<html xml:lang="en" lang="en">
+	<head>
+		<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
+		<title>Apache Receivers Companion for log4j 1.2. 1.1-SNAPSHOT Reference Package $name</title>
+		<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="style" />
+	</head>
+	<body>
+		      	<div class="overview">
+        	<ul>
+          		<li>
+            		<a href="../../../../overview-summary.html">Overview</a>
+          		</li>
+          		<li class="selected">Package</li>
+        	</ul>
+      	</div>
+      	<div class="framenoframe">
+        	<ul>
+          		<li>
+            		<a href="../../../../index.html" target="_top">FRAMES</a>
+          		</li>
+          		<li>
+            		<a href="package-summary.html" target="_top">NO FRAMES</a>
+          		</li>
+        	</ul>
+      	</div>
+		
+		      	<h2>Package org.apache.log4j.spi</h2>
+
+		<table class="summary">
+        	<thead>
+          		<tr>
+            		<th>Class Summary</th>
+          		</tr>
+        	</thead>
+        	<tbody>
+        		            	<tr>
+              		<td>
+                		<a href="Decoder.html" target="classFrame">Decoder</a>
+              		</td>
+            	</tr>
+				        	</tbody>
+      	</table>
+		
+		      	<div class="overview">
+        	<ul>
+          		<li>
+            		<a href="../../../../overview-summary.html">Overview</a>
+          		</li>
+          		<li class="selected">Package</li>
+        	</ul>
+      	</div>
+      	<div class="framenoframe">
+        	<ul>
+          		<li>
+            		<a href="../../../../index.html" target="_top">FRAMES</a>
+          		</li>
+          		<li>
+            		<a href="package-summary.html" target="_top">NO FRAMES</a>
+          		</li>
+        	</ul>
+      	</div>
+				<hr />
+		Copyright &copy; null Apache Software Foundation. All Rights Reserved.
+	</body>
+</html>
\ No newline at end of file

Propchange: logging/site/trunk/docs/log4j/companions/receivers/xref/org/apache/log4j/spi/package-summary.html
------------------------------------------------------------------------------
    svn:mime-type = text/html

Added: logging/site/trunk/docs/log4j/companions/receivers/xref/org/apache/log4j/varia/ListModelAppender.html
URL: http://svn.apache.org/viewvc/logging/site/trunk/docs/log4j/companions/receivers/xref/org/apache/log4j/varia/ListModelAppender.html?view=auto&rev=558362
==============================================================================
--- logging/site/trunk/docs/log4j/companions/receivers/xref/org/apache/log4j/varia/ListModelAppender.html (added)
+++ logging/site/trunk/docs/log4j/companions/receivers/xref/org/apache/log4j/varia/ListModelAppender.html Sat Jul 21 10:50:33 2007
@@ -0,0 +1,93 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" /><title>ListModelAppender xref</title>
+<link type="text/css" rel="stylesheet" href="../../../../stylesheet.css" />
+</head>
+<body>
+<div id="overview"><a href="../../../../../../../../../../apidocs/org/apache/log4j/varia/ListModelAppender.html">View Javadoc</a></div><pre>
+
+<a name="1" href="#1">1</a>   <em class="comment">/*</em>
+<a name="2" href="#2">2</a>   <em class="comment"> * Licensed to the Apache Software Foundation (ASF) under one or more</em>
+<a name="3" href="#3">3</a>   <em class="comment"> * contributor license agreements.  See the NOTICE file distributed with</em>
+<a name="4" href="#4">4</a>   <em class="comment"> * this work for additional information regarding copyright ownership.</em>
+<a name="5" href="#5">5</a>   <em class="comment"> * The ASF licenses this file to You under the Apache License, Version 2.0</em>
+<a name="6" href="#6">6</a>   <em class="comment"> * (the "License"); you may not use this file except in compliance with</em>
+<a name="7" href="#7">7</a>   <em class="comment"> * the License.  You may obtain a copy of the License at</em>
+<a name="8" href="#8">8</a>   <em class="comment"> *</em>
+<a name="9" href="#9">9</a>   <em class="comment"> *      <a href="http://www.apache.org/licenses/LICENSE-2.0" target="alexandria_uri">http://www.apache.org/licenses/LICENSE-2.0</a></em>
+<a name="10" href="#10">10</a>  <em class="comment"> *</em>
+<a name="11" href="#11">11</a>  <em class="comment"> * Unless required by applicable law or agreed to in writing, software</em>
+<a name="12" href="#12">12</a>  <em class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</em>
+<a name="13" href="#13">13</a>  <em class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</em>
+<a name="14" href="#14">14</a>  <em class="comment"> * See the License for the specific language governing permissions and</em>
+<a name="15" href="#15">15</a>  <em class="comment"> * limitations under the License.</em>
+<a name="16" href="#16">16</a>  <em class="comment"> */</em>
+<a name="17" href="#17">17</a>  
+<a name="18" href="#18">18</a>  <strong>package</strong> org.apache.log4j.varia;
+<a name="19" href="#19">19</a>  
+<a name="20" href="#20">20</a>  <strong>import</strong> org.apache.log4j.AppenderSkeleton;
+<a name="21" href="#21">21</a>  <strong>import</strong> org.apache.log4j.spi.LoggingEvent;
+<a name="22" href="#22">22</a>  
+<a name="23" href="#23">23</a>  <strong>import</strong> javax.swing.DefaultListModel;
+<a name="24" href="#24">24</a>  <strong>import</strong> javax.swing.ListModel;
+<a name="25" href="#25">25</a>  
+<a name="26" href="#26">26</a>  
+<a name="27" href="#27">27</a>  <em>/**<em>*</em></em>
+<a name="28" href="#28">28</a>  <em> * A very basic appender that takes the events and stores them in to a</em>
+<a name="29" href="#29">29</a>  <em> * ListModel for late retrieval.</em>
+<a name="30" href="#30">30</a>  <em> *</em>
+<a name="31" href="#31">31</a>  <em> * @since 1.3</em>
+<a name="32" href="#32">32</a>  <em> *</em>
+<a name="33" href="#33">33</a>  <em> * @author Paul Smith (psmith@apache.org)</em>
+<a name="34" href="#34">34</a>  <em> *</em>
+<a name="35" href="#35">35</a>  <em> */</em>
+<a name="36" href="#36">36</a>  <strong>public</strong> <strong>final</strong> <strong>class</strong> <a href="../../../../org/apache/log4j/varia/ListModelAppender.html">ListModelAppender</a> <strong>extends</strong> AppenderSkeleton {
+<a name="37" href="#37">37</a>      <em>/**<em>*</em></em>
+<a name="38" href="#38">38</a>  <em>     * Default list model.</em>
+<a name="39" href="#39">39</a>  <em>     */</em>
+<a name="40" href="#40">40</a>    <strong>private</strong> <strong>final</strong> DefaultListModel model = <strong>new</strong> DefaultListModel();
+<a name="41" href="#41">41</a>  
+<a name="42" href="#42">42</a>    <em>/**<em>*</em></em>
+<a name="43" href="#43">43</a>  <em>   * Constructs a ListModelAppender.</em>
+<a name="44" href="#44">44</a>  <em>   */</em>
+<a name="45" href="#45">45</a>    <strong>public</strong> <a href="../../../../org/apache/log4j/varia/ListModelAppender.html">ListModelAppender</a>() {
+<a name="46" href="#46">46</a>        <strong>super</strong>(<strong>true</strong>);
+<a name="47" href="#47">47</a>    }
+<a name="48" href="#48">48</a>    <em>/**<em>*</em></em>
+<a name="49" href="#49">49</a>  <em>   * Returns a reference to the ListModel that contains all the LoggingEvents</em>
+<a name="50" href="#50">50</a>  <em>   * that have been appended to this class.</em>
+<a name="51" href="#51">51</a>  <em>   *</em>
+<a name="52" href="#52">52</a>  <em>   * @return the list model</em>
+<a name="53" href="#53">53</a>  <em>   */</em>
+<a name="54" href="#54">54</a>    <strong>public</strong> ListModel getModel() {
+<a name="55" href="#55">55</a>      <strong>return</strong> model;
+<a name="56" href="#56">56</a>    }
+<a name="57" href="#57">57</a>  
+<a name="58" href="#58">58</a>      <em>/**<em>* {@inheritDoc} */</em></em>
+<a name="59" href="#59">59</a>    <strong>protected</strong> <strong>void</strong> append(<strong>final</strong> LoggingEvent event) {
+<a name="60" href="#60">60</a>      model.addElement(event);
+<a name="61" href="#61">61</a>    }
+<a name="62" href="#62">62</a>  
+<a name="63" href="#63">63</a>      <em>/**<em>* {@inheritDoc} */</em></em>
+<a name="64" href="#64">64</a>    <strong>public</strong> <strong>void</strong> close() {
+<a name="65" href="#65">65</a>      clearModel();
+<a name="66" href="#66">66</a>    }
+<a name="67" href="#67">67</a>  
+<a name="68" href="#68">68</a>    <em>/**<em>*</em></em>
+<a name="69" href="#69">69</a>  <em>   * Removes all the Events from the model.</em>
+<a name="70" href="#70">70</a>  <em>   */</em>
+<a name="71" href="#71">71</a>    <strong>public</strong> <strong>void</strong> clearModel() {
+<a name="72" href="#72">72</a>      model.clear();
+<a name="73" href="#73">73</a>    }
+<a name="74" href="#74">74</a>  
+<a name="75" href="#75">75</a>      <em>/**<em>* {@inheritDoc} */</em></em>
+<a name="76" href="#76">76</a>    <strong>public</strong> <strong>boolean</strong> requiresLayout() {
+<a name="77" href="#77">77</a>        <strong>return</strong> false;
+<a name="78" href="#78">78</a>    }
+<a name="79" href="#79">79</a>  
+<a name="80" href="#80">80</a>  }
+</pre>
+<hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body>
+</html>
+

Propchange: logging/site/trunk/docs/log4j/companions/receivers/xref/org/apache/log4j/varia/ListModelAppender.html
------------------------------------------------------------------------------
    svn:mime-type = text/html



Mime
View raw message