public class PayaraMicroRuntimeImpl extends Object implements 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
|
public String getInstanceName()
getInstanceName in interface PayaraMicroRuntimepublic void shutdown()
throws BootstrapException
shutdown in interface PayaraMicroRuntimeBootstrapExceptionpublic Collection<InstanceDescriptor> getClusteredPayaras()
getClusteredPayaras in interface PayaraMicroRuntimepublic Collection<String> getDeployedApplicationNames()
getDeployedApplicationNames in interface PayaraMicroRuntimepublic Map<InstanceDescriptor,Future<? extends ClusterCommandResult>> run(String command, String... args)
run in interface PayaraMicroRuntimecommand - The name of the asadmin command to runargs - The parameters to the commandpublic Map<InstanceDescriptor,Future<? extends ClusterCommandResult>> run(Collection<InstanceDescriptor> members, String command, String... args)
run in interface PayaraMicroRuntimecommand - The name of the asadmin command to runargs - The parameters to the commandpublic <T extends Serializable> Map<InstanceDescriptor,Future<T>> run(Callable<T> callable)
run in interface PayaraMicroRuntimeT - The Type of the Callablecallable - The Callable object to runpublic <T extends Serializable> Map<InstanceDescriptor,Future<T>> run(Collection<InstanceDescriptor> members, Callable<T> callable)
run in interface PayaraMicroRuntimeT - The Type of the Callablemembers - The collection of members to run the callable oncallable - The Callable object to runpublic boolean deploy(String name, String contextRoot, InputStream is)
deploy in interface PayaraMicroRuntimename - The name of the deploymentcontextRoot - The context root to deploy the application tois - InputStream to load the war throughpublic boolean deploy(String name, InputStream is)
deploy in interface PayaraMicroRuntimename - The name of the deployment and the context root of the deployment if a war fileis - InputStream to load the war throughpublic boolean deploy(String name, String contextRoot, File war)
deploy in interface PayaraMicroRuntimename - 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 directorypublic boolean deploy(File war)
deploy in interface PayaraMicroRuntimewar - A File object representing the archive to deploy, it can be an exploded directorypublic void undeploy(String name)
undeploy in interface PayaraMicroRuntimename - Name of the application to undeploypublic void removeClusterListener(PayaraClusterListener listener)
removeClusterListener in interface PayaraMicroRuntimepublic void addClusterListener(PayaraClusterListener listener)
addClusterListener in interface PayaraMicroRuntimepublic void publishCDIEvent(PayaraClusteredCDIEvent event)
publishCDIEvent in interface PayaraMicroRuntimepublic void addCDIEventListener(CDIEventListener listener)
addCDIEventListener in interface PayaraMicroRuntimepublic InstanceDescriptor getLocalDescriptor()
getLocalDescriptor in interface PayaraMicroRuntimepublic void removeCDIEventListener(CDIEventListener listener)
removeCDIEventListener in interface PayaraMicroRuntimeCopyright © 2017. All rights reserved.