public interface Server
| Modifier and Type | Interface and Description |
|---|---|
static class |
Server.Builder
Builder to build
Server instance. |
| Modifier and Type | Method and Description |
|---|---|
static Server.Builder |
builder()
Builder to customize Server instance.
|
SeContainer |
cdiContainer()
Get CDI container in use.
|
static Server |
create()
Create a server instance for discovered JAX-RS application (through CDI).
|
static Server |
create(Application... applications)
Create a server instance for a JAX-RS application.
|
static Server |
create(Class<? extends Application>... applicationClasses)
Create a server instance for a JAX-RS application class.
|
String |
host()
Get the host this server listens on.
|
int |
port()
Get the port this server listens on or
-1 if the server is not
running. |
Server |
start()
Start this server (can only be used once).
|
Server |
stop()
Stop this server immediately (can only be used on a started server).
|
@SafeVarargs static Server create(Application... applications) throws MpException
applications - application(s) to useMpException - in case the server fails to be createdbuilder()@SafeVarargs static Server create(Class<? extends Application>... applicationClasses) throws MpException
applicationClasses - application class(es) to useMpException - in case the server fails to be createdbuilder()static Server create() throws MpException
MpException - in case the server fails to be createdbuilder()static Server.Builder builder()
SeContainer cdiContainer()
Server start() throws MpException
MpException - in case the server fails to startServer stop() throws MpException
MpException - in case the server fails to stopString host()
int port()
-1 if the server is not
running.Copyright © 2018–2019 Oracle and/or its affiliates. All rights reserved. Use is subject to license terms.