blob: e0ce185635f916ae3e35c31580cba885f89700f1 [file] [log] [blame]
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (11.0.12) on Tue Sep 06 11:23:22 EDT 2022 -->
<title>UDPAppender (Apache Chainsaw 2.1.0 API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="dc.created" content="2022-09-06">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
<script type="text/javascript" src="../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../jquery/jquery-3.5.1.js"></script>
<script type="text/javascript" src="../../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="UDPAppender (Apache Chainsaw 2.1.0 API)";
}
}
catch(err) {
}
//-->
var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../";
var useModuleDirectories = true;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/UDPAppender.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">org.apache.log4j.net</a></div>
<h2 title="Class UDPAppender" class="title">Class UDPAppender</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>org.apache.log4j.AppenderSkeleton</li>
<li>
<ul class="inheritance">
<li>org.apache.log4j.net.UDPAppender</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><code>org.apache.log4j.Appender</code>, <code><a href="NetworkBased.html" title="interface in org.apache.log4j.net">NetworkBased</a></code>, <code><a href="PortBased.html" title="interface in org.apache.log4j.net">PortBased</a></code>, <code>org.apache.log4j.spi.OptionHandler</code></dd>
</dl>
<hr>
<pre>public class <span class="typeNameLabel">UDPAppender</span>
extends org.apache.log4j.AppenderSkeleton
implements <a href="PortBased.html" title="interface in org.apache.log4j.net">PortBased</a></pre>
<div class="block">Sends log information as a UDP datagrams.
<p>
<p>The UDPAppender is meant to be used as a diagnostic logging tool
so that logging can be monitored by a simple UDP client.
<p>
<p>Messages are not sent as LoggingEvent objects but as text after
applying the designated Layout.
<p>
<p>The port and remoteHost properties can be set in configuration properties.
By setting the remoteHost to a broadcast address any number of clients can
listen for log messages.
<p>
<p>This was inspired and really extended/copied from <code>SocketAppender</code>.
Please see the docs for the proper credit to the authors of that class.</div>
<dl>
<dt><span class="simpleTagLabel">Author:</span></dt>
<dd><a href="mailto:kbrown@versatilesolutions.com">Kevin Brown</a>, Scott Deboy &lt;sdeboy@apache.org&gt;</dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Field</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#DEFAULT_PORT">DEFAULT_PORT</a></span></code></th>
<td class="colLast">
<div class="block">The default port number for the UDP packets, 9991.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ZONE">ZONE</a></span></code></th>
<td class="colLast">
<div class="block">The MulticastDNS zone advertised by a UDPAppender</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="fields.inherited.from.class.org.apache.log4j.AppenderSkeleton">
<!-- -->
</a>
<h3>Fields inherited from class&nbsp;org.apache.log4j.AppenderSkeleton</h3>
<code>closed, errorHandler, headFilter, layout, name, tailFilter, threshold</code></li>
</ul>
</li>
</ul>
</section>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Constructor</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E()">UDPAppender</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="rowColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(java.lang.String,int)">UDPAppender</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;host,
int&nbsp;port)</code></th>
<td class="colLast">
<div class="block">Sends UDP packets to the <code>address</code> and <code>port</code>.</div>
</td>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(java.net.InetAddress,int)">UDPAppender</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/net/InetAddress.html?is-external=true" title="class or interface in java.net" class="externalLink">InetAddress</a>&nbsp;address,
int&nbsp;port)</code></th>
<td class="colLast">
<div class="block">Sends UDP packets to the <code>address</code> and <code>port</code>.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ========== METHOD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#activateOptions()">activateOptions</a></span>()</code></th>
<td class="colLast">
<div class="block">Open the UDP sender for the <b>RemoteHost</b> and <b>Port</b>.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#append(org.apache.log4j.spi.LoggingEvent)">append</a></span>&#8203;(org.apache.log4j.spi.LoggingEvent&nbsp;event)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#cleanUp()">cleanUp</a></span>()</code></th>
<td class="colLast">
<div class="block">Close the UDP Socket and release the underlying
connector thread if it has been created</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#close()">close</a></span>()</code></th>
<td class="colLast">
<div class="block">Close this appender.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getApplication()">getApplication</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns value of the <b>App</b> option.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getEncoding()">getEncoding</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns value of the <b>Encoding</b> option.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getPort()">getPort</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns value of the <b>Port</b> option.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getRemoteHost()">getRemoteHost</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns value of the <b>RemoteHost</b> option.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isActive()">isActive</a></span>()</code></th>
<td class="colLast">
<div class="block">Get if item is active.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isAdvertiseViaMulticastDNS()">isAdvertiseViaMulticastDNS</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#requiresLayout()">requiresLayout</a></span>()</code></th>
<td class="colLast">
<div class="block">The UDPAppender uses layouts.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setAdvertiseViaMulticastDNS(boolean)">setAdvertiseViaMulticastDNS</a></span>&#8203;(boolean&nbsp;advertiseViaMulticastDNS)</code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setApplication(java.lang.String)">setApplication</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;app)</code></th>
<td class="colLast">
<div class="block">The <b>App</b> option takes a string value which should be the name of the application getting logged.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setEncoding(java.lang.String)">setEncoding</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;encoding)</code></th>
<td class="colLast">
<div class="block">The <b>Encoding</b> option specifies how the bytes are encoded.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setPort(int)">setPort</a></span>&#8203;(int&nbsp;port)</code></th>
<td class="colLast">
<div class="block">The <b>Port</b> option takes a positive integer representing
the port where UDP packets will be sent.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setRemoteHost(java.lang.String)">setRemoteHost</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;host)</code></th>
<td class="colLast">
<div class="block">The <b>RemoteHost</b> option takes a string value which should be
the host name or ipaddress to send the UDP packets.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.org.apache.log4j.AppenderSkeleton">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.log4j.AppenderSkeleton</h3>
<code>addFilter, clearFilters, doAppend, finalize, getErrorHandler, getFilter, getFirstFilter, getLayout, getName, getThreshold, isAsSevereAsThreshold, setErrorHandler, setLayout, setName, setThreshold</code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang" class="externalLink">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang" class="externalLink">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang" class="externalLink">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang" class="externalLink">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang" class="externalLink">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang" class="externalLink">toString</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait(long,int)" title="class or interface in java.lang" class="externalLink">wait</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.org.apache.log4j.net.NetworkBased">
<!-- -->
</a>
<h3>Methods inherited from interface&nbsp;org.apache.log4j.net.<a href="NetworkBased.html" title="interface in org.apache.log4j.net">NetworkBased</a></h3>
<code><a href="NetworkBased.html#getName()">getName</a></code></li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a id="DEFAULT_PORT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_PORT</h4>
<pre>public static final&nbsp;int DEFAULT_PORT</pre>
<div class="block">The default port number for the UDP packets, 9991.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../constant-values.html#org.apache.log4j.net.UDPAppender.DEFAULT_PORT">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="ZONE">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>ZONE</h4>
<pre>public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> ZONE</pre>
<div class="block">The MulticastDNS zone advertised by a UDPAppender</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../constant-values.html#org.apache.log4j.net.UDPAppender.ZONE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a id="&lt;init&gt;()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>UDPAppender</h4>
<pre>public&nbsp;UDPAppender()</pre>
</li>
</ul>
<a id="&lt;init&gt;(java.net.InetAddress,int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>UDPAppender</h4>
<pre>public&nbsp;UDPAppender&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/net/InetAddress.html?is-external=true" title="class or interface in java.net" class="externalLink">InetAddress</a>&nbsp;address,
int&nbsp;port)</pre>
<div class="block">Sends UDP packets to the <code>address</code> and <code>port</code>.</div>
</li>
</ul>
<a id="&lt;init&gt;(java.lang.String,int)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>UDPAppender</h4>
<pre>public&nbsp;UDPAppender&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;host,
int&nbsp;port)</pre>
<div class="block">Sends UDP packets to the <code>address</code> and <code>port</code>.</div>
</li>
</ul>
</li>
</ul>
</section>
<!-- ============ METHOD DETAIL ========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a id="activateOptions()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>activateOptions</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;activateOptions()</pre>
<div class="block">Open the UDP sender for the <b>RemoteHost</b> and <b>Port</b>.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code>activateOptions</code>&nbsp;in interface&nbsp;<code>org.apache.log4j.spi.OptionHandler</code></dd>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code>activateOptions</code>&nbsp;in class&nbsp;<code>org.apache.log4j.AppenderSkeleton</code></dd>
</dl>
</li>
</ul>
<a id="close()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>close</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;close()</pre>
<div class="block">Close this appender.
<p>This will mark the appender as closed and
call then <a href="#cleanUp()"><code>cleanUp()</code></a> method.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code>close</code>&nbsp;in interface&nbsp;<code>org.apache.log4j.Appender</code></dd>
</dl>
</li>
</ul>
<a id="cleanUp()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>cleanUp</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;cleanUp()</pre>
<div class="block">Close the UDP Socket and release the underlying
connector thread if it has been created</div>
</li>
</ul>
<a id="append(org.apache.log4j.spi.LoggingEvent)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>append</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;append&#8203;(org.apache.log4j.spi.LoggingEvent&nbsp;event)</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code>append</code>&nbsp;in class&nbsp;<code>org.apache.log4j.AppenderSkeleton</code></dd>
</dl>
</li>
</ul>
<a id="isActive()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isActive</h4>
<pre class="methodSignature">public&nbsp;boolean&nbsp;isActive()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from interface:&nbsp;<code><a href="NetworkBased.html#isActive()">NetworkBased</a></code></span></div>
<div class="block">Get if item is active.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="NetworkBased.html#isActive()">isActive</a></code>&nbsp;in interface&nbsp;<code><a href="NetworkBased.html" title="interface in org.apache.log4j.net">NetworkBased</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>if true, item is active.</dd>
</dl>
</li>
</ul>
<a id="requiresLayout()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>requiresLayout</h4>
<pre class="methodSignature">public&nbsp;boolean&nbsp;requiresLayout()</pre>
<div class="block">The UDPAppender uses layouts. Hence, this method returns
<code>true</code>.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code>requiresLayout</code>&nbsp;in interface&nbsp;<code>org.apache.log4j.Appender</code></dd>
</dl>
</li>
</ul>
<a id="setRemoteHost(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setRemoteHost</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setRemoteHost&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;host)</pre>
<div class="block">The <b>RemoteHost</b> option takes a string value which should be
the host name or ipaddress to send the UDP packets.</div>
</li>
</ul>
<a id="getRemoteHost()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRemoteHost</h4>
<pre class="methodSignature">public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;getRemoteHost()</pre>
<div class="block">Returns value of the <b>RemoteHost</b> option.</div>
</li>
</ul>
<a id="setApplication(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setApplication</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setApplication&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;app)</pre>
<div class="block">The <b>App</b> option takes a string value which should be the name of the application getting logged.
If property was already set (via system property), don't set here.</div>
</li>
</ul>
<a id="getApplication()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getApplication</h4>
<pre class="methodSignature">public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;getApplication()</pre>
<div class="block">Returns value of the <b>App</b> option.</div>
</li>
</ul>
<a id="setEncoding(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setEncoding</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setEncoding&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;encoding)</pre>
<div class="block">The <b>Encoding</b> option specifies how the bytes are encoded. If this option is not specified,
the System encoding is used.</div>
</li>
</ul>
<a id="getEncoding()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEncoding</h4>
<pre class="methodSignature">public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;getEncoding()</pre>
<div class="block">Returns value of the <b>Encoding</b> option.</div>
</li>
</ul>
<a id="setPort(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setPort</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setPort&#8203;(int&nbsp;port)</pre>
<div class="block">The <b>Port</b> option takes a positive integer representing
the port where UDP packets will be sent.</div>
</li>
</ul>
<a id="getPort()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPort</h4>
<pre class="methodSignature">public&nbsp;int&nbsp;getPort()</pre>
<div class="block">Returns value of the <b>Port</b> option.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="PortBased.html#getPort()">getPort</a></code>&nbsp;in interface&nbsp;<code><a href="PortBased.html" title="interface in org.apache.log4j.net">PortBased</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>int port number</dd>
</dl>
</li>
</ul>
<a id="setAdvertiseViaMulticastDNS(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setAdvertiseViaMulticastDNS</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setAdvertiseViaMulticastDNS&#8203;(boolean&nbsp;advertiseViaMulticastDNS)</pre>
</li>
</ul>
<a id="isAdvertiseViaMulticastDNS()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>isAdvertiseViaMulticastDNS</h4>
<pre class="methodSignature">public&nbsp;boolean&nbsp;isAdvertiseViaMulticastDNS()</pre>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/UDPAppender.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
<p class="legalCopy"><small><p align="center">Copyright &#169; 2002-2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.<br /> Apache Logging, Apache Log4j, Log4j, Apache Chainsaw, Chainsaw, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.</p></small></p>
</footer>
</body>
</html>