Package org.glassfish.internal.embedded
Class Server.Builder
java.lang.Object
org.glassfish.internal.embedded.Server.Builder
- Enclosing class:
- Server
Builder for creating embedded server instance. Builder can be used to configure
the logger, the verbosity and the embedded file system which acts as a
virtual file system to the embedded server instance.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Uses this builder's name to create or return an existing embedded server instance.build(Properties properties) Uses this builder's name to create or return an existing embedded server instance.embeddedFileSystem(EmbeddedFileSystem fileSystem) Sets the embedded file system for the application server, used to locate important files or directories used through the server lifetime.jmxPort(int portNumber) Set the jmx port number.Sets the log file locationlogger(boolean enabled) Enables or disables the logger for this serververbose(boolean b) Turns on of off the verbose flag.
-
Constructor Details
-
Builder
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 Details
-
logger
Enables or disables the logger for this server- Parameters:
enabled- true to enable, false to disable- Returns:
- this instance
-
logFile
Sets the log file location- Parameters:
f- a valid file location- Returns:
- this instance
-
verbose
Turns on of off the verbose flag.- Parameters:
b- true to turn on, false to turn off- Returns:
- this instance
-
jmxPort
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
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
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
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
-