blob: 3926a2439268419938519accac5bd0eeb2b528f9 [file] [log] [blame]
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>ServerBuilder (grpc-all 1.75.0 API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../jquery/jquery-ui.min.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../jquery-ui.overrides.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.7.1.min.js"></script>
<script type="text/javascript" src="../../jquery/jquery-ui.min.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="ServerBuilder (grpc-all 1.75.0 API)";
}
}
catch(err) {
}
//-->
var data = {"i0":6,"i1":6,"i2":10,"i3":10,"i4":10,"i5":6,"i6":10,"i7":6,"i8":6,"i9":6,"i10":6,"i11":6,"i12":9,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":6,"i26":10};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],4:["t3","Abstract 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/ServerBuilder.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>Field&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>Field&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">io.grpc</a></div>
<h2 title="Class ServerBuilder" class="title">Class ServerBuilder&lt;T extends ServerBuilder&lt;T&gt;&gt;</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>io.grpc.ServerBuilder&lt;T&gt;</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - The concrete type of this builder.</dd>
</dl>
<dl>
<dt>Direct Known Subclasses:</dt>
<dd><code><a href="ForwardingServerBuilder.html" title="class in io.grpc">ForwardingServerBuilder</a></code></dd>
</dl>
<hr>
<pre>public abstract class <span class="typeNameLabel">ServerBuilder&lt;T extends ServerBuilder&lt;T&gt;&gt;</span>
extends <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></pre>
<div class="block">A builder for <a href="Server.html" title="class in io.grpc"><code>Server</code></a> instances.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.0.0</dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<section>
<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()">ServerBuilder</a></span>()</code></th>
<td class="colLast">&nbsp;</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ========== METHOD SUMMARY =========== -->
<section>
<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="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></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="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract 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>abstract <a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addService(io.grpc.BindableService)">addService</a></span>&#8203;(<a href="BindableService.html" title="interface in io.grpc">BindableService</a>&nbsp;bindableService)</code></th>
<td class="colLast">
<div class="block">Adds a service implementation to the handler registry.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>abstract <a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addService(io.grpc.ServerServiceDefinition)">addService</a></span>&#8203;(<a href="ServerServiceDefinition.html" title="class in io.grpc">ServerServiceDefinition</a>&nbsp;service)</code></th>
<td class="colLast">
<div class="block">Adds a service implementation to the handler registry.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addServices(java.util.List)">addServices</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a>&lt;<a href="ServerServiceDefinition.html" title="class in io.grpc">ServerServiceDefinition</a>&gt;&nbsp;services)</code></th>
<td class="colLast">
<div class="block">Adds a list of service implementations to the handler registry together.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addStreamTracerFactory(io.grpc.ServerStreamTracer.Factory)">addStreamTracerFactory</a></span>&#8203;(<a href="ServerStreamTracer.Factory.html" title="class in io.grpc">ServerStreamTracer.Factory</a>&nbsp;factory)</code></th>
<td class="colLast">
<div class="block">Adds a <a href="ServerStreamTracer.Factory.html" title="class in io.grpc"><code>ServerStreamTracer.Factory</code></a> to measure server-side traffic.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code><a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#addTransportFilter(io.grpc.ServerTransportFilter)">addTransportFilter</a></span>&#8203;(<a href="ServerTransportFilter.html" title="class in io.grpc">ServerTransportFilter</a>&nbsp;filter)</code></th>
<td class="colLast">
<div class="block">Adds a <a href="ServerTransportFilter.html" title="class in io.grpc"><code>ServerTransportFilter</code></a>.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>abstract <a href="Server.html" title="class in io.grpc">Server</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#build()">build</a></span>()</code></th>
<td class="colLast">
<div class="block">Builds a server using the given parameters.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code><a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#callExecutor(io.grpc.ServerCallExecutorSupplier)">callExecutor</a></span>&#8203;(<a href="ServerCallExecutorSupplier.html" title="interface in io.grpc">ServerCallExecutorSupplier</a>&nbsp;executorSupplier)</code></th>
<td class="colLast">
<div class="block">Allows for defining a way to provide a custom executor to handle the server call.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>abstract <a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#compressorRegistry(io.grpc.CompressorRegistry)">compressorRegistry</a></span>&#8203;(<a href="CompressorRegistry.html" title="class in io.grpc">CompressorRegistry</a>&nbsp;registry)</code></th>
<td class="colLast">
<div class="block">Set the compression registry for use in the channel.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>abstract <a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#decompressorRegistry(io.grpc.DecompressorRegistry)">decompressorRegistry</a></span>&#8203;(<a href="DecompressorRegistry.html" title="class in io.grpc">DecompressorRegistry</a>&nbsp;registry)</code></th>
<td class="colLast">
<div class="block">Set the decompression registry for use in the channel.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>abstract <a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#directExecutor()">directExecutor</a></span>()</code></th>
<td class="colLast">
<div class="block">Execute application code directly in the transport thread.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>abstract <a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#executor(java.util.concurrent.Executor)">executor</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Executor.html?is-external=true" title="class or interface in java.util.concurrent" class="externalLink">Executor</a>&nbsp;executor)</code></th>
<td class="colLast">
<div class="block">Provides a custom executor.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>abstract <a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#fallbackHandlerRegistry(io.grpc.HandlerRegistry)">fallbackHandlerRegistry</a></span>&#8203;(<a href="HandlerRegistry.html" title="class in io.grpc">HandlerRegistry</a>&nbsp;fallbackRegistry)</code></th>
<td class="colLast">
<div class="block">Sets a fallback handler registry that will be looked up in if a method is not found in the
primary registry.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>static <a href="ServerBuilder.html" title="class in io.grpc">ServerBuilder</a>&lt;?&gt;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#forPort(int)">forPort</a></span>&#8203;(int&nbsp;port)</code></th>
<td class="colLast">
<div class="block">Static factory for creating a new ServerBuilder.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code><a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#handshakeTimeout(long,java.util.concurrent.TimeUnit)">handshakeTimeout</a></span>&#8203;(long&nbsp;timeout,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/TimeUnit.html?is-external=true" title="class or interface in java.util.concurrent" class="externalLink">TimeUnit</a>&nbsp;unit)</code></th>
<td class="colLast">
<div class="block">Sets the permitted time for new connections to complete negotiation handshakes before being
killed.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code><a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#intercept(io.grpc.ServerInterceptor)">intercept</a></span>&#8203;(<a href="ServerInterceptor.html" title="interface in io.grpc">ServerInterceptor</a>&nbsp;interceptor)</code></th>
<td class="colLast">
<div class="block">Adds a <a href="ServerInterceptor.html" title="interface in io.grpc"><code>ServerInterceptor</code></a> that is run for all services on the server.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code><a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#keepAliveTime(long,java.util.concurrent.TimeUnit)">keepAliveTime</a></span>&#8203;(long&nbsp;keepAliveTime,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/TimeUnit.html?is-external=true" title="class or interface in java.util.concurrent" class="externalLink">TimeUnit</a>&nbsp;timeUnit)</code></th>
<td class="colLast">
<div class="block">Sets the time without read activity before sending a keepalive ping.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code><a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#keepAliveTimeout(long,java.util.concurrent.TimeUnit)">keepAliveTimeout</a></span>&#8203;(long&nbsp;keepAliveTimeout,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/TimeUnit.html?is-external=true" title="class or interface in java.util.concurrent" class="externalLink">TimeUnit</a>&nbsp;timeUnit)</code></th>
<td class="colLast">
<div class="block">Sets a time waiting for read activity after sending a keepalive ping.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code><a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#maxConnectionAge(long,java.util.concurrent.TimeUnit)">maxConnectionAge</a></span>&#8203;(long&nbsp;maxConnectionAge,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/TimeUnit.html?is-external=true" title="class or interface in java.util.concurrent" class="externalLink">TimeUnit</a>&nbsp;timeUnit)</code></th>
<td class="colLast">
<div class="block">Sets the maximum connection age, connections lasting longer than which will be gracefully
terminated.</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code><a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#maxConnectionAgeGrace(long,java.util.concurrent.TimeUnit)">maxConnectionAgeGrace</a></span>&#8203;(long&nbsp;maxConnectionAgeGrace,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/TimeUnit.html?is-external=true" title="class or interface in java.util.concurrent" class="externalLink">TimeUnit</a>&nbsp;timeUnit)</code></th>
<td class="colLast">
<div class="block">Sets the grace time for the graceful connection termination.</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code><a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#maxConnectionIdle(long,java.util.concurrent.TimeUnit)">maxConnectionIdle</a></span>&#8203;(long&nbsp;maxConnectionIdle,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/TimeUnit.html?is-external=true" title="class or interface in java.util.concurrent" class="externalLink">TimeUnit</a>&nbsp;timeUnit)</code></th>
<td class="colLast">
<div class="block">Sets the maximum connection idle time, connections being idle for longer than which will be
gracefully terminated.</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code><a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#maxInboundMessageSize(int)">maxInboundMessageSize</a></span>&#8203;(int&nbsp;bytes)</code></th>
<td class="colLast">
<div class="block">Sets the maximum message size allowed to be received on the server.</div>
</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code><a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#maxInboundMetadataSize(int)">maxInboundMetadataSize</a></span>&#8203;(int&nbsp;bytes)</code></th>
<td class="colLast">
<div class="block">Sets the maximum size of metadata allowed to be received.</div>
</td>
</tr>
<tr id="i22" class="altColor">
<td class="colFirst"><code><a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#permitKeepAliveTime(long,java.util.concurrent.TimeUnit)">permitKeepAliveTime</a></span>&#8203;(long&nbsp;keepAliveTime,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/TimeUnit.html?is-external=true" title="class or interface in java.util.concurrent" class="externalLink">TimeUnit</a>&nbsp;timeUnit)</code></th>
<td class="colLast">
<div class="block">Specify the most aggressive keep-alive time clients are permitted to configure.</div>
</td>
</tr>
<tr id="i23" class="rowColor">
<td class="colFirst"><code><a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#permitKeepAliveWithoutCalls(boolean)">permitKeepAliveWithoutCalls</a></span>&#8203;(boolean&nbsp;permit)</code></th>
<td class="colLast">
<div class="block">Sets whether to allow clients to send keep-alive HTTP/2 PINGs even if there are no outstanding
RPCs on the connection.</div>
</td>
</tr>
<tr id="i24" class="altColor">
<td class="colFirst"><code><a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setBinaryLog(io.grpc.BinaryLog)">setBinaryLog</a></span>&#8203;(<a href="BinaryLog.html" title="class in io.grpc">BinaryLog</a>&nbsp;binaryLog)</code></th>
<td class="colLast">
<div class="block">Sets the BinaryLog object that this server should log to.</div>
</td>
</tr>
<tr id="i25" class="rowColor">
<td class="colFirst"><code>abstract <a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#useTransportSecurity(java.io.File,java.io.File)">useTransportSecurity</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io" class="externalLink">File</a>&nbsp;certChain,
<a href="https://docs.oracle.com/javase/8/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io" class="externalLink">File</a>&nbsp;privateKey)</code></th>
<td class="colLast">
<div class="block">Makes the server use TLS.</div>
</td>
</tr>
<tr id="i26" class="altColor">
<td class="colFirst"><code><a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#useTransportSecurity(java.io.InputStream,java.io.InputStream)">useTransportSecurity</a></span>&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io" class="externalLink">InputStream</a>&nbsp;certChain,
<a href="https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io" class="externalLink">InputStream</a>&nbsp;privateKey)</code></th>
<td class="colLast">
<div class="block">Makes the server use TLS.</div>
</td>
</tr>
</table>
<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#finalize--" title="class or interface in java.lang" class="externalLink">finalize</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>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<section>
<ul class="blockList">
<li class="blockList"><a id="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a id="&lt;init&gt;()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>ServerBuilder</h4>
<pre>public&nbsp;ServerBuilder()</pre>
</li>
</ul>
</li>
</ul>
</section>
<!-- ============ METHOD DETAIL ========== -->
<section>
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a id="forPort(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>forPort</h4>
<pre class="methodSignature">public static&nbsp;<a href="ServerBuilder.html" title="class in io.grpc">ServerBuilder</a>&lt;?&gt;&nbsp;forPort&#8203;(int&nbsp;port)</pre>
<div class="block">Static factory for creating a new ServerBuilder.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>port</code> - the port to listen on</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.0.0</dd>
</dl>
</li>
</ul>
<a id="directExecutor()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>directExecutor</h4>
<pre class="methodSignature">public abstract&nbsp;<a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a>&nbsp;directExecutor()</pre>
<div class="block">Execute application code directly in the transport thread.
<p>Depending on the underlying transport, using a direct executor may lead to substantial
performance improvements. However, it also requires the application to not block under
any circumstances.
<p>Calling this method is semantically equivalent to calling <a href="#executor(java.util.concurrent.Executor)"><code>executor(Executor)</code></a> and
passing in a direct executor. However, this is the preferred way as it may allow the transport
to perform special optimizations.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.0.0</dd>
</dl>
</li>
</ul>
<a id="executor(java.util.concurrent.Executor)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>executor</h4>
<pre class="methodSignature">public abstract&nbsp;<a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a>&nbsp;executor&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/javax/annotation/Nullable.html?is-external=true" title="class or interface in javax.annotation" class="externalLink">@Nullable</a>
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Executor.html?is-external=true" title="class or interface in java.util.concurrent" class="externalLink">Executor</a>&nbsp;executor)</pre>
<div class="block">Provides a custom executor.
<p>It's an optional parameter. If the user has not provided an executor when the server is
built, the builder will use a static cached thread pool.
<p>The server won't take ownership of the given executor. It's caller's responsibility to
shut down the executor when it's desired.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.0.0</dd>
</dl>
</li>
</ul>
<a id="callExecutor(io.grpc.ServerCallExecutorSupplier)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>callExecutor</h4>
<pre class="methodSignature"><a href="ExperimentalApi.html" title="annotation in io.grpc">@ExperimentalApi</a>("https://github.com/grpc/grpc-java/issues/8274")
public&nbsp;<a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a>&nbsp;callExecutor&#8203;(<a href="ServerCallExecutorSupplier.html" title="interface in io.grpc">ServerCallExecutorSupplier</a>&nbsp;executorSupplier)</pre>
<div class="block">Allows for defining a way to provide a custom executor to handle the server call.
This executor is the result of calling
<a href="ServerCallExecutorSupplier.html#getExecutor(io.grpc.ServerCall,io.grpc.Metadata)"><code>ServerCallExecutorSupplier.getExecutor(ServerCall, Metadata)</code></a> per RPC.
<p>It's an optional parameter. If it is provided, the <a href="#executor(java.util.concurrent.Executor)"><code>executor(Executor)</code></a> would still
run necessary tasks before the <a href="ServerCallExecutorSupplier.html" title="interface in io.grpc"><code>ServerCallExecutorSupplier</code></a> is ready to be called, then
it switches over. But if calling <a href="ServerCallExecutorSupplier.html" title="interface in io.grpc"><code>ServerCallExecutorSupplier</code></a> returns null, the server
call is still handled by the default <a href="#executor(java.util.concurrent.Executor)"><code>executor(Executor)</code></a> as a fallback.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>executorSupplier</code> - the server call executor provider</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.39.0</dd>
</dl>
</li>
</ul>
<a id="addService(io.grpc.ServerServiceDefinition)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addService</h4>
<pre class="methodSignature">public abstract&nbsp;<a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a>&nbsp;addService&#8203;(<a href="ServerServiceDefinition.html" title="class in io.grpc">ServerServiceDefinition</a>&nbsp;service)</pre>
<div class="block">Adds a service implementation to the handler registry.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>service</code> - ServerServiceDefinition object</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.0.0</dd>
</dl>
</li>
</ul>
<a id="addService(io.grpc.BindableService)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addService</h4>
<pre class="methodSignature">public abstract&nbsp;<a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a>&nbsp;addService&#8203;(<a href="BindableService.html" title="interface in io.grpc">BindableService</a>&nbsp;bindableService)</pre>
<div class="block">Adds a service implementation to the handler registry.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>bindableService</code> - BindableService object</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.0.0</dd>
</dl>
</li>
</ul>
<a id="addServices(java.util.List)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addServices</h4>
<pre class="methodSignature">public final&nbsp;<a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a>&nbsp;addServices&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util" class="externalLink">List</a>&lt;<a href="ServerServiceDefinition.html" title="class in io.grpc">ServerServiceDefinition</a>&gt;&nbsp;services)</pre>
<div class="block">Adds a list of service implementations to the handler registry together. This exists for
convenience - equivalent to repeatedly calling addService() with different services.
If multiple services on the list use the same name, only the last one on the list will
be added.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>services</code> - the list of ServerServiceDefinition objects</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.37.0</dd>
</dl>
</li>
</ul>
<a id="intercept(io.grpc.ServerInterceptor)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>intercept</h4>
<pre class="methodSignature">public&nbsp;<a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a>&nbsp;intercept&#8203;(<a href="ServerInterceptor.html" title="interface in io.grpc">ServerInterceptor</a>&nbsp;interceptor)</pre>
<div class="block">Adds a <a href="ServerInterceptor.html" title="interface in io.grpc"><code>ServerInterceptor</code></a> that is run for all services on the server. Interceptors
added through this method always run before per-service interceptors added through <a href="ServerInterceptors.html" title="class in io.grpc"><code>ServerInterceptors</code></a>. Interceptors run in the reverse order in which they are added, just as
with consecutive calls to <code>ServerInterceptors.intercept()</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>interceptor</code> - the all-service interceptor</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.5.0</dd>
</dl>
</li>
</ul>
<a id="addTransportFilter(io.grpc.ServerTransportFilter)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addTransportFilter</h4>
<pre class="methodSignature"><a href="ExperimentalApi.html" title="annotation in io.grpc">@ExperimentalApi</a>("https://github.com/grpc/grpc-java/issues/2132")
public&nbsp;<a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a>&nbsp;addTransportFilter&#8203;(<a href="ServerTransportFilter.html" title="class in io.grpc">ServerTransportFilter</a>&nbsp;filter)</pre>
<div class="block">Adds a <a href="ServerTransportFilter.html" title="class in io.grpc"><code>ServerTransportFilter</code></a>. The order of filters being added is the order they will
be executed.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.2.0</dd>
</dl>
</li>
</ul>
<a id="addStreamTracerFactory(io.grpc.ServerStreamTracer.Factory)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addStreamTracerFactory</h4>
<pre class="methodSignature"><a href="ExperimentalApi.html" title="annotation in io.grpc">@ExperimentalApi</a>("https://github.com/grpc/grpc-java/issues/2861")
public&nbsp;<a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a>&nbsp;addStreamTracerFactory&#8203;(<a href="ServerStreamTracer.Factory.html" title="class in io.grpc">ServerStreamTracer.Factory</a>&nbsp;factory)</pre>
<div class="block">Adds a <a href="ServerStreamTracer.Factory.html" title="class in io.grpc"><code>ServerStreamTracer.Factory</code></a> to measure server-side traffic. The order of
factories being added is the order they will be executed.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.3.0</dd>
</dl>
</li>
</ul>
<a id="fallbackHandlerRegistry(io.grpc.HandlerRegistry)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>fallbackHandlerRegistry</h4>
<pre class="methodSignature">public abstract&nbsp;<a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a>&nbsp;fallbackHandlerRegistry&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/javax/annotation/Nullable.html?is-external=true" title="class or interface in javax.annotation" class="externalLink">@Nullable</a>
<a href="HandlerRegistry.html" title="class in io.grpc">HandlerRegistry</a>&nbsp;fallbackRegistry)</pre>
<div class="block">Sets a fallback handler registry that will be looked up in if a method is not found in the
primary registry. The primary registry (configured via <code>addService()</code>) is faster but
immutable. The fallback registry is more flexible and allows implementations to mutate over
time and load services on-demand.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.0.0</dd>
</dl>
</li>
</ul>
<a id="useTransportSecurity(java.io.File,java.io.File)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>useTransportSecurity</h4>
<pre class="methodSignature">public abstract&nbsp;<a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a>&nbsp;useTransportSecurity&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io" class="externalLink">File</a>&nbsp;certChain,
<a href="https://docs.oracle.com/javase/8/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io" class="externalLink">File</a>&nbsp;privateKey)</pre>
<div class="block">Makes the server use TLS.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>certChain</code> - file containing the full certificate chain</dd>
<dd><code>privateKey</code> - file containing the private key</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang" class="externalLink">UnsupportedOperationException</a></code> - if the server does not support TLS.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.0.0</dd>
</dl>
</li>
</ul>
<a id="useTransportSecurity(java.io.InputStream,java.io.InputStream)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>useTransportSecurity</h4>
<pre class="methodSignature">public&nbsp;<a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a>&nbsp;useTransportSecurity&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io" class="externalLink">InputStream</a>&nbsp;certChain,
<a href="https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io" class="externalLink">InputStream</a>&nbsp;privateKey)</pre>
<div class="block">Makes the server use TLS.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>certChain</code> - InputStream containing the full certificate chain</dd>
<dd><code>privateKey</code> - InputStream containing the private key</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang" class="externalLink">UnsupportedOperationException</a></code> - if the server does not support TLS, or does not support
reading these files from an InputStream.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.12.0</dd>
</dl>
</li>
</ul>
<a id="decompressorRegistry(io.grpc.DecompressorRegistry)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>decompressorRegistry</h4>
<pre class="methodSignature"><a href="ExperimentalApi.html" title="annotation in io.grpc">@ExperimentalApi</a>("https://github.com/grpc/grpc-java/issues/1704")
public abstract&nbsp;<a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a>&nbsp;decompressorRegistry&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/javax/annotation/Nullable.html?is-external=true" title="class or interface in javax.annotation" class="externalLink">@Nullable</a>
<a href="DecompressorRegistry.html" title="class in io.grpc">DecompressorRegistry</a>&nbsp;registry)</pre>
<div class="block">Set the decompression registry for use in the channel. This is an advanced API call and
shouldn't be used unless you are using custom message encoding. The default supported
decompressors are in <code>DecompressorRegistry.getDefaultInstance</code>.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.0.0</dd>
</dl>
</li>
</ul>
<a id="compressorRegistry(io.grpc.CompressorRegistry)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>compressorRegistry</h4>
<pre class="methodSignature"><a href="ExperimentalApi.html" title="annotation in io.grpc">@ExperimentalApi</a>("https://github.com/grpc/grpc-java/issues/1704")
public abstract&nbsp;<a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a>&nbsp;compressorRegistry&#8203;(<a href="https://docs.oracle.com/javase/8/docs/api/javax/annotation/Nullable.html?is-external=true" title="class or interface in javax.annotation" class="externalLink">@Nullable</a>
<a href="CompressorRegistry.html" title="class in io.grpc">CompressorRegistry</a>&nbsp;registry)</pre>
<div class="block">Set the compression registry for use in the channel. This is an advanced API call and
shouldn't be used unless you are using custom message encoding. The default supported
compressors are in <code>CompressorRegistry.getDefaultInstance</code>.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.0.0</dd>
</dl>
</li>
</ul>
<a id="handshakeTimeout(long,java.util.concurrent.TimeUnit)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>handshakeTimeout</h4>
<pre class="methodSignature">public&nbsp;<a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a>&nbsp;handshakeTimeout&#8203;(long&nbsp;timeout,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/TimeUnit.html?is-external=true" title="class or interface in java.util.concurrent" class="externalLink">TimeUnit</a>&nbsp;unit)</pre>
<div class="block">Sets the permitted time for new connections to complete negotiation handshakes before being
killed. The default value is 2 minutes.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></code> - if timeout is negative</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang" class="externalLink">UnsupportedOperationException</a></code> - if unsupported</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.8.0</dd>
</dl>
</li>
</ul>
<a id="keepAliveTime(long,java.util.concurrent.TimeUnit)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>keepAliveTime</h4>
<pre class="methodSignature"><a href="ExperimentalApi.html" title="annotation in io.grpc">@ExperimentalApi</a>("https://github.com/grpc/grpc-java/issues/9009")
public&nbsp;<a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a>&nbsp;keepAliveTime&#8203;(long&nbsp;keepAliveTime,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/TimeUnit.html?is-external=true" title="class or interface in java.util.concurrent" class="externalLink">TimeUnit</a>&nbsp;timeUnit)</pre>
<div class="block">Sets the time without read activity before sending a keepalive ping. An unreasonably small
value might be increased, and <code>Long.MAX_VALUE</code> nano seconds or an unreasonably large
value will disable keepalive. The typical default is two hours when supported.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></code> - if time is not positive</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang" class="externalLink">UnsupportedOperationException</a></code> - if unsupported</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.47.0</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="https://github.com/grpc/proposal/blob/master/A9-server-side-conn-mgt.md">gRFC A9
Server-side Connection Management</a></dd>
</dl>
</li>
</ul>
<a id="keepAliveTimeout(long,java.util.concurrent.TimeUnit)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>keepAliveTimeout</h4>
<pre class="methodSignature"><a href="ExperimentalApi.html" title="annotation in io.grpc">@ExperimentalApi</a>("https://github.com/grpc/grpc-java/issues/9009")
public&nbsp;<a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a>&nbsp;keepAliveTimeout&#8203;(long&nbsp;keepAliveTimeout,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/TimeUnit.html?is-external=true" title="class or interface in java.util.concurrent" class="externalLink">TimeUnit</a>&nbsp;timeUnit)</pre>
<div class="block">Sets a time waiting for read activity after sending a keepalive ping. If the time expires
without any read activity on the connection, the connection is considered dead. An unreasonably
small value might be increased. Defaults to 20 seconds when supported.
<p>This value should be at least multiple times the RTT to allow for lost packets.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></code> - if timeout is not positive</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang" class="externalLink">UnsupportedOperationException</a></code> - if unsupported</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.47.0</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="https://github.com/grpc/proposal/blob/master/A9-server-side-conn-mgt.md">gRFC A9
Server-side Connection Management</a></dd>
</dl>
</li>
</ul>
<a id="maxConnectionIdle(long,java.util.concurrent.TimeUnit)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>maxConnectionIdle</h4>
<pre class="methodSignature"><a href="ExperimentalApi.html" title="annotation in io.grpc">@ExperimentalApi</a>("https://github.com/grpc/grpc-java/issues/9009")
public&nbsp;<a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a>&nbsp;maxConnectionIdle&#8203;(long&nbsp;maxConnectionIdle,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/TimeUnit.html?is-external=true" title="class or interface in java.util.concurrent" class="externalLink">TimeUnit</a>&nbsp;timeUnit)</pre>
<div class="block">Sets the maximum connection idle time, connections being idle for longer than which will be
gracefully terminated. Idleness duration is defined since the most recent time the number of
outstanding RPCs became zero or the connection establishment. An unreasonably small value might
be increased. <code>Long.MAX_VALUE</code> nano seconds or an unreasonably large value will disable
max connection idle.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></code> - if idle is not positive</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang" class="externalLink">UnsupportedOperationException</a></code> - if unsupported</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.47.0</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="https://github.com/grpc/proposal/blob/master/A9-server-side-conn-mgt.md">gRFC A9
Server-side Connection Management</a></dd>
</dl>
</li>
</ul>
<a id="maxConnectionAge(long,java.util.concurrent.TimeUnit)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>maxConnectionAge</h4>
<pre class="methodSignature"><a href="ExperimentalApi.html" title="annotation in io.grpc">@ExperimentalApi</a>("https://github.com/grpc/grpc-java/issues/9009")
public&nbsp;<a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a>&nbsp;maxConnectionAge&#8203;(long&nbsp;maxConnectionAge,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/TimeUnit.html?is-external=true" title="class or interface in java.util.concurrent" class="externalLink">TimeUnit</a>&nbsp;timeUnit)</pre>
<div class="block">Sets the maximum connection age, connections lasting longer than which will be gracefully
terminated. An unreasonably small value might be increased. A random jitter of +/-10% will be
added to it. <code>Long.MAX_VALUE</code> nano seconds or an unreasonably large value will disable
max connection age.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></code> - if age is not positive</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang" class="externalLink">UnsupportedOperationException</a></code> - if unsupported</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.47.0</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="https://github.com/grpc/proposal/blob/master/A9-server-side-conn-mgt.md">gRFC A9
Server-side Connection Management</a></dd>
</dl>
</li>
</ul>
<a id="maxConnectionAgeGrace(long,java.util.concurrent.TimeUnit)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>maxConnectionAgeGrace</h4>
<pre class="methodSignature"><a href="ExperimentalApi.html" title="annotation in io.grpc">@ExperimentalApi</a>("https://github.com/grpc/grpc-java/issues/9009")
public&nbsp;<a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a>&nbsp;maxConnectionAgeGrace&#8203;(long&nbsp;maxConnectionAgeGrace,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/TimeUnit.html?is-external=true" title="class or interface in java.util.concurrent" class="externalLink">TimeUnit</a>&nbsp;timeUnit)</pre>
<div class="block">Sets the grace time for the graceful connection termination. Once the max connection age
is reached, RPCs have the grace time to complete. RPCs that do not complete in time will be
cancelled, allowing the connection to terminate. <code>Long.MAX_VALUE</code> nano seconds or an
unreasonably large value are considered infinite.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></code> - if grace is negative</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang" class="externalLink">UnsupportedOperationException</a></code> - if unsupported</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.47.0</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#maxConnectionAge(long,java.util.concurrent.TimeUnit)"><code>maxConnectionAge(long, TimeUnit)</code></a>,
<a href="https://github.com/grpc/proposal/blob/master/A9-server-side-conn-mgt.md">gRFC A9
Server-side Connection Management</a></dd>
</dl>
</li>
</ul>
<a id="permitKeepAliveTime(long,java.util.concurrent.TimeUnit)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>permitKeepAliveTime</h4>
<pre class="methodSignature"><a href="ExperimentalApi.html" title="annotation in io.grpc">@ExperimentalApi</a>("https://github.com/grpc/grpc-java/issues/9009")
public&nbsp;<a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a>&nbsp;permitKeepAliveTime&#8203;(long&nbsp;keepAliveTime,
<a href="https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/TimeUnit.html?is-external=true" title="class or interface in java.util.concurrent" class="externalLink">TimeUnit</a>&nbsp;timeUnit)</pre>
<div class="block">Specify the most aggressive keep-alive time clients are permitted to configure. The server will
try to detect clients exceeding this rate and when detected will forcefully close the
connection. The typical default is 5 minutes when supported.
<p>Even though a default is defined that allows some keep-alives, clients must not use
keep-alive without approval from the service owner. Otherwise, they may experience failures in
the future if the service becomes more restrictive. When unthrottled, keep-alives can cause a
significant amount of traffic and CPU usage, so clients and servers should be conservative in
what they use and accept.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></code> - if time is negative</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang" class="externalLink">UnsupportedOperationException</a></code> - if unsupported</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.47.0</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#permitKeepAliveWithoutCalls(boolean)"><code>permitKeepAliveWithoutCalls(boolean)</code></a>,
<a href="https://github.com/grpc/proposal/blob/master/A8-client-side-keepalive.md">gRFC A8
Client-side Keepalive</a></dd>
</dl>
</li>
</ul>
<a id="permitKeepAliveWithoutCalls(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>permitKeepAliveWithoutCalls</h4>
<pre class="methodSignature"><a href="ExperimentalApi.html" title="annotation in io.grpc">@ExperimentalApi</a>("https://github.com/grpc/grpc-java/issues/9009")
public&nbsp;<a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a>&nbsp;permitKeepAliveWithoutCalls&#8203;(boolean&nbsp;permit)</pre>
<div class="block">Sets whether to allow clients to send keep-alive HTTP/2 PINGs even if there are no outstanding
RPCs on the connection. Defaults to <code>false</code> when supported.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang" class="externalLink">UnsupportedOperationException</a></code> - if unsupported</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.47.0</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="#permitKeepAliveTime(long,java.util.concurrent.TimeUnit)"><code>permitKeepAliveTime(long, TimeUnit)</code></a>,
<a href="https://github.com/grpc/proposal/blob/master/A8-client-side-keepalive.md">gRFC A8
Client-side Keepalive</a></dd>
</dl>
</li>
</ul>
<a id="maxInboundMessageSize(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>maxInboundMessageSize</h4>
<pre class="methodSignature">public&nbsp;<a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a>&nbsp;maxInboundMessageSize&#8203;(int&nbsp;bytes)</pre>
<div class="block">Sets the maximum message size allowed to be received on the server. If not called,
defaults to 4 MiB. The default provides protection to servers who haven't considered the
possibility of receiving large messages while trying to be large enough to not be hit in normal
usage.
<p>This method is advisory, and implementations may decide to not enforce this. Currently,
the only known transport to not enforce this is <code>InProcessServer</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>bytes</code> - the maximum number of bytes a single message can be.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></code> - if bytes is negative.</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/UnsupportedOperationException.html?is-external=true" title="class or interface in java.lang" class="externalLink">UnsupportedOperationException</a></code> - if unsupported.</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.13.0</dd>
</dl>
</li>
</ul>
<a id="maxInboundMetadataSize(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>maxInboundMetadataSize</h4>
<pre class="methodSignature">public&nbsp;<a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a>&nbsp;maxInboundMetadataSize&#8203;(int&nbsp;bytes)</pre>
<div class="block">Sets the maximum size of metadata allowed to be received. <code>Integer.MAX_VALUE</code> disables
the enforcement. The default is implementation-dependent, but is not generally less than 8 KiB
and may be unlimited.
<p>This is cumulative size of the metadata. The precise calculation is
implementation-dependent, but implementations are encouraged to follow the calculation used for
<a href="http://httpwg.org/specs/rfc7540.html#rfc.section.6.5.2">
HTTP/2's SETTINGS_MAX_HEADER_LIST_SIZE</a>. It sums the bytes from each entry's key and value,
plus 32 bytes of overhead per entry.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>bytes</code> - the maximum size of received metadata</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang" class="externalLink">IllegalArgumentException</a></code> - if bytes is non-positive</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.17.0</dd>
</dl>
</li>
</ul>
<a id="setBinaryLog(io.grpc.BinaryLog)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setBinaryLog</h4>
<pre class="methodSignature"><a href="ExperimentalApi.html" title="annotation in io.grpc">@ExperimentalApi</a>("https://github.com/grpc/grpc-java/issues/4017")
public&nbsp;<a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a>&nbsp;setBinaryLog&#8203;(<a href="BinaryLog.html" title="class in io.grpc">BinaryLog</a>&nbsp;binaryLog)</pre>
<div class="block">Sets the BinaryLog object that this server should log to. The server does not take
ownership of the object, and users are responsible for calling <a href="https://docs.oracle.com/javase/8/docs/api/java/io/Closeable.html?is-external=true#close--" title="class or interface in java.io" class="externalLink"><code>Closeable.close()</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>binaryLog</code> - the object to provide logging.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>this</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.13.0</dd>
</dl>
</li>
</ul>
<a id="build()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>build</h4>
<pre class="methodSignature">public abstract&nbsp;<a href="Server.html" title="class in io.grpc">Server</a>&nbsp;build()</pre>
<div class="block">Builds a server using the given parameters.
<p>The returned service will not been started or be bound a port. You will need to start it
with <a href="Server.html#start()"><code>Server.start()</code></a>.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a new Server</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>1.0.0</dd>
</dl>
</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/ServerBuilder.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>Field&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>Field&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>
</footer>
</body>
</html>