Package org.zeroturnaround.javarebel
Interface ContainerIntegration
-
public interface ContainerIntegrationProvides information about application container.To use acquire an instance from the
ContainerIntegrationFactory.- Author:
- Aleksei Sosnovski
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanaddContainerTempDir(File dir)Add running servlet container temp dirSet<File>getContainerTempDirs()Gets running servlet container temp dirs where server might store application files or empty set if not found or integration not present.StringgetMainClass()NB! Before invoking this method make sure thatreturned true.isMainCalled()StringgetMainJar()NB! Before invoking this method make sure thatreturned true.isMainCalled()String[]getMainMethodArgs()NB! Before invoking this method make sure thatreturned true.isMainCalled()StringgetName()StringgetVersion()booleanisMainCalled()voidsetContainerInfo(String name, String version)This method is used to set the information about the application container.
-
-
-
Method Detail
-
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
void setContainerInfo(String name, String version)
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
Set<File> 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
boolean addContainerTempDir(File dir)
Add running servlet container temp dir- Returns:
- true if temp dir wasn't present before and the dir was added.
-
-