Package org.glassfish.internal.embedded
Class Server.Builder
- java.lang.Object
-
- org.glassfish.internal.embedded.Server.Builder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Server
build()
Uses this builder's name to create or return an existing embedded server instance.Server
build(Properties properties)
Uses this builder's name to create or return an existing embedded server instance.Server.Builder
embeddedFileSystem(EmbeddedFileSystem fileSystem)
Sets the embedded file system for the application server, used to locate important files or directories used through the server lifetime.Server.Builder
jmxPort(int portNumber)
Set the jmx port number.Server.Builder
logFile(File f)
Sets the log file locationServer.Builder
logger(boolean enabled)
Enables or disables the logger for this serverServer.Builder
verbose(boolean b)
Turns on of off the verbose flag.
-
-
-
Constructor Detail
-
Builder
public Builder(String id)
Creates an unconfigured instance. The habitat will be obtained by scanning the inhabitants files using this class's classloader- Parameters:
id
- the server name
-
-
Method Detail
-
logger
public Server.Builder logger(boolean enabled)
Enables or disables the logger for this server- Parameters:
enabled
- true to enable, false to disable- Returns:
- this instance
-
logFile
public Server.Builder logFile(File f)
Sets the log file location- Parameters:
f
- a valid file location- Returns:
- this instance
-
verbose
public Server.Builder verbose(boolean b)
Turns on of off the verbose flag.- Parameters:
b
- true to turn on, false to turn off- Returns:
- this instance
-
jmxPort
public Server.Builder jmxPort(int portNumber)
Set the jmx port number. Also enables the jmx connector. This applies only when the default configuration is being used.- Parameters:
portNumber
- jmx port number.- Returns:
- this instance
-
embeddedFileSystem
public Server.Builder embeddedFileSystem(EmbeddedFileSystem fileSystem)
Sets the embedded file system for the application server, used to locate important files or directories used through the server lifetime.- Parameters:
fileSystem
- a virtual filesystem- Returns:
- this instance
-
build
public Server build()
Uses this builder's name to create or return an existing embedded server instance. The embedded server will be using the configured parameters of this builder. If no embedded file system is used, the embedded instance will use a temporary instance root with a default basic configuration. That temporary instance root will be deleted once the server is shutdown.- Returns:
- the configured server instance
-
build
public Server build(Properties properties)
Uses this builder's name to create or return an existing embedded server instance. The embedded server will be using the configured parameters of this builder. If no embedded file system is used, the embedded instance will use a temporary instance root with a default basic configuration. That temporary instance root will be deleted once the server is shutdown.- Parameters:
properties
- extra creation properties- Returns:
- the configured server instance
-
-