| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <title>SeBootstrap</title> |
| <link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style"> |
| <script type="text/javascript" src="../../../script.js"></script> |
| |
| <link rel="shortcut icon" href="/img/jakarta-favicon.ico"> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="SeBootstrap"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":17,"i1":17,"i2":17,"i3":17}; |
| var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],16:["t5","Default Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</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"> |
| <li><a href="../../../jakarta/ws/rs/RuntimeType.html" title="enum in jakarta.ws.rs"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../jakarta/ws/rs/SeBootstrap.Configuration.html" title="interface in jakarta.ws.rs"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../index.html?jakarta/ws/rs/SeBootstrap.html" target="_top">Frames</a></li> |
| <li><a href="SeBootstrap.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../allclasses-noframe.html">All Classes</a></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> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li><a href="#nested.class.summary">Nested</a> | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">jakarta.ws.rs</div> |
| <h2 title="Interface SeBootstrap" class="title">Interface SeBootstrap</h2> |
| </div> |
| <div class="contentContainer"> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <br> |
| <pre>public interface <span class="typeNameLabel">SeBootstrap</span></pre> |
| <div class="block">Bootstrap class used to startup a JAX-RS application in Java SE environments. |
| <p> |
| The <code>SeBootstrap</code> class is available in a Jakarta EE container environment as well; however, support for the Java SE |
| bootstrapping APIs is <em>not required</em> in container environments. |
| </p> |
| <p> |
| In a Java SE environment an application is getting started by the following command using default configuration |
| values (i. e. mounting application at <code>http://localhost:80/</code> <em>or a different port</em> (there is <em>no |
| particular default port</em> mandated by this specification). As the JAX-RS implementation is free to choose any port |
| by default, the caller will not know the actual port unless explicitly checking the actual configuration of the |
| instance started: |
| </p> |
| |
| <pre> |
| Application app = new MyApplication(); |
| SeBootstrap.Configuration config = SeBootstrap.Configuration.builder().build(); |
| SeBootstrap.start(app, config).thenAccept(instance -> instance.configuration().port()); |
| </pre> |
| |
| <p> |
| Running instances can be instructed to stop serving the application: |
| </p> |
| |
| <pre> |
| SeBootstrap.start(app, config).thenAccept(instance -> { ... instance.stop(); } ); |
| </pre> |
| |
| <p> |
| A shutdown callback can be registered which will get invoked once the implementation stops serving the application: |
| </p> |
| |
| <pre> |
| instance.stop().thenAccept(stopResult -> ...)); |
| </pre> |
| |
| <code>stopResult</code> is not further defined but solely acts as a wrapper around a native result provided by the |
| particular JAX-RS implementation. Portable applications should not assume any particular data type or value. |
| |
| <p> |
| Protocol, host address, port and root path can be overridden explicitly. As the JAX-RS implementation is bound to |
| that values, no querying of the actual configuration is needed in that case: |
| </p> |
| |
| <pre> |
| SeBootstrap.Configuration.builder().protocol("HTTPS").host("0.0.0.0").port(8443).rootPath("api").build(); |
| </pre> |
| |
| <p> |
| TLS can be configured by explicitly passing a customized <code>SSLContext</code>: |
| </p> |
| |
| <pre> |
| SSLContext tls = SSLContext.getInstance("TLSv1.2"); |
| // ...further initialize context here (see JSSE API)... |
| SeBootstrap.Configuration.builder().protocol("HTTPS").sslContext(tls).build(); |
| </pre> |
| |
| <p> |
| In case of HTTPS, client authentication can be enforced to ensure that only <em>trustworthy</em> clients can connect: |
| </p> |
| |
| <pre> |
| SeBootstrap.Configuration.builder().protocol("HTTPS").sslClientAuthentication(SSLClientAuthentication.MANDATORY).build(); |
| </pre> |
| |
| <p> |
| Implementations are free to support more use cases by native properties, which effectively render the application |
| non-portable: |
| </p> |
| |
| <pre> |
| SeBootstrap.Configuration.builder().property("productname.foo", "bar").build() |
| </pre> |
| |
| <p> |
| Bulk-loading allows to attach configuration storages easily without the need to write down all properties to be |
| transferred. Hence, even properties unknown to the application author will get channeled into the implementation. |
| This can be done both, explicitly (hence portable) and implicitly (hence <em>not necessarily</em> portable as no |
| particular configuration mechanics are required to be supported by compliant implementations): |
| </p> |
| |
| <pre> |
| // Explicit use of particular configuration mechanics is portable |
| SeBootstrap.Configuration.builder().from((name, type) -> externalConfigurationSystem.getValue(name, type)).build(); |
| |
| // Implicitly relying on the support of particular configuration mechanics by |
| // the actual JAX-RS implementation is not necessarily portable |
| SeBootstrap.Configuration.builder().from(externalConfigurationSystem).build(); |
| </pre></div> |
| <dl> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>3.1</dd> |
| </dl> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ======== NESTED CLASS SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="nested.class.summary"> |
| <!-- --> |
| </a> |
| <h3>Nested Class Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Nested Class Summary table, listing nested classes, and an explanation"> |
| <caption><span>Nested Classes</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Interface and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static interface </code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/ws/rs/SeBootstrap.Configuration.html" title="interface in jakarta.ws.rs">SeBootstrap.Configuration</a></span></code> |
| <div class="block">Provides information needed by the JAX-RS implementation for bootstrapping an application.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>static interface </code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/ws/rs/SeBootstrap.Instance.html" title="interface in jakarta.ws.rs">SeBootstrap.Instance</a></span></code> |
| <div class="block">Handle of the running application instance.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <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="t5" class="tableTab"><span><a href="javascript:show(16);">Default Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>static java.util.concurrent.CompletionStage<<a href="../../../jakarta/ws/rs/SeBootstrap.Instance.html" title="interface in jakarta.ws.rs">SeBootstrap.Instance</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/ws/rs/SeBootstrap.html#start-jakarta.ws.rs.core.Application-">start</a></span>(<a href="../../../jakarta/ws/rs/core/Application.html" title="class in jakarta.ws.rs.core">Application</a> application)</code> |
| <div class="block">Starts the provided application using a default configuration.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>static java.util.concurrent.CompletionStage<<a href="../../../jakarta/ws/rs/SeBootstrap.Instance.html" title="interface in jakarta.ws.rs">SeBootstrap.Instance</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/ws/rs/SeBootstrap.html#start-jakarta.ws.rs.core.Application-jakarta.ws.rs.SeBootstrap.Configuration-">start</a></span>(<a href="../../../jakarta/ws/rs/core/Application.html" title="class in jakarta.ws.rs.core">Application</a> application, |
| <a href="../../../jakarta/ws/rs/SeBootstrap.Configuration.html" title="interface in jakarta.ws.rs">SeBootstrap.Configuration</a> configuration)</code> |
| <div class="block">Starts the provided application using the specified configuration.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>static java.util.concurrent.CompletionStage<<a href="../../../jakarta/ws/rs/SeBootstrap.Instance.html" title="interface in jakarta.ws.rs">SeBootstrap.Instance</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/ws/rs/SeBootstrap.html#start-java.lang.Class-">start</a></span>(java.lang.Class<? extends <a href="../../../jakarta/ws/rs/core/Application.html" title="class in jakarta.ws.rs.core">Application</a>> clazz)</code> |
| <div class="block">Starts the provided application using a default configuration.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>static java.util.concurrent.CompletionStage<<a href="../../../jakarta/ws/rs/SeBootstrap.Instance.html" title="interface in jakarta.ws.rs">SeBootstrap.Instance</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../jakarta/ws/rs/SeBootstrap.html#start-java.lang.Class-jakarta.ws.rs.SeBootstrap.Configuration-">start</a></span>(java.lang.Class<? extends <a href="../../../jakarta/ws/rs/core/Application.html" title="class in jakarta.ws.rs.core">Application</a>> clazz, |
| <a href="../../../jakarta/ws/rs/SeBootstrap.Configuration.html" title="interface in jakarta.ws.rs">SeBootstrap.Configuration</a> configuration)</code> |
| <div class="block">Starts the provided application using the specified configuration.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="start-jakarta.ws.rs.core.Application-jakarta.ws.rs.SeBootstrap.Configuration-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>start</h4> |
| <pre>static java.util.concurrent.CompletionStage<<a href="../../../jakarta/ws/rs/SeBootstrap.Instance.html" title="interface in jakarta.ws.rs">SeBootstrap.Instance</a>> start(<a href="../../../jakarta/ws/rs/core/Application.html" title="class in jakarta.ws.rs.core">Application</a> application, |
| <a href="../../../jakarta/ws/rs/SeBootstrap.Configuration.html" title="interface in jakarta.ws.rs">SeBootstrap.Configuration</a> configuration)</pre> |
| <div class="block">Starts the provided application using the specified configuration. |
| |
| <p> |
| This method is intended to be used in Java SE environments only. The outcome of invocations in Jakarta EE container |
| environments is undefined. |
| </p></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>application</code> - The application to start up.</dd> |
| <dd><code>configuration</code> - Provides information needed for bootstrapping the application.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>CompletionStage</code> (possibly asynchronously) producing handle of the running application |
| <a href="../../../jakarta/ws/rs/SeBootstrap.Instance.html" title="interface in jakarta.ws.rs"><code>instance</code></a>.</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>3.1</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../jakarta/ws/rs/SeBootstrap.Configuration.html" title="interface in jakarta.ws.rs"><code>SeBootstrap.Configuration</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="start-jakarta.ws.rs.core.Application-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>start</h4> |
| <pre>static java.util.concurrent.CompletionStage<<a href="../../../jakarta/ws/rs/SeBootstrap.Instance.html" title="interface in jakarta.ws.rs">SeBootstrap.Instance</a>> start(<a href="../../../jakarta/ws/rs/core/Application.html" title="class in jakarta.ws.rs.core">Application</a> application)</pre> |
| <div class="block">Starts the provided application using a default configuration. |
| |
| <p> |
| This method is intended to be used in Java SE environments only. The outcome of invocations in Jakarta EE container |
| environments is undefined. |
| </p></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>application</code> - The application to start up.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>CompletionStage</code> (possibly asynchronously) producing handle of the running application |
| <a href="../../../jakarta/ws/rs/SeBootstrap.Instance.html" title="interface in jakarta.ws.rs"><code>instance</code></a>.</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>3.1</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../jakarta/ws/rs/SeBootstrap.Configuration.html" title="interface in jakarta.ws.rs"><code>SeBootstrap.Configuration</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="start-java.lang.Class-jakarta.ws.rs.SeBootstrap.Configuration-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>start</h4> |
| <pre>static java.util.concurrent.CompletionStage<<a href="../../../jakarta/ws/rs/SeBootstrap.Instance.html" title="interface in jakarta.ws.rs">SeBootstrap.Instance</a>> start(java.lang.Class<? extends <a href="../../../jakarta/ws/rs/core/Application.html" title="class in jakarta.ws.rs.core">Application</a>> clazz, |
| <a href="../../../jakarta/ws/rs/SeBootstrap.Configuration.html" title="interface in jakarta.ws.rs">SeBootstrap.Configuration</a> configuration)</pre> |
| <div class="block">Starts the provided application using the specified configuration. Creates application instance |
| from class using default constructor. Injection is not supported. |
| |
| <p> |
| This method is intended to be used in Java SE environments only. The outcome of invocations in Jakarta EE container |
| environments is undefined. |
| </p></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>clazz</code> - The application class.</dd> |
| <dd><code>configuration</code> - Provides information needed for bootstrapping the application.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>CompletionStage</code> (possibly asynchronously) producing handle of the running application |
| <a href="../../../jakarta/ws/rs/SeBootstrap.Instance.html" title="interface in jakarta.ws.rs"><code>instance</code></a>.</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>3.1</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../jakarta/ws/rs/SeBootstrap.Configuration.html" title="interface in jakarta.ws.rs"><code>SeBootstrap.Configuration</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="start-java.lang.Class-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>start</h4> |
| <pre>static java.util.concurrent.CompletionStage<<a href="../../../jakarta/ws/rs/SeBootstrap.Instance.html" title="interface in jakarta.ws.rs">SeBootstrap.Instance</a>> start(java.lang.Class<? extends <a href="../../../jakarta/ws/rs/core/Application.html" title="class in jakarta.ws.rs.core">Application</a>> clazz)</pre> |
| <div class="block">Starts the provided application using a default configuration. Creates application instance |
| from class using default constructor. Injection is not supported. |
| |
| <p> |
| This method is intended to be used in Java SE environments only. The outcome of invocations in Jakarta EE container |
| environments is undefined. |
| </p></div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>clazz</code> - The application class.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>CompletionStage</code> (possibly asynchronously) producing handle of the running application |
| <a href="../../../jakarta/ws/rs/SeBootstrap.Instance.html" title="interface in jakarta.ws.rs"><code>instance</code></a>.</dd> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>3.1</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../jakarta/ws/rs/SeBootstrap.Configuration.html" title="interface in jakarta.ws.rs"><code>SeBootstrap.Configuration</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</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"> |
| <li><a href="../../../jakarta/ws/rs/RuntimeType.html" title="enum in jakarta.ws.rs"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../jakarta/ws/rs/SeBootstrap.Configuration.html" title="interface in jakarta.ws.rs"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../index.html?jakarta/ws/rs/SeBootstrap.html" target="_top">Frames</a></li> |
| <li><a href="SeBootstrap.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../allclasses-noframe.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> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li><a href="#nested.class.summary">Nested</a> | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| </body> |
| </html> |