Package org.zeroturnaround.javarebel
Interface ContainerIntegration
public interface ContainerIntegration
Provides information about application container.
To use acquire an instance from the ContainerIntegrationFactory.
- Author:
- Aleksei Sosnovski
-
Method Summary
Modifier and TypeMethodDescriptionbooleanaddContainerTempDir(File dir) Add running servlet container temp dirGets running servlet container temp dirs where server might store application files or empty set if not found or integration not present.NB! Before invoking this method make sure thatreturned true.isMainCalled()NB! Before invoking this method make sure thatreturned true.isMainCalled()String[]NB! Before invoking this method make sure thatreturned true.isMainCalled()getName()booleanvoidsetContainerInfo(String name, String version) This method is used to set the information about the application container.
-
Method Details
-
isMainCalled
boolean isMainCalled()- Returns:
- if the main method was invoked and related data is already available.
-
getMainJar
String getMainJar()NB! Before invoking this method make sure thatreturned true.isMainCalled()- Returns:
- path to JAR file from which the main method was called. This method may return null.
-
getMainClass
String getMainClass()NB! Before invoking this method make sure thatreturned true.isMainCalled()- Returns:
- name of the class from which the main method was called.
-
getMainMethodArgs
String[] getMainMethodArgs()NB! Before invoking this method make sure thatreturned true.isMainCalled()- Returns:
- arguments passed to the main method.
-
setContainerInfo
This method is used to set the information about the application container.- Parameters:
name- name of the container. May be null.version- version of the container. May be null.
-
getName
String getName()- Returns:
- name of the container. May return null.
-
getVersion
String getVersion()- Returns:
- version of the container. May return null.
-
getContainerTempDirs
Gets running servlet container temp dirs where server might store application files or empty set if not found or integration not present.- Returns:
- Files pointing to the root dir of container temp or empty set
-
addContainerTempDir
Add running servlet container temp dir- Parameters:
dir- name of the servlet container temp dir- Returns:
- true if temp dir wasn't present before and the dir was added.
-