| <!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 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: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </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"> </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> <a href="package-summary.html">io.grpc</a></div> |
| <h2 title="Class ServerBuilder" class="title">Class ServerBuilder<T extends ServerBuilder<T>></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<T></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<T extends ServerBuilder<T>></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"> </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"> </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"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </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>​(<a href="BindableService.html" title="interface in io.grpc">BindableService</a> 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>​(<a href="ServerServiceDefinition.html" title="class in io.grpc">ServerServiceDefinition</a> 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>​(<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><<a href="ServerServiceDefinition.html" title="class in io.grpc">ServerServiceDefinition</a>> 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>​(<a href="ServerStreamTracer.Factory.html" title="class in io.grpc">ServerStreamTracer.Factory</a> 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>​(<a href="ServerTransportFilter.html" title="class in io.grpc">ServerTransportFilter</a> 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>​(<a href="ServerCallExecutorSupplier.html" title="interface in io.grpc">ServerCallExecutorSupplier</a> 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>​(<a href="CompressorRegistry.html" title="class in io.grpc">CompressorRegistry</a> 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>​(<a href="DecompressorRegistry.html" title="class in io.grpc">DecompressorRegistry</a> 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>​(<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> 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>​(<a href="HandlerRegistry.html" title="class in io.grpc">HandlerRegistry</a> 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><?></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#forPort(int)">forPort</a></span>​(int 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>​(long 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> 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>​(<a href="ServerInterceptor.html" title="interface in io.grpc">ServerInterceptor</a> 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>​(long 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> 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>​(long 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> 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>​(long 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> 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>​(long 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> 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>​(long 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> 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>​(int 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>​(int 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>​(long 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> 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>​(boolean 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>​(<a href="BinaryLog.html" title="class in io.grpc">BinaryLog</a> 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>​(<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> 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> 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>​(<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> 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> 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 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="<init>()"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>ServerBuilder</h4> |
| <pre>public 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 <a href="ServerBuilder.html" title="class in io.grpc">ServerBuilder</a><?> forPort​(int 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 <a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a> 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 <a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a> executor​(<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> 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 <a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a> callExecutor​(<a href="ServerCallExecutorSupplier.html" title="interface in io.grpc">ServerCallExecutorSupplier</a> 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 <a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a> addService​(<a href="ServerServiceDefinition.html" title="class in io.grpc">ServerServiceDefinition</a> 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 <a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a> addService​(<a href="BindableService.html" title="interface in io.grpc">BindableService</a> 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 <a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a> addServices​(<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><<a href="ServerServiceDefinition.html" title="class in io.grpc">ServerServiceDefinition</a>> 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 <a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a> intercept​(<a href="ServerInterceptor.html" title="interface in io.grpc">ServerInterceptor</a> 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 <a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a> addTransportFilter​(<a href="ServerTransportFilter.html" title="class in io.grpc">ServerTransportFilter</a> 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 <a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a> addStreamTracerFactory​(<a href="ServerStreamTracer.Factory.html" title="class in io.grpc">ServerStreamTracer.Factory</a> 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 <a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a> fallbackHandlerRegistry​(<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> 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 <a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a> useTransportSecurity​(<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> 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> 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 <a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a> useTransportSecurity​(<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> 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> 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 <a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a> decompressorRegistry​(<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> 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 <a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a> compressorRegistry​(<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> 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 <a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a> handshakeTimeout​(long 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> 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 <a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a> keepAliveTime​(long 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> 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 <a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a> keepAliveTimeout​(long 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> 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 <a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a> maxConnectionIdle​(long 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> 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 <a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a> maxConnectionAge​(long 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> 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 <a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a> maxConnectionAgeGrace​(long 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> 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 <a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a> permitKeepAliveTime​(long 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> 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 <a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a> permitKeepAliveWithoutCalls​(boolean 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 <a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a> maxInboundMessageSize​(int 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 <a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a> maxInboundMetadataSize​(int 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 <a href="ServerBuilder.html" title="type parameter in ServerBuilder">T</a> setBinaryLog​(<a href="BinaryLog.html" title="class in io.grpc">BinaryLog</a> 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 <a href="Server.html" title="class in io.grpc">Server</a> 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 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: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </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> |