Package com.yahoo.application
Class Application
java.lang.Object
com.yahoo.application.Application
- All Implemented Interfaces:
AutoCloseable
Contains one or more containers built from services.xml.
Other services present in the services.xml file might be mocked in future versions.
Currently, only a single top level JDisc Container is allowed. Other clusters are ignored.
- Author:
- Tony Vaagenes
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A wrapper around ApplicationBuilder that generates a services.xml -
Field Summary
Modifier and TypeFieldDescriptionstatic final String
This system property is set to "true" upon creation of an Application. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Shuts down all services.static Application
fromApplicationPackage
(File file, Networking networking) Factory method to create an Application from an application package.static Application
fromApplicationPackage
(Path path, Networking networking) Factory method to create an Application from an application package.static Application
fromBuilder
(Application.Builder builder) static Application
fromServicesXml
(String xml, Networking networking) Factory method to create an Application from an XML String.com.yahoo.search.query.profile.compiled.CompiledQueryProfileRegistry
-
Field Details
-
vespaLocalProperty
This system property is set to "true" upon creation of an Application. This is useful for components which are created by dependency injection which needs to modify their behavior to function without reliance on any processes outside the JVM.- See Also:
-
-
Method Details
-
fromBuilder
- Throws:
Exception
-
fromServicesXml
Factory method to create an Application from an XML String. Note that any components that are referenced in the XML must be present on the classpath. To deploy OSGi bundles in memory, usefromApplicationPackage(Path, Networking)
.- Parameters:
xml
- the XML configuration to use- Returns:
- a new JDisc instance
-
fromApplicationPackage
Factory method to create an Application from an application package. This method allows deploying OSGi bundles(contained in the components subdirectory). All the OSGi bundles will share the same class loader.- Parameters:
path
- the reference to the application package to use- Returns:
- a new JDisc instance
-
fromApplicationPackage
Factory method to create an Application from an application package. This method allows deploying OSGi bundles(contained in the components subdirectory). All the OSGi bundles will share the same class loader.- Parameters:
file
- the reference to the application package to use- Returns:
- a new JDisc instance
-
getJDisc
- Parameters:
id
- from the jdisc element in services xml. Default id in services.xml is "jdisc"
-
getCompiledQueryProfileRegistry
public com.yahoo.search.query.profile.compiled.CompiledQueryProfileRegistry getCompiledQueryProfileRegistry() -
close
public void close()Shuts down all services.- Specified by:
close
in interfaceAutoCloseable
-