Interface PayaraMicroRuntime

    • Method Detail

      • deploy

        boolean deploy​(String name,
                       String contextRoot,
                       InputStream is)
        Deploy from an InputStream which can load the Java EE archive
        Parameters:
        name - The name of the deployment
        contextRoot - The context root to deploy the application to
        is - InputStream to load the war through
        Returns:
        true if deployment was successful
      • deploy

        boolean deploy​(String name,
                       InputStream is)
        Deploy from an InputStream which can load the Java EE archive
        Parameters:
        name - The name of the deployment and the context root of the deployment if a war file
        is - InputStream to load the war through
        Returns:
        true if deployment was successful
      • deploy

        boolean deploy​(String name,
                       String contextRoot,
                       File war)
        Deploys a new archive to a running Payara Micro instance
        Parameters:
        name - The name to give the application once deployed
        contextRoot - The context root to give the application
        war - A File object representing the archive to deploy, it can be an exploded directory
        Returns:
      • deploy

        boolean deploy​(File war)
        Deploys a new archive to a running Payara Micro instance
        Parameters:
        war - A File object representing the archive to deploy, it can be an exploded directory
        Returns:
        true if the file deployed successfully
      • getClusteredPayaras

        Collection<InstanceDescriptor> getClusteredPayaras()
        Returns a collection if instance descriptors for all the Payara Micros in the cluster
        Returns:
      • getDeployedApplicationNames

        Collection<String> getDeployedApplicationNames()
        Returns the names of the deployed applications
        Returns:
        a collection of names or null if there was a problem
      • getInstanceName

        String getInstanceName()
        Returns the instance name
        Returns:
      • removeCDIEventListener

        void removeCDIEventListener​(CDIEventListener listener)
      • run

        Map<InstanceDescriptor,​Future<? extends ClusterCommandResult>> run​(String command,
                                                                                 String... args)
        Runs an asadmin command on all members of the Payara Micro Cluster Functionally equivalent to the run method of the ClusterCommandRunner passing in all cluster members obtained from getClusteredPayaras()
        Parameters:
        command - The name of the asadmin command to run
        args - The parameters to the command
        Returns:
      • run

        Map<InstanceDescriptor,​Future<? extends ClusterCommandResult>> run​(Collection<InstanceDescriptor> members,
                                                                                 String command,
                                                                                 String... args)
        Runs an asadmin command on specified members of the Payara Micro Cluster Functionally equivalent to the run method of the ClusterCommandRunner passing in all cluster members obtained from getClusteredPayaras()
        Parameters:
        command - The name of the asadmin command to run
        args - The parameters to the command
        Returns:
      • run

        @Deprecated
        <T extends SerializableMap<InstanceDescriptor,​Future<T>> run​(Callable<T> callable)
        Deprecated.
        This method has an undefined ClassLoader and is unusable by a user, as it only operates on server ClassLoader rather than on application ClassLoader
        {It will be removed in the upcoming releases}.
        Runs a Callable object on all members of the Payara Micro Cluster Functionally equivalent to the run method on ClusterCommandRunner passing in all cluster members obtained from getClusteredPayaras()
        Type Parameters:
        T - The Type of the Callable
        Parameters:
        callable - The Callable object to run
        Returns:
      • run

        @Deprecated
        <T extends SerializableMap<InstanceDescriptor,​Future<T>> run​(Collection<InstanceDescriptor> members,
                                                                             Callable<T> callable)
        Deprecated.
        This method has an undefined ClassLoader and is unusable by a user, as it only operates on server ClassLoader rather than on application ClassLoader
        {It will be removed in the upcoming releases}.
        Runs a Callable object on specified members of the Payara Micro Cluster Functionally equivalent to the run method on ClusterCommandRunner passing in all cluster members obtained from getClusteredPayaras()
        Type Parameters:
        T - The Type of the Callable
        Parameters:
        members - The collection of members to run the callable on
        callable - The Callable object to run
        Returns:
      • undeploy

        void undeploy​(String name)
        Undeploys the named application
        Parameters:
        name - Name of the application to undeploy