Package org.glassfish.jersey.simple
Interface SimpleServer
-
- All Superinterfaces:
java.lang.AutoCloseable,java.io.Closeable
public interface SimpleServer extends java.io.CloseableSimple server facade providing convenient methods to obtain info about the server (i.e. port).- Since:
- 2.9
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgetPort()The port the server is listening to for incomming HTTP connections.booleanisDebug()If this is true then very low level I/O operations are logged.voidsetDebug(boolean enable)To enable very low level logging this can be enabled.
-
-
-
Method Detail
-
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_PORTis 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:
trueif 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- iftruedebug tracing will be enabled.- Since:
- 2.23
-
-