Package com.priint.pubserver.appserver
Class GlassfishDomain
java.lang.Object
com.priint.pubserver.appserver.GlassfishDomain
- All Implemented Interfaces:
Serializable
Readonly representation of Glassfish domain xml file.
This representation focuses only on publishing server related aspects.
For details on the several getters methods please read the Glassfish documentation.
Use getInstance() and readInstance() to read it from cache or from disk.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThe type Admin service.static classThe type Application.static classThe type Config.static classThe type Connector connection pool.static classThe type Connector resource.static classThe type Engine.static classThe type Java config.static classThe type Jdbc connection pool.static classThe type Jdbc resource.static classThe type Jmx connector.static classThe type Module.static classThe type Network config.static classThe type Property.static classThe type Reference.static classThe type Secure admin.static classThe type Server.static classThe type Thread pool. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringRelative location of domain xml file of Glassfish or Payara server. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetApplication(String name) Gets application.Gets applications.Gets config.Gets configs.Gets connector connection pool.Gets connector connection pools.getConnectorResource(String name) Gets connector resource.Gets connector resource pools.Gets default config.static GlassfishDomainGet current domain configuration.getJdbcConnectionPool(String name) Gets Jdbc connection pool.Gets Jdbc connection pools.getJdbcResource(String name) Gets Jdbc resource.Gets Jdbc resources.intGets jmx port.Gets resources.<T> List<T>getResources(Class<T> clazz) Gets resources.get a Server with a given nameGets server config.Gets servers.booleanhasJdbcConnectionPool(String name) Checks if JdbcConnection Pool exists for a given namebooleanhasJdbcResource(String jndiName) check if the given Jndi has a Jdbc resourcebooleanisSecure()Is secure boolean.static GlassfishDomainGet current domain configuration from disk.static GlassfishDomainreadInstance(File file) Get domain configuration from a specified file.
-
Field Details
-
DOMAIN_XML_FILE
Relative location of domain xml file of Glassfish or Payara server.- See Also:
-
-
Constructor Details
-
GlassfishDomain
public GlassfishDomain()
-
-
Method Details
-
getInstance
Get current domain configuration. Will be read from disk if not already cached.- Returns:
- instance
-
readInstance
Get current domain configuration from disk.- Returns:
- glassfish domain
-
readInstance
Get domain configuration from a specified file.- Parameters:
file- the file- Returns:
- glassfish domain
-
getApplication
Gets application.- Parameters:
name- the name- Returns:
- the application
-
getApplications
Gets applications.- Returns:
- the applications
-
getConfig
Gets config.- Parameters:
name- the name- Returns:
- the config
-
getConfigs
Gets configs.- Returns:
- the configs
-
getConnectorConnectionPool
Gets connector connection pool.- Parameters:
name- the name- Returns:
- the connector connection pool
-
getConnectorConnectionPools
Gets connector connection pools.- Returns:
- the connector connection pools
-
getConnectorResource
Gets connector resource.- Parameters:
name- the name- Returns:
- the connector resource
-
getConnectorResourcePools
Gets connector resource pools.- Returns:
- the connector resource pools
-
getDefaultConfig
Gets default config.- Returns:
- the default config
-
getJdbcConnectionPool
Gets Jdbc connection pool.- Parameters:
name- the name- Returns:
- the jdbc connection pool
-
getJdbcConnectionPools
Gets Jdbc connection pools.- Returns:
- the jdbc connection pools
-
getJdbcResource
Gets Jdbc resource.- Parameters:
name- the name- Returns:
- the jdbc resource
-
getJdbcResources
Gets Jdbc resources.- Returns:
- the jdbc resources
-
getJmxPort
public int getJmxPort()Gets jmx port.- Returns:
- the jmx port
-
getResources
Gets resources.- Returns:
- the resources
-
getResources
Gets resources.- Type Parameters:
T- the type parameter- Parameters:
clazz- the clazz- Returns:
- the resources
-
getServer
get a Server with a given name- Parameters:
name- name of the server- Returns:
- Server with the given name
-
getServerConfig
Gets server config.- Returns:
- Config server-config
-
getServers
Gets servers.- Returns:
- List
servers
-
hasJdbcConnectionPool
Checks if JdbcConnection Pool exists for a given name- Parameters:
name- the name- Returns:
- the boolean
-
hasJdbcResource
check if the given Jndi has a Jdbc resource- Parameters:
jndiName- as String- Returns:
- true if the given Jndi has a Jdbc Resource. Otherwise, false.
-
isSecure
public boolean isSecure()Is secure boolean.- Returns:
- true if secureAdmin is enabled. Otherwise, false.
-