ServerImplpublic interface Server
| Modifier and Type | Interface | Description |
|---|---|---|
static class |
Server.Builder |
Builder to build
Server instance. |
| Modifier and Type | Method | Description |
|---|---|---|
static Server.Builder |
builder() |
Builder to customize Server instance.
|
static Server |
create() |
Create a server instance for discovered JAX-RS application (through CDI).
|
static Server |
create(java.lang.Class<? extends javax.ws.rs.core.Application>... applicationClasses) |
Create a server instance for a JAX-RS application class.
|
static Server |
create(javax.ws.rs.core.Application... applications) |
Create a server instance for a JAX-RS application.
|
javax.enterprise.inject.se.SeContainer |
getContainer() |
Get CDI container in use.
|
java.lang.String |
getHost() |
Get the host this server listens on.
|
int |
getPort() |
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(javax.ws.rs.core.Application... applications) throws MpException
applications - application(s) to useMpException - in case the server fails to be createdbuilder()@SafeVarargs static Server create(java.lang.Class<? extends javax.ws.rs.core.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()
javax.enterprise.inject.se.SeContainer getContainer()
Server start() throws MpException
MpException - in case the server fails to startServer stop() throws MpException
MpException - in case the server fails to stopjava.lang.String getHost()
int getPort()
-1 if the server is not
running.Copyright © 2018, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.