Package org.glassfish.jersey.simple
Interface SimpleServer
- All Superinterfaces:
AutoCloseable
,Closeable
Simple server facade providing convenient methods to obtain info about the server (i.e. port).
- Since:
- 2.9
- Author:
- Michal Gajdos
-
Method Summary
-
Method Details
-
start
- Throws:
IOException
-
getPort
int getPort()The port the server is listening to for incomming HTTP connections. If the port is not specified theorg.glassfish.jersey.server.spi.Container.DEFAULT_PORT
is used.- Returns:
- the port the server is listening on
-
isDebug
boolean isDebug()If this is true then very low level I/O operations are logged. Typically this is used to debug I/O issues such as HTTPS handshakes or performance issues by analysing the various latencies involved in the HTTP conversation. There is a minimal performance penalty if this is enabled and it is perfectly suited to being enabled in a production environment, at the cost of logging overhead.- Returns:
true
if debug is enabled, false otherwise.- Since:
- 2.23
-
setDebug
void setDebug(boolean enable) To enable very low level logging this can be enabled. This goes far beyond logging issues such as connection establishment of request dispatch, it can trace the TCP operations latencies involved.- Parameters:
enable
- iftrue
debug tracing will be enabled.- Since:
- 2.23
-