public interface PayaraMicroRuntime
Modifier and Type | Method and Description |
---|---|
void |
addCDIEventListener(CDIEventListener listener) |
void |
addClusterListener(PayaraClusterListener listener) |
boolean |
deploy(File war)
Deploys a new archive to a running Payara Micro instance
|
boolean |
deploy(String name,
InputStream is)
Deploy from an InputStream which can load the Java EE archive
|
boolean |
deploy(String name,
String contextRoot,
File war)
Deploys a new archive to a running Payara Micro instance
|
boolean |
deploy(String name,
String contextRoot,
InputStream is)
Deploy from an InputStream which can load the Java EE archive
|
Collection<InstanceDescriptor> |
getClusteredPayaras()
Returns a collection if instance descriptors for all the Payara Micros in the cluster
|
Collection<String> |
getDeployedApplicationNames()
Returns the names of the deployed applications
|
String |
getInstanceName()
Returns the instance name
|
InstanceDescriptor |
getLocalDescriptor() |
void |
publishCDIEvent(PayaraClusteredCDIEvent event) |
void |
removeCDIEventListener(CDIEventListener listener) |
void |
removeClusterListener(PayaraClusterListener listener) |
<T extends Serializable> |
run(Callable<T> callable)
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()
|
<T extends Serializable> |
run(Collection<InstanceDescriptor> members,
Callable<T> callable)
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()
|
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()
|
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()
|
void |
shutdown()
Stops and then shuts down the Payara Micro Server
|
void |
undeploy(String name)
Undeploys the named application
|
void addCDIEventListener(CDIEventListener listener)
void addClusterListener(PayaraClusterListener listener)
boolean deploy(String name, String contextRoot, InputStream is)
name
- The name of the deploymentcontextRoot
- The context root to deploy the application tois
- InputStream to load the war throughboolean deploy(String name, InputStream is)
name
- The name of the deployment and the context root of the deployment if a war fileis
- InputStream to load the war throughboolean deploy(String name, String contextRoot, File war)
name
- The name to give the application once deployedcontextRoot
- The context root to give the applicationwar
- A File object representing the archive to deploy, it can be an exploded directoryboolean deploy(File war)
war
- A File object representing the archive to deploy, it can be an exploded directoryCollection<InstanceDescriptor> getClusteredPayaras()
Collection<String> getDeployedApplicationNames()
String getInstanceName()
InstanceDescriptor getLocalDescriptor()
void publishCDIEvent(PayaraClusteredCDIEvent event)
void removeCDIEventListener(CDIEventListener listener)
void removeClusterListener(PayaraClusterListener listener)
Map<InstanceDescriptor,Future<? extends ClusterCommandResult>> run(String command, String... args)
command
- The name of the asadmin command to runargs
- The parameters to the commandMap<InstanceDescriptor,Future<? extends ClusterCommandResult>> run(Collection<InstanceDescriptor> members, String command, String... args)
command
- The name of the asadmin command to runargs
- The parameters to the command<T extends Serializable> Map<InstanceDescriptor,Future<T>> run(Callable<T> callable)
T
- The Type of the Callablecallable
- The Callable object to run<T extends Serializable> Map<InstanceDescriptor,Future<T>> run(Collection<InstanceDescriptor> members, Callable<T> callable)
T
- The Type of the Callablemembers
- The collection of members to run the callable oncallable
- The Callable object to runvoid shutdown() throws BootstrapException
BootstrapException
void undeploy(String name)
name
- Name of the application to undeployCopyright © 2018. All rights reserved.