Package com.priint.pubserver.appserver
Class GlassfishDomain
- java.lang.Object
-
- com.priint.pubserver.appserver.GlassfishDomain
-
- All Implemented Interfaces:
java.io.Serializable
public class GlassfishDomain extends java.lang.Object implements java.io.SerializableReadonly 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()andreadInstance()to read it from cache or from disk.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGlassfishDomain.AdminServiceThe type Admin service.static classGlassfishDomain.ApplicationThe type Application.static classGlassfishDomain.ConfigThe type Config.static classGlassfishDomain.ConnectorConnectionPoolThe type Connector connection pool.static classGlassfishDomain.ConnectorResourceThe type Connector resource.static classGlassfishDomain.EngineThe type Engine.static classGlassfishDomain.JavaConfigThe type Java config.static classGlassfishDomain.JdbcConnectionPoolThe type Jdbc connection pool.static classGlassfishDomain.JdbcResourceThe type Jdbc resource.static classGlassfishDomain.JmxConnectorThe type Jmx connector.static classGlassfishDomain.ModuleThe type Module.static classGlassfishDomain.NetworkConfigThe type Network config.static classGlassfishDomain.PropertyThe type Property.static classGlassfishDomain.ReferenceThe type Reference.static classGlassfishDomain.SecureAdminThe type Secure admin.static classGlassfishDomain.ServerThe type Server.static classGlassfishDomain.ThreadPoolThe type Thread pool.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDOMAIN_XML_FILERelative location of domain xml file of Glassfish or Payara server.
-
Constructor Summary
Constructors Constructor Description GlassfishDomain()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description GlassfishDomain.ApplicationgetApplication(java.lang.String name)Gets application.java.util.List<GlassfishDomain.Application>getApplications()Gets applications.GlassfishDomain.ConfiggetConfig(java.lang.String name)Gets config.java.util.List<GlassfishDomain.Config>getConfigs()Gets configs.GlassfishDomain.ConnectorConnectionPoolgetConnectorConnectionPool(java.lang.String name)Gets connector connection pool.java.util.List<GlassfishDomain.ConnectorConnectionPool>getConnectorConnectionPools()Gets connector connection pools.GlassfishDomain.ConnectorResourcegetConnectorResource(java.lang.String name)Gets connector resource.java.util.List<GlassfishDomain.ConnectorResource>getConnectorResourcePools()Gets connector resource pools.GlassfishDomain.ConfiggetDefaultConfig()Gets default config.static GlassfishDomaingetInstance()Get current domain configuration.GlassfishDomain.JdbcConnectionPoolgetJdbcConnectionPool(java.lang.String name)Gets Jdbc connection pool.java.util.List<GlassfishDomain.JdbcConnectionPool>getJdbcConnectionPools()Gets Jdbc connection pools.GlassfishDomain.JdbcResourcegetJdbcResource(java.lang.String name)Gets Jdbc resource.java.util.List<GlassfishDomain.JdbcResource>getJdbcResources()Gets Jdbc resources.intgetJmxPort()Gets jmx port.java.util.List<java.io.Serializable>getResources()Gets resources.<T> java.util.List<T>getResources(java.lang.Class<T> clazz)Gets resources.GlassfishDomain.ServergetServer(java.lang.String name)get a Server with a given nameGlassfishDomain.ConfiggetServerConfig()Gets server config.java.util.List<GlassfishDomain.Server>getServers()Gets servers.booleanhasJdbcConnectionPool(java.lang.String name)Checks if JdbcConnection Pool exists for a given namebooleanhasJdbcResource(java.lang.String jndiName)check if the given Jndi has a Jdbc resourcebooleanisSecure()Is secure boolean.static GlassfishDomainreadInstance()Get current domain configuration from disk.static GlassfishDomainreadInstance(java.io.File file)Get domain configuration from a specified file.
-
-
-
Field Detail
-
DOMAIN_XML_FILE
public static final java.lang.String DOMAIN_XML_FILE
Relative location of domain xml file of Glassfish or Payara server.- See Also:
- Constant Field Values
-
-
Method Detail
-
getInstance
public static GlassfishDomain getInstance()
Get current domain configuration. Will be read from disk if not already cached.- Returns:
- instance
-
readInstance
public static GlassfishDomain readInstance()
Get current domain configuration from disk.- Returns:
- glassfish domain
-
readInstance
public static GlassfishDomain readInstance(java.io.File file)
Get domain configuration from a specified file.- Parameters:
file- the file- Returns:
- glassfish domain
-
getApplication
public GlassfishDomain.Application getApplication(java.lang.String name)
Gets application.- Parameters:
name- the name- Returns:
- the application
-
getApplications
public java.util.List<GlassfishDomain.Application> getApplications()
Gets applications.- Returns:
- the applications
-
getConfig
public GlassfishDomain.Config getConfig(java.lang.String name)
Gets config.- Parameters:
name- the name- Returns:
- the config
-
getConfigs
public java.util.List<GlassfishDomain.Config> getConfigs()
Gets configs.- Returns:
- the configs
-
getConnectorConnectionPool
public GlassfishDomain.ConnectorConnectionPool getConnectorConnectionPool(java.lang.String name)
Gets connector connection pool.- Parameters:
name- the name- Returns:
- the connector connection pool
-
getConnectorConnectionPools
public java.util.List<GlassfishDomain.ConnectorConnectionPool> getConnectorConnectionPools()
Gets connector connection pools.- Returns:
- the connector connection pools
-
getConnectorResource
public GlassfishDomain.ConnectorResource getConnectorResource(java.lang.String name)
Gets connector resource.- Parameters:
name- the name- Returns:
- the connector resource
-
getConnectorResourcePools
public java.util.List<GlassfishDomain.ConnectorResource> getConnectorResourcePools()
Gets connector resource pools.- Returns:
- the connector resource pools
-
getDefaultConfig
public GlassfishDomain.Config getDefaultConfig()
Gets default config.- Returns:
- the default config
-
getJdbcConnectionPool
public GlassfishDomain.JdbcConnectionPool getJdbcConnectionPool(java.lang.String name)
Gets Jdbc connection pool.- Parameters:
name- the name- Returns:
- the jdbc connection pool
-
getJdbcConnectionPools
public java.util.List<GlassfishDomain.JdbcConnectionPool> getJdbcConnectionPools()
Gets Jdbc connection pools.- Returns:
- the jdbc connection pools
-
getJdbcResource
public GlassfishDomain.JdbcResource getJdbcResource(java.lang.String name)
Gets Jdbc resource.- Parameters:
name- the name- Returns:
- the jdbc resource
-
getJdbcResources
public java.util.List<GlassfishDomain.JdbcResource> getJdbcResources()
Gets Jdbc resources.- Returns:
- the jdbc resources
-
getJmxPort
public int getJmxPort()
Gets jmx port.- Returns:
- the jmx port
-
getResources
public java.util.List<java.io.Serializable> getResources()
Gets resources.- Returns:
- the resources
-
getResources
public <T> java.util.List<T> getResources(java.lang.Class<T> clazz)
Gets resources.- Type Parameters:
T- the type parameter- Parameters:
clazz- the clazz- Returns:
- the resources
-
getServer
public GlassfishDomain.Server getServer(java.lang.String name)
get a Server with a given name- Parameters:
name- name of the server- Returns:
- Server with the given name
-
getServerConfig
public GlassfishDomain.Config getServerConfig()
Gets server config.- Returns:
- Config server-config
-
getServers
public java.util.List<GlassfishDomain.Server> getServers()
Gets servers.- Returns:
- List
servers
-
hasJdbcConnectionPool
public boolean hasJdbcConnectionPool(java.lang.String name)
Checks if JdbcConnection Pool exists for a given name- Parameters:
name- the name- Returns:
- the boolean
-
hasJdbcResource
public boolean hasJdbcResource(java.lang.String jndiName)
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.
-
-