Interface PayaraMicroBoot

    • Method Detail

      • addDeployFromGAV

        PayaraMicroBoot addDeployFromGAV​(String GAV)
        Adds a Maven GAV coordinate to the list of archives to be deployed at boot.
        Parameters:
        GAV - GAV coordinate
        Returns:
      • addDeployment

        PayaraMicroBoot addDeployment​(String pathToWar)
        Adds an archive to the list of archives to be deployed at boot. These archives are not monitored for changes during running so are not redeployed without restarting the server
        Parameters:
        pathToWar - File path to the deployment archive
        Returns:
      • addDeploymentFile

        PayaraMicroBoot addDeploymentFile​(File file)
        Adds an archive to the list of archives to be deployed at boot. These archives are not monitored for changes during running so are not redeployed without restarting the server
        Parameters:
        file - File path to the deployment archive
        Returns:
      • addRepoUrl

        PayaraMicroBoot addRepoUrl​(String... URLs)
        Adds a Maven repository to the list of repositories to search for artifacts in
        Parameters:
        URLs - URL to Maven repository
        Returns:
      • getAlternateDomainXML

        File getAlternateDomainXML()
        The path to an alternative domain.xml for PayaraMicro to use at boot
        Returns:
        The path to the domain.xml
      • getAutoBindRange

        int getAutoBindRange()
        Gets the maximum number of ports to check if free for autobinding purposes
        Returns:
        The number of ports to check if free
      • getClusterMulticastGroup

        String getClusterMulticastGroup()
        Gets the cluster group
        Returns:
        The Multicast Group that will beused for the Hazelcast clustering
      • getClusterPort

        int getClusterPort()
        Gets the cluster multicast port used for cluster communications
        Returns:
        The configured cluster port
      • getClusterStartPort

        int getClusterStartPort()
        Gets the instance listen port number used by clustering. This number will be incremented automatically if the port is unavailable due to another instance running on the same host,
        Returns:
        The start port number
      • getDeploymentDir

        File getDeploymentDir()
        A directory which will be scanned for archives to deploy
        Returns:
      • getHttpAutoBind

        boolean getHttpAutoBind()
        Indicates whether autobinding of the HTTP port is enabled
        Returns:
      • getHttpPort

        int getHttpPort()
        The configured port Payara Micro will use for HTTP requests.
        Returns:
        The HTTP port
      • getHzClusterName

        String getHzClusterName()
        Gets the name of the Hazelcast cluster group. Clusters with different names do not interact
        Returns:
        The current Cluster Name
      • getInstanceName

        String getInstanceName()
        Gets the logical name for this PayaraMicro Server within the server cluster
        Returns:
        The configured instance name
      • getMaxHttpThreads

        int getMaxHttpThreads()
        The maximum threads in the HTTP(S) threadpool processing HTTP(S) requests. Setting this will determine how many concurrent HTTP requests can be processed. The default value is 200. This value is shared by both HTTP and HTTP(S) requests.
        Returns:
      • getMinHttpThreads

        int getMinHttpThreads()
        The minimum number of threads in the HTTP(S) threadpool Default value is 10
        Returns:
        The minimum threads to be created in the threadpool
      • getRootDir

        File getRootDir()
        The File path to a directory that PayaraMicro should use for storing its configuration files
        Returns:
      • getSslAutoBind

        boolean getSslAutoBind()
        Indicates whether autobinding of the HTTPS port is enabled
        Returns:
      • getSslPort

        int getSslPort()
        The configured port for HTTPS requests
        Returns:
        The HTTPS port
      • getSslCert

        String getSslCert()
        The name of the SSL certificate to use in the keystore
        Returns:
      • getUberJar

        File getUberJar()
        The UberJar to create
        Returns:
      • isLite

        boolean isLite()
        Indicates whether this is a lite cluster member which means it stores no cluster data although it participates fully in the cluster.
        Returns:
      • isNoCluster

        boolean isNoCluster()
        Indicated whether clustering is enabled
        Returns:
      • setAccessLogDir

        PayaraMicroBoot setAccessLogDir​(String filePath)
        Set user defined file directory for the access log
        Parameters:
        filePath -
      • setAccessLogFormat

        PayaraMicroBoot setAccessLogFormat​(String format)
        Set user defined formatting for the access log
        Parameters:
        format -
      • setAlternateDomainXML

        PayaraMicroBoot setAlternateDomainXML​(File alternateDomainXML)
        Sets the path to a domain.xml file PayaraMicro should use to boot. If this is not set PayaraMicro will use an appropriate domain.xml from within its jar file
        Parameters:
        alternateDomainXML -
        Returns:
      • setApplicationDomainXML

        PayaraMicroBoot setApplicationDomainXML​(String domainXml)
        Sets an application specific domain.xml file that is embedded on the classpath of your application.
        Parameters:
        domainXml - This is a resource string for your domain.xml
        Returns:
      • setPreBootHandler

        PayaraMicroBoot setPreBootHandler​(Consumer<AdminCommandRunner> handler)
        Register a handler for executing admin commands at pre-boot time. Handler will be called with reference to AdminCommandRunner before instance starts. It offers way of changing domain configuration by means of running command set. The commands will be only executed on the instance that is booted. Only single handler can be registered.
        Parameters:
        handler -
        Returns:
      • setPostBootHandler

        PayaraMicroBoot setPostBootHandler​(Consumer<AdminCommandRunner> handler)
        Register a handler for executing admin commands at post-boot time. Handler will be called with reference to AdminCommandRunner after all services start, but before deployment starts. All commands available over asadmin command are valid in this phase. The commands will be only executed on the instance starting up, not in any cluster it may have formed. Only single handler can be registered
        Parameters:
        handler -
        Returns:
      • setAutoBindRange

        PayaraMicroBoot setAutoBindRange​(int autoBindRange)
        Sets the maximum number of ports to check if free for autobinding purposes
        Parameters:
        autoBindRange - The maximum number of ports to increment the port value by
        Returns:
      • setClusterMulticastGroup

        PayaraMicroBoot setClusterMulticastGroup​(String hzMulticastGroup)
        Sets the cluster group used for Payara Micro clustering used for cluster communications and discovery. Each Payara Micro cluster should have different values for the MulticastGroup
        Parameters:
        hzMulticastGroup - String representation of the multicast group
        Returns:
      • setClusterPort

        PayaraMicroBoot setClusterPort​(int hzPort)
        Sets the multicast group used for Payara Micro clustering used for cluster communication and discovery. Each Payara Micro cluster should have different values for the cluster port
        Parameters:
        hzPort - The port number
        Returns:
      • setClusterStartPort

        PayaraMicroBoot setClusterStartPort​(int hzStartPort)
        Sets the start port number for the Payara Micro to listen on for cluster communications.
        Parameters:
        hzStartPort - Start port number
        Returns:
      • setDeploymentDir

        PayaraMicroBoot setDeploymentDir​(File deploymentRoot)
        Sets a directory to scan for archives to deploy on boot. This directory is not monitored while running for changes. Therefore archives in this directory will NOT be redeployed during runtime.
        Parameters:
        deploymentRoot - File path to the directory
        Returns:
      • setHttpAutoBind

        PayaraMicroBoot setHttpAutoBind​(boolean httpAutoBind)
        Enables or disables autobinding of the HTTP port
        Parameters:
        httpAutoBind - The true or false value to enable or disable HTTP autobinding
        Returns:
      • setHttpPort

        PayaraMicroBoot setHttpPort​(int httpPort)
        Sets the port used for HTTP requests
        Parameters:
        httpPort - The port number
        Returns:
      • setHzClusterName

        PayaraMicroBoot setHzClusterName​(String hzClusterName)
        Sets the name of the Hazelcast cluster group
        Parameters:
        hzClusterName - The name of the hazelcast cluster
        Returns:
      • setInstanceName

        PayaraMicroBoot setInstanceName​(String instanceName)
        Sets the logical instance name for this PayaraMicro server within the server cluster If this is not set a UUID is generated
        Parameters:
        instanceName - The logical server name
        Returns:
      • setLite

        PayaraMicroBoot setLite​(boolean liteMember)
        Sets the lite status of this cluster member. If true the Payara Micro is a lite cluster member which means it stores no cluster data.
        Parameters:
        liteMember - set to true to set as a lite cluster member with no data storage
        Returns:
      • setLogPropertiesFile

        PayaraMicroBoot setLogPropertiesFile​(File fileName)
        Set user defined properties file for logging
        Parameters:
        fileName -
        Returns:
      • setLogoFile

        PayaraMicroBoot setLogoFile​(String filePath)
        Sets the path to the logo file printed at boot. This can be on the classpath of the server or an absolute URL
        Parameters:
        filePath -
        Returns:
      • setMaxHttpThreads

        PayaraMicroBoot setMaxHttpThreads​(int maxHttpThreads)
        The maximum threads in the HTTP(S) threadpool processing HTTP(S) requests. Setting this will determine how many concurrent HTTP requests can be processed. The default value is 200
        Parameters:
        maxHttpThreads - Maximum threads in the HTTP(S) threadpool
        Returns:
      • setMinHttpThreads

        PayaraMicroBoot setMinHttpThreads​(int minHttpThreads)
        The minimum number of threads in the HTTP(S) threadpool Default value is 10
        Parameters:
        minHttpThreads -
        Returns:
      • setNoCluster

        PayaraMicroBoot setNoCluster​(boolean noCluster)
        Enables or disables clustering before bootstrap
        Parameters:
        noCluster - set to true to disable clustering
        Returns:
      • setPrintLogo

        PayaraMicroBoot setPrintLogo​(boolean generate)
        Set whether the logo should be generated on boot
        Parameters:
        generate -
        Returns:
      • setRootDir

        PayaraMicroBoot setRootDir​(File rootDir)
        Sets the File path to a directory PayaraMicro should use to install its configuration files. If this is set the PayaraMicro configuration files will be stored in the directory and persist across server restarts. If this is not set the configuration files are created in a temporary location and not persisted across server restarts.
        Parameters:
        rootDir - Path to a valid directory
        Returns:
        Returns the PayaraMicro instance
      • setSslAutoBind

        PayaraMicroBoot setSslAutoBind​(boolean sslAutoBind)
        Enables or disables autobinding of the HTTPS port
        Parameters:
        sslAutoBind - The true or false value to enable or disable HTTPS autobinding
        Returns:
      • setSslPort

        PayaraMicroBoot setSslPort​(int sslPort)
        Sets the configured port for HTTPS requests. If this is not set HTTPS is disabled
        Parameters:
        sslPort - The HTTPS port
        Returns:
      • setSslCert

        PayaraMicroBoot setSslCert​(String alias)
        Sets the name of the certificate to use in the keystore
        Parameters:
        alias - the name of the certificate in the keystore
        Returns:
      • setUserLogFile

        PayaraMicroBoot setUserLogFile​(String fileName)
        Set user defined file for the Log entries
        Parameters:
        fileName -
        Returns:
      • setInstanceGroup

        PayaraMicroBoot setInstanceGroup​(String groupName)
        Sets the instance group name
        Parameters:
        instanceGroup - The instance group name
        Returns:
      • getInstanceGroup

        String getInstanceGroup()
        Gets the name of the instance group
        Returns:
        The name of the instance group
      • addLibrary

        PayaraMicroBoot addLibrary​(File lib)
        Adds the library to the classloader and loads it
        Parameters:
        lib - The library to add
        Returns:
        Since:
        4.1.2.173
      • setSniEnabled

        PayaraMicroBoot setSniEnabled​(boolean value)
        Sets whether SNI enabled for SSL
        Parameters:
        value - true to enable SNI
        Returns:
        Since:
        4.1.2.182 5.1.2.182